|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LockManager
Defines the functionality needed for locking and unlocking nodes.
Method Summary | |
---|---|
void |
addLockToken(String lt)
Invoked by a session to inform that a lock token has been added. |
void |
checkLock(NodeState nodeState)
Check whether the given node state is locked by somebody else than the current session. |
Lock |
getLock(NodeState nodeState)
Returns the Lock object that applies to a node. |
String[] |
getLockTokens()
|
boolean |
isLocked(NodeState nodeState)
Returns true if this node is locked either as a result
of a lock held by this node or by a deep lock on a node above this
node; otherwise returns false . |
Lock |
lock(NodeState nodeState,
boolean isDeep,
boolean isSessionScoped)
Lock a node. |
void |
removeLockToken(String lt)
Invoked by a session to inform that a lock token has been removed. |
void |
unlock(NodeState nodeState)
Removes the lock on a node. |
Method Detail |
---|
Lock lock(NodeState nodeState, boolean isDeep, boolean isSessionScoped) throws LockException, RepositoryException
nodeState
- isDeep
- whether the lock applies to this node onlyisSessionScoped
- whether the lock is session scoped
LockException
- if this node already is locked, or some descendant
node is locked and isDeep
is true
RepositoryException
Node.lock(boolean, boolean)
void unlock(NodeState nodeState) throws LockException, RepositoryException
nodeState
-
LockException
- if this node is not locked or the session does not
have the correct lock token
RepositoryException
Node.unlock()
Lock getLock(NodeState nodeState) throws LockException, RepositoryException
nodeState
-
LockException
- if this node is not locked
RepositoryException
Node.getLock()
boolean isLocked(NodeState nodeState) throws RepositoryException
true
if this node is locked either as a result
of a lock held by this node or by a deep lock on a node above this
node; otherwise returns false
.
nodeState
-
true
if this node is locked either as a result
of a lock held by this node or by a deep lock on a node above this
node; otherwise returns false
RepositoryException
Node.isLocked()
void checkLock(NodeState nodeState) throws LockException, RepositoryException
nodeState
-
LockException
- if write access to the specified node is not allowed
RepositoryException
- if some other error occursString[] getLockTokens()
void addLockToken(String lt) throws LockException, RepositoryException
lt
- added lock token
LockException
RepositoryException
void removeLockToken(String lt) throws LockException, RepositoryException
lt
- removed lock token
LockException
RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |