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

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


      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

         // ok - reading all data from backup file;
      }
      finally
      {
         if (sesion != null)
            sesion.logout();
      }
   }

   private void saveChangesLog(WorkspacePersistentDataManager dataManager, TransactionChangesLog changesLog)
            throws RepositoryException, BackupOperationException
View Full Code Here

         // ok - reading all data from backup file;
      }
      finally
      {
         if (sesion != null)
            sesion.logout();
      }
   }

   private void saveChangesLog(WorkspacePersistentDataManager dataManager, TransactionChangesLog changesLog)
      throws RepositoryException, BackupOperationException
View Full Code Here

            {
               prepareTestContent(session);
            }
            finally
            {
               session.logout();
            }
            /*
             * try { repository.getNamespaceRegistry().getURI("test"); } catch (NamespaceException e) {
             * repository.getNamespaceRegistry().registerNamespace("test",
             * "http://www.apache.org/jackrabbit/test"); } ExtendedNodeTypeManager ntManager =
View Full Code Here

            FileOutputStream fos = PrivilegedFileHelper.fileOutputStream(pathBackupFile);
            session.exportWorkspaceSystemView(fos, false, false);
         }
         finally
         {
            session.logout();
         }
      }
      catch (RepositoryException e)
      {
         LOG.error("Full backup failed " + getStorageURL().getPath(), e);
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.