Class LockTest

  • All Implemented Interfaces:
    junit.framework.Test

    public class LockTest
    extends AbstractJCRTest
    LockTest contains the test cases for the lock support in the JCR specification.
    • testroot must allow child nodes of type nodetype
    • nodetype nodetype which is lockable or allows to add mix:lockable. The node must also allow child nodes with the same node type as itself.
    • nodename1 name of a lockable child node of type nodetype.
    • Constructor Detail

      • LockTest

        public LockTest()
    • Method Detail

      • testAddRemoveLockToken

        public void testAddRemoveLockToken()
                                    throws Exception
        Test lock token functionality
        Throws:
        Exception
      • testNodeLocked

        public void testNodeLocked()
                            throws Exception
        Test session scope: other session may not access nodes that are locked.
        Throws:
        Exception
      • testGetNode

        public void testGetNode()
                         throws Exception
        Test to get the lock holding node of a node
        Throws:
        Exception
      • testGetLockOwnerProperty

        public void testGetLockOwnerProperty()
                                      throws Exception
        Test if getLockOwner() returns the same value as returned by Session.getUserId at the time that the lock was placed
        Throws:
        Exception
      • testGetLockOwner

        public void testGetLockOwner()
                              throws Exception
        Test if getLockOwner() returns the same value as returned by Session.getUserId at the time that the lock was placed
        Throws:
        Exception
      • testShallowLock

        public void testShallowLock()
                             throws Exception
        Test if a shallow lock does not lock the child nodes of the locked node.
        Throws:
        Exception
      • testParentChildLock

        public void testParentChildLock()
                                 throws Exception
        Test parent/child lock
        Throws:
        Exception
      • testParentChildDeepLock

        public void testParentChildDeepLock()
                                     throws Exception
        Test parent/child lock
        Throws:
        Exception
      • testLogout

        public void testLogout()
                        throws Exception
        Test locks are released when session logs out
        Throws:
        Exception
      • testLockTransfer

        public void testLockTransfer()
                              throws Exception
        Test locks may be transferred to other session
        Throws:
        Exception
      • testOpenScopedLocks

        public void testOpenScopedLocks()
                                 throws Exception
        Test open-scoped locks
        Throws:
        Exception
      • testRefreshNotLive

        public void testRefreshNotLive()
                                throws Exception
        Test refresh
        Throws:
        Exception
      • testCheckedInUnlock

        public void testCheckedInUnlock()
                                 throws Exception
        Tests if a locked, checked-in node can be unlocked
        Throws:
        Exception
      • testReorder

        public void testReorder()
                         throws Exception
        Tests if locks are maintained when child nodes are reordered
        Throws:
        Exception
      • testReorder2

        public void testReorder2()
                          throws Exception
        Tests if locks are maintained when child nodes are reordered
        Throws:
        Exception
      • testMoveLocked

        public void testMoveLocked()
                            throws Exception
        Tests if move preserves lock state (JIRA issue JCR-207). A node that has been locked must still appear locked when it has been moved or renamed, regardless whether the changes have already been made persistent.
        Throws:
        Exception