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

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


      // add some changes which will be logged in incremental log
      rootNode.addNode("node1").setProperty("prop1", "value1");
      rootNode.addNode("node2").setProperty("prop2", new FileInputStream(blob));
      rootNode.addNode("node3").addMixin("mix:lockable");
      session.save();
   }

   public void addConent(ManageableRepository repository, String wsName) throws Exception
   {
      SessionImpl session = (SessionImpl)repository.login(credentials, wsName);
View Full Code Here


      // add some changes which will be logged in incremental log
      rootNode.addNode("node1").setProperty("prop1", "value1");
      rootNode.addNode("node2").setProperty("prop2", new FileInputStream(blob));
      rootNode.addNode("node3").addMixin("mix:lockable");
      session.save();
   }

   public void checkConent(ManageableRepository repository, String wsName) throws Exception
   {
      SessionImpl session = (SessionImpl)repository.login(credentials, wsName);
View Full Code Here

   {
      {
         SessionImpl sessionWS1 = (SessionImpl)repository.login(credentials, "ws1");

         sessionWS1.getRootNode().addNode("asdasdasda", "nt:unstructured").setProperty("data", "data_1");
         sessionWS1.save();

         // 1-st export
         File f1 = new File("target/1.xml");
         sessionWS1.exportWorkspaceSystemView(new FileOutputStream(f1), false, false);
View Full Code Here

   {
      SessionImpl session = (SessionImpl)repository.login(credentials, WORKSPACE);
      Node testMove = session.getRootNode().addNode("testMove");

      testMove.addNode("n1");
      session.save();
      testMove.addNode("n2");
      testMove.orderBefore("n2", "n1");
      testMove.addNode("n3");
      testMove.orderBefore("n3", "n2");
      testMove.addNode("n4");
View Full Code Here

      testMove.addNode("n4");
      testMove.orderBefore("n4", "n3");

      session.move(testMove.getPath(), "/dest");

      session.save();
      session.logout();

      session = (SessionImpl)repository.login(credentials, WORKSPACE);
      NodeIterator it = session.getRootNode().getNode("dest").getNodes();
      NodeImpl node1 = (NodeImpl)it.nextNode();
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(nThreads), checkController.getLastReportPath(), true);

      QueryManager qman = session.getWorkspace().getQueryManager();
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.