public Object jsFunction_getLock() { try { return node.getLock(); } catch (RepositoryException re) { return Undefined.instance; } }
@Override public Lock getLock() throws LockException, RepositoryException { return this.node.getLock(); }
@Override @Deprecated public Lock getLock() throws RepositoryException { return getNode().getLock(); }
/** * @deprecated */ @Deprecated public Lock getLock() throws RepositoryException { return getDelegate().getLock(); }
@Override public Lock getLock() throws RepositoryException { Lock internal = delegate.getLock(); return new LockFacade<>(internal, session); }
@Override public Lock getLock() throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, RepositoryException { return getWrappedNode().getLock(); }
public void testGetLockOnChild() throws RepositoryException { // get lock must succeed even if child is not lockable. childNode.getLock(); }
public void testGetLockOnNewChild() throws RepositoryException { // get lock must succeed even if child is not lockable. Node newChild = lockedNode.addNode(nodeName3, testNodeType); newChild.getLock(); }
/** * @see javax.jcr.lock.LockManager#getLock(String) */ public javax.jcr.lock.Lock getLock(String absPath) throws LockException, RepositoryException { Node n = itemManager.getNode(resolver.getQPath(absPath)); return n.getLock(); }
/** * @see javax.jcr.lock.LockManager#getLock(String) */ public javax.jcr.lock.Lock getLock(String absPath) throws LockException, RepositoryException { Node n = itemManager.getNode(resolver.getQPath(absPath)); return n.getLock(); }
public void testGetNodeOnLockObtainedFromNewChild() throws RepositoryException { Node newChild = lockedNode.addNode(nodeName3, testNodeType); javax.jcr.lock.Lock lock = newChild.getLock(); assertTrue("Lock.getNode() must return the lock holding node even if lock is obtained from child node.", lock.getNode().isSame(lockedNode)); }
/** * {@inheritDoc} */ public void refreshLock(SessionInfo sessionInfo, NodeId nodeId) throws LockException, RepositoryException { getNode(nodeId, getSessionInfoImpl(sessionInfo)).getLock().refresh(); }
/** * {@inheritDoc} */ public void refreshLock(SessionInfo sessionInfo, NodeId nodeId) throws LockException, RepositoryException { getNode(nodeId, getSessionInfoImpl(sessionInfo)).getLock().refresh(); }
/** {@inheritDoc} */ public RemoteLock getLock() throws RepositoryException, RemoteException { try { return getFactory().getRemoteLock(node.getLock()); } catch (RepositoryException ex) { throw getRepositoryException(ex); } }
public void testGetNodeOnLockObtainedFromChild() throws RepositoryException { javax.jcr.lock.Lock lock = childNode.getLock(); assertTrue("Lock.getNode() must return the lock holding node even if lock is obtained from child node.", lock.getNode().isSame(lockedNode)); }
public void testGetNodeOnLockObtainedFromNewChild() throws RepositoryException { Node newChild = lockedNode.addNode(nodeName3, testNodeType); Lock lock = newChild.getLock(); assertTrue("Lock.getNode() must return the lock holding node even if lock is obtained from child node.", lock.getNode().isSame(lockedNode)); }
public void testReadLockContent() throws RepositoryException, NotExecutableException { Node n = createLockedNode(testRootNode); Node childN = n.addNode(nodeName2); modifyPrivileges(n.getPath(), Privilege.JCR_READ, false); modifyPrivileges(childN.getPath(), Privilege.JCR_READ, true); Node childN2 = (Node) getTestSession().getItem(childN.getPath()); try { childN2.getLock(); fail("TestUser doesn't have permission to read the jcr:lockIsDeep property."); } catch (AccessDeniedException e) { // success } }
/** * If a locked nodes is unlocked again, any Lock instance retrieved by * another session must change the lock-status. Similarly, the previously * locked node must not be marked locked any more. */ public void testUnlockByOtherSession() throws RepositoryException { Node ln2 = (Node) otherSession.getItem(lockedNode.getPath()); Lock l2 = ln2.getLock(); lockedNode.unlock(); assertFalse("Lock must be informed if Node is unlocked.", l2.isLive()); }
public void testGetNodeOnLockObtainedFromChild() throws RepositoryException { Lock lock = childNode.getLock(); assertTrue("Lock.getNode() must return the lock holding node even if lock is obtained from child node.", lock.getNode().isSame(lockedNode)); }
public void testRefreshAfterTokenTransfer2() throws Exception { String lockToken = lock.getLockToken(); Node n2 = (Node) otherSession.getItem(lockedNode.getPath()); try { superuser.removeLockToken(lockToken); otherSession.addLockToken(lockToken); n2.getLock().refresh(); } finally { // move lock token back in order to have lock removed properly otherSession.removeLockToken(lockToken); superuser.addLockToken(lockToken); } }