Package org.exoplatform.services.jcr.impl.core

Examples of org.exoplatform.services.jcr.impl.core.SessionImpl.save()


            {

               ItemImpl item = editSession.getItem(paths.get(random.nextInt(paths.size())));
               NodeImpl parentNode = item.getParent();
               parentNode.setProperty(PROP1_NAME, PROP1_VALUE);
               editSession.save();
            }
         }
         catch (Exception e)
         {
            e.printStackTrace();
View Full Code Here


      try
      {
         user.getRootNode().getNode(TEST_ROOT).getNode("node").remove();
         user.getRootNode().getNode(TEST_ROOT).getNode("node[2]").remove(); // n3
         user.save();

         Node un1 = user.getRootNode().getNode(TEST_ROOT).getNode("node");
         assertEquals("Path is invalid", "/" + TEST_ROOT + "/node", un1.getPath());
         Node content = un1.getNode("jcr:content");
         assertEquals("Path is invalid", "/" + TEST_ROOT + "/node/jcr:content", content.getPath());
View Full Code Here

      assertEquals("list", list.getPrimaryNodeType().getName());
      assertTrue(list.getPrimaryNodeType().hasOrderableChildNodes());

      String path = list.addNode("1").getPath();
      list.addNode("2");
      session.save();
      session.logout();

      session = (SessionImpl)repository.login(credentials, WORKSPACE);
      list = session.getRootNode().getNode("list2");
      session.move(path, list.getPath() + "/3");
View Full Code Here

      session = (SessionImpl)repository.login(credentials, WORKSPACE);
      list = session.getRootNode().getNode("list2");
      session.move(path, list.getPath() + "/3");
      list.orderBefore("3", "2");
      session.save();
      session.logout();

      session = (SessionImpl)repository.login(credentials, WORKSPACE);
      NodeIterator it = session.getRootNode().getNode("list2").getNodes();
      NodeImpl node1 = (NodeImpl)it.nextNode();
View Full Code Here

      list.addNode("1");
      list.addNode("2");
      list.addNode("3");
      list.addNode("4");
      session.save();
      session.logout();

      session = (SessionImpl)repository.login(credentials, WORKSPACE);
      list = session.getRootNode().getNode("list2");
      session.move(list.getPath() + "/2", list.getPath() + "/5");
View Full Code Here

      session = (SessionImpl)repository.login(credentials, WORKSPACE);
      list = session.getRootNode().getNode("list2");
      session.move(list.getPath() + "/2", list.getPath() + "/5");
      list.orderBefore("5", "1");
      session.save();
      session.logout();

      session = (SessionImpl)repository.login(credentials, WORKSPACE);
      NodeIterator it = session.getRootNode().getNode("list2").getNodes();
      NodeImpl node1 = (NodeImpl)it.nextNode();
View Full Code Here

      exoTrash.addNode("node1");
      exoTrash.addNode("node2");
      Node node1 = exoTrash2.addNode("node1");
      Node node2 = exoTrash2.addNode("node2");

      session.save();

      assertResult(checkController.checkIndex(), checkController.getLastReportPath(), true);

      QueryManager qman = session.getWorkspace().getQueryManager();
View Full Code Here

      assertEquals(5, q.execute().getNodes().getSize());

      node1.addMixin("exo:hiddenable");
      node2.addMixin("exo:nothiddenable");

      session.save();

      assertResult(checkController.checkIndex(), checkController.getLastReportPath(), true);

      q = qman.createQuery("SELECT * FROM nt:base WHERE jcr:path LIKE '/testRoot/%'", Query.SQL);
      assertEquals(4, q.execute().getNodes().getSize());
View Full Code Here

      q = qman.createQuery("SELECT * FROM nt:base WHERE jcr:path LIKE '/testRoot/%'", Query.SQL);
      assertEquals(4, q.execute().getNodes().getSize());

      testRoot.remove();
      session.save();
   }

   public void testLockUsecases() throws Exception
   {
      checkConsistentLocksInDataBase(helper.createRepository(container, DatabaseStructureType.SINGLE, CACHE_DISABLED,
View Full Code Here

      Node testRoot = session.getRootNode().addNode("test");
      for (int i = 0; i < 200; i++)
      {
         Node node = testRoot.addNode("test" + i);
         node.addMixin("mix:versionable");
         session.save();

         node.checkin();
         node.checkout();
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.