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

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


         session1.save();
         session1.getRootNode().getNode("my").addNode("path");
         session1.save();
         session1.getRootNode().getNode("my").getNode("path").addNode("node");
         session1.save();
         session1.logout();

         // clone on 2nd ws
         Session session2 = (SessionImpl)repository.login(credentials, "ws2");
         Workspace workspace1 = session2.getWorkspace();
         workspace1.clone("ws", "/my/path/node", "/my/path/node", true);
View Full Code Here


      try
      {
         SessionImpl session1 = (SessionImpl)repository.login(credentials, "ws");
         session1.getRootNode().getNode("my").remove();
         session1.save();
         session1.logout();

         SessionImpl session2 = (SessionImpl)repository.login(credentials, "ws2");
         session2.getRootNode().getNode("my").remove();
         session2.save();
         session2.logout();
View Full Code Here

         session1.logout();

         SessionImpl session2 = (SessionImpl)repository.login(credentials, "ws2");
         session2.getRootNode().getNode("my").remove();
         session2.save();
         session2.logout();
      }
      catch (Throwable e)
      {
         log.error("tearDown error " + e, e);
      }
View Full Code Here

      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");
      list.orderBefore("3", "2");
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();
      NodeImpl node2 = (NodeImpl)it.nextNode();
View Full Code Here

      NodeImpl node2 = (NodeImpl)it.nextNode();
      assertEquals("3", node1.getName());
      assertEquals("2", node2.getName());
      assertTrue(((NodeData)node1.getData()).getOrderNumber() < ((NodeData)node2.getData()).getOrderNumber());

      session.logout();
   }

   public void testOrderBeforeAfterMove2() throws Exception
   {
      SessionImpl session = (SessionImpl)repository.login(credentials, WORKSPACE);
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");
      list.orderBefore("5", "1");
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();
      NodeImpl node2 = (NodeImpl)it.nextNode();
View Full Code Here

      assertTrue(((NodeData)node1.getData()).getOrderNumber() < ((NodeData)node2.getData()).getOrderNumber());
      assertTrue(((NodeData)node2.getData()).getOrderNumber() < ((NodeData)node3.getData()).getOrderNumber());
      assertTrue(((NodeData)node3.getData()).getOrderNumber() < ((NodeData)node4.getData()).getOrderNumber());
     
      session.logout();
   }

   private EntityCollection getEntityCollection(NodeIterator nodes)
   {
      List result = new ArrayList();
View Full Code Here

      }
      finally
      {
         if (anonSession != null)
         {
            anonSession.logout();
         }

         if (sessionJohnWS1 != null)
         {
            sessionJohnWS1.logout();
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.