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

Examples of org.exoplatform.services.jcr.impl.core.NodeImpl.lock()


      node1.addMixin(mixins[0]);
      node1.addMixin(mixins[1]);
      this.testNode.save();

      node1.lock(true, false);

      checkMixins(mixins, node1);
   }

   public void testFewMixinAddRemove() throws Exception
View Full Code Here


      node1.addMixin(mixins[0]);
      node1.addMixin(mixins[1]);
      this.testNode.save();

      node1.lock(true, false);

      node1.removeMixin(mixins[0]);
      this.testNode.save();

      checkMixins(finalMixins, node1);
View Full Code Here

      HashMap<String, String[]> perm = new HashMap<String, String[]>();
      perm.put("john", new String[]{PermissionType.READ});
      nodeToLockSession1.setPermissions(perm);
      session1.save();

      nodeToLockSession1.lock(true, false);// boolean isSessionScoped=false
      assertTrue(nodeToLockSession1.isLocked());
      nodeToLockSession1.unlock();
      assertFalse(nodeToLockSession1.isLocked());

      Session session2 = repository.login(new CredentialsImpl("john", "exo".toCharArray()), "ws");
View Full Code Here

      HashMap<String, String[]> perm = new HashMap<String, String[]>();
      perm.put("john", new String[]{PermissionType.READ});
      nodeToLockSession1.setPermissions(perm);
      session1.save();

      nodeToLockSession1.lock(true, 100000);
      assertTrue(nodeToLockSession1.isLocked());
      nodeToLockSession1.unlock();
      assertFalse(nodeToLockSession1.isLocked());

      Session session2 = repository.login(new CredentialsImpl("john", "exo".toCharArray()), "ws");
View Full Code Here

      try
      {
         try
         {
            // trying to lock
            nodeToLockSession2.lock(true, 100000);
            fail("Node locked. An AccessDeniedException should be thrown on set property but doesn't");
         }
         catch (AccessDeniedException e)
         {
            // ok
View Full Code Here

      HashMap<String, String[]> perm = new HashMap<String, String[]>();
      perm.put("john", new String[]{PermissionType.READ});
      nodeToLockSession1.setPermissions(perm);
      session1.save();

      Lock lock = nodeToLockSession1.lock(true, 100000);
      assertTrue(nodeToLockSession1.isLocked());

      Session session2 = repository.login(new CredentialsImpl("john", "exo".toCharArray()), "ws");
      session2.checkPermission(nodeToLockSession1.getPath(), PermissionType.READ);
      try
View Full Code Here

      NodeImpl testNode = (NodeImpl)root.addNode("testNode");
      testNode.addMixin("mix:lockable");

      try
      {
         testNode.lock(true, false);
         fail();
      }
      catch (InvalidItemStateException e)
      {
      }
View Full Code Here

      NodeImpl testNode = (NodeImpl)root.addNode("testNode");
      testNode.addMixin("mix:lockable");

      try
      {
         testNode.lock(true, 10L);
         fail();
      }
      catch (InvalidItemStateException e)
      {
      }
View Full Code Here

   {
      NodeImpl testNode = (NodeImpl)root.addNode("testNode");
      testNode.addMixin("mix:lockable");
      session.save();

      testNode.lock(true, false);

      try
      {
         testNode.lock(true, 10L);
         fail();
View Full Code Here

      testNode.lock(true, false);

      try
      {
         testNode.lock(true, 10L);
         fail();
      }
      catch (LockException 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.