public class TxLockManagerImpl extends Object implements TxLockManager
TxLockManagerImpl manages locks with locktype
'dcr:transaction'.
| Constructor and Description |
|---|
TxLockManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTransactionListener(TransactionListener listener)
Adds a transaction listener to this
TxLockManager. |
ActiveLock |
createLock(LockInfo lockInfo,
DavResource resource)
Create a new lock.
|
ActiveLock |
getLock(Type type,
Scope scope,
DavResource resource)
Always returns null
|
ActiveLock |
getLock(Type type,
Scope scope,
TransactionResource resource)
Return the lock applied to the given resource or
null |
boolean |
hasLock(String token,
DavResource resource)
Returns true if the given lock token belongs to a lock that applies to
the given resource, false otherwise.
|
ActiveLock |
refreshLock(LockInfo lockInfo,
String lockToken,
DavResource resource)
Refresh the lock identified by the given lock token.
|
void |
releaseLock(String lockToken,
DavResource resource)
Throws UnsupportedOperationException.
|
void |
releaseLock(TransactionInfo lockInfo,
String lockToken,
TransactionResource resource)
Release the lock identified by the given lock token.
|
void |
removeTransactionListener(TransactionListener listener)
Removes a transaction listener from this
TxLockManager. |
public ActiveLock createLock(LockInfo lockInfo, DavResource resource) throws DavException
createLock in interface LockManagerlockInfo - as present in the request body.resource - DavException - if the lock could not be obtained.IllegalArgumentException - if the resource is null or
does not implement TransactionResource interface.LockManager.createLock(org.apache.jackrabbit.webdav.lock.LockInfo, org.apache.jackrabbit.webdav.DavResource)public ActiveLock refreshLock(LockInfo lockInfo, String lockToken, DavResource resource) throws DavException
refreshLock in interface LockManagerlockInfo - lockToken - resource - DavExceptionIllegalArgumentException - if the resource is null or
does not implement TransactionResource interface.LockManager.refreshLock(org.apache.jackrabbit.webdav.lock.LockInfo, String, org.apache.jackrabbit.webdav.DavResource)public void releaseLock(String lockToken, DavResource resource) throws DavException
releaseLock in interface LockManagerlockToken - resource - DavExceptionLockManager.releaseLock(String, org.apache.jackrabbit.webdav.DavResource)public void releaseLock(TransactionInfo lockInfo, String lockToken, TransactionResource resource) throws DavException
releaseLock in interface TxLockManagerlockInfo - lockToken - resource - DavExceptionpublic ActiveLock getLock(Type type, Scope scope, DavResource resource)
getLock in interface LockManagertype - scope - resource - getLock(Type, Scope, TransactionResource),
LockManager.getLock(org.apache.jackrabbit.webdav.lock.Type, org.apache.jackrabbit.webdav.lock.Scope, org.apache.jackrabbit.webdav.DavResource)public boolean hasLock(String token, DavResource resource)
Lock-Token header or
from the TransactionId header.hasLock in interface LockManagertoken - resource - LockManager.hasLock(String token, DavResource resource)public ActiveLock getLock(Type type, Scope scope, TransactionResource resource)
nullgetLock in interface TxLockManagertype - scope - resource - nulltodo: is it correct to return one that specific lock, the current session is token-holder of?public void addTransactionListener(TransactionListener listener)
TxLockManager.listener - the listener to add.public void removeTransactionListener(TransactionListener listener)
TxLockManager.listener - the listener to remove.Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.