|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.jcr2spi.lock.DefaultLockManager
public class DefaultLockManager
DefaultLockManager
...
Constructor Summary | |
---|---|
DefaultLockManager()
|
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. |
Lock |
lock(NodeState nodeState,
boolean isDeep,
boolean isSessionScoped,
long timeoutHint,
String ownerHint)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultLockManager()
Method Detail |
---|
public Lock lock(NodeState nodeState, boolean isDeep, boolean isSessionScoped) throws LockException, RepositoryException
LockManager
lock
in interface LockManager
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)
public Lock lock(NodeState nodeState, boolean isDeep, boolean isSessionScoped, long timeoutHint, String ownerHint) throws LockException, RepositoryException
LockManager
lock
in interface LockManager
isDeep
- whether the lock applies to this node onlyisSessionScoped
- whether the lock is session scopedtimeoutHint
- optional timeout hint.ownerHint
- optional String defining the lock owner info to be
displayed.
LockException
- if this node already is locked, or some descendant
node is locked and isDeep
is true
RepositoryException
Node.lock(boolean, boolean)
public void unlock(NodeState nodeState) throws LockException, RepositoryException
LockManager
unlock
in interface LockManager
LockException
- if this node is not locked or the session does not
have the correct lock token
RepositoryException
Node.unlock()
public Lock getLock(NodeState nodeState) throws LockException, RepositoryException
LockManager
getLock
in interface LockManager
LockException
- if this node is not locked
RepositoryException
Node.getLock()
public boolean isLocked(NodeState nodeState) throws RepositoryException
LockManager
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
.
isLocked
in interface LockManager
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
- If an error occurs.Node.isLocked()
public void checkLock(NodeState nodeState) throws LockException, RepositoryException
LockManager
checkLock
in interface LockManager
LockException
- if write access to the specified node is not allowed
RepositoryException
- if some other error occurspublic String[] getLockTokens()
getLockTokens
in interface LockManager
Session
this
lock manager has been created for.public void addLockToken(String lt)
LockManager
addLockToken
in interface LockManager
lt
- added lock tokenpublic void removeLockToken(String lt)
LockManager
removeLockToken
in interface LockManager
lt
- removed lock token
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |