|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.webdav.jcr.transaction.TxLockManagerImpl
public class TxLockManagerImpl
TxLockManagerImpl
manages locks with locktype
'dcr:transaction
'.
Constructor Summary | |
---|---|
TxLockManagerImpl()
|
Method Summary | |
---|---|
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 indentified 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 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TxLockManagerImpl()
Method Detail |
---|
public ActiveLock createLock(LockInfo lockInfo, DavResource resource) throws DavException
createLock
in interface LockManager
lockInfo
- 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 LockManager
lockInfo
- lockToken
- resource
-
DavException
IllegalArgumentException
- 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 LockManager
lockToken
- resource
-
DavException
LockManager.releaseLock(String, org.apache.jackrabbit.webdav.DavResource)
public void releaseLock(TransactionInfo lockInfo, String lockToken, TransactionResource resource) throws DavException
releaseLock
in interface TxLockManager
lockInfo
- lockToken
- resource
-
DavException
public ActiveLock getLock(Type type, Scope scope, DavResource resource)
getLock
in interface LockManager
type
- 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 LockManager
token
- resource
-
LockManager.hasLock(String token, DavResource resource)
public ActiveLock getLock(Type type, Scope scope, TransactionResource resource)
null
getLock
in interface TxLockManager
type
- scope
- resource
-
null
todo: 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |