@Test @FixFor( "MODE-2424" ) public void shouldAllowAddingMixinOnLockedNodeForLockOwner() throws Exception { final AbstractJcrNode testNode = session.getRootNode().addNode("test"); final String path = testNode.getPath(); testNode.addMixin("mix:lockable"); session.save(); session.getWorkspace().getLockManager().lock(path, false, true, Long.MAX_VALUE, session.getUserID()); testNode.addMixin("mix:created"); session.save(); }
@Override public Lock lock( String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo ) throws LockException, PathNotFoundException, AccessDeniedException, InvalidItemStateException, RepositoryException { AbstractJcrNode node = session.node(session.absolutePathFor(absPath)); return lock(node, isDeep, isSessionScoped, timeoutHint, ownerInfo); }
JcrLockManager implements LockManager { @Override public Lock lock( String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo ) throws LockException, PathNotFoundException, AccessDeniedException, InvalidItemStateException, RepositoryException { AbstractJcrNode node = session.node(session.absolutePathFor(absPath)); return lock(node, isDeep, isSessionScoped, timeoutHint, ownerInfo); } }
JcrLockManager implements LockManager { @Override public Lock lock( String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo ) throws LockException, PathNotFoundException, AccessDeniedException, InvalidItemStateException, RepositoryException { AbstractJcrNode node = session.node(session.absolutePathFor(absPath)); return lock(node, isDeep, isSessionScoped, timeoutHint, ownerInfo); } JcrLockManager( JcrSession session,
                    RepositoryLockManager lockManager ); }
JcrLockManager implements LockManager { @Override public Lock lock( String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo ) throws LockException, PathNotFoundException, AccessDeniedException, InvalidItemStateException, RepositoryException { AbstractJcrNode node = session.node(session.absolutePathFor(absPath)); return lock(node, isDeep, isSessionScoped, timeoutHint, ownerInfo); } JcrLockManager( JcrSession session,
                    RepositoryLockManager lockManager ); @Override void addLockToken( String lockToken ); @Override void removeLockToken( String lockToken ); @Override String[] getLockTokens(); @Override boolean isLocked( String absPath ); boolean isLocked( AbstractJcrNode node ); @Override Lock getLock( String absPath ); Lock getLock( AbstractJcrNode node ); Lock getLockIfExists( AbstractJcrNode node ); @Override boolean holdsLock( String absPath ); boolean holdsLock( AbstractJcrNode node ); @Override Lock lock( String absPath,
                      boolean isDeep,
                      boolean isSessionScoped,
                      long timeoutHint,
                      String ownerInfo ); Lock lock( AbstractJcrNode node,
                      boolean isDeep,
                      boolean isSessionScoped,
                      long timeoutHint,
                      String ownerInfo ); @Override void unlock( String absPath ); void unlock( AbstractJcrNode node ); }
JcrLockManager implements LockManager { @Override public Lock lock( String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerInfo ) throws LockException, PathNotFoundException, AccessDeniedException, InvalidItemStateException, RepositoryException { AbstractJcrNode node = session.node(session.absolutePathFor(absPath)); return lock(node, isDeep, isSessionScoped, timeoutHint, ownerInfo); } JcrLockManager( JcrSession session,
                    RepositoryLockManager lockManager ); @Override void addLockToken( String lockToken ); @Override void removeLockToken( String lockToken ); @Override String[] getLockTokens(); @Override boolean isLocked( String absPath ); boolean isLocked( AbstractJcrNode node ); @Override Lock getLock( String absPath ); Lock getLock( AbstractJcrNode node ); Lock getLockIfExists( AbstractJcrNode node ); @Override boolean holdsLock( String absPath ); boolean holdsLock( AbstractJcrNode node ); @Override Lock lock( String absPath,
                      boolean isDeep,
                      boolean isSessionScoped,
                      long timeoutHint,
                      String ownerInfo ); Lock lock( AbstractJcrNode node,
                      boolean isDeep,
                      boolean isSessionScoped,
                      long timeoutHint,
                      String ownerInfo ); @Override void unlock( String absPath ); void unlock( AbstractJcrNode node );  }