Interface LockManager
- All Known Subinterfaces:
TxLockManager
- All Known Implementing Classes:
SimpleLockManager
public interface LockManager
The
LockManager interface.-
Method Summary
Modifier and TypeMethodDescriptioncreateLock(LockInfo lockInfo, DavResource resource) Create a new lock for the givenresource.getLock(Type type, Scope scope, DavResource resource) Retrieve the lock with the given type and scope that is applied to the given resource.booleanhasLock(String lockToken, DavResource resource) Returns true, if the the manager contains a lock for the given resource, that is hold by the specified token.refreshLock(LockInfo lockInfo, String lockToken, DavResource resource) Refresh the lock identified by the given lockToken and initially created on the specified resource.voidreleaseLock(String lockToken, DavResource resource) Release the lock identified by the given lockToken and initially created on the specified resource.
-
Method Details
-
createLock
Create a new lock for the givenresource.- Parameters:
lockInfo-resource-- Returns:
- Throws:
DavException
-
refreshLock
ActiveLock refreshLock(LockInfo lockInfo, String lockToken, DavResource resource) throws DavException Refresh the lock identified by the given lockToken and initially created on the specified resource. The update information can be retrieved from the lockInfo object passes.- Parameters:
lockInfo-lockToken-resource-- Returns:
- Throws:
DavException
-
releaseLock
Release the lock identified by the given lockToken and initially created on the specified resource.- Parameters:
lockToken-resource-- Throws:
DavException
-
getLock
Retrieve the lock with the given type and scope that is applied to the given resource. The lock may be either initially created on this resource or might be inherited from an ancestor resource that hold a deep lock. If no such lock applies to the given resourcenullmust be returned.- Parameters:
type-scope-resource-- Returns:
- lock with the given type and scope applied to the resource or
nullif no lock applies.
-
hasLock
Returns true, if the the manager contains a lock for the given resource, that is hold by the specified token.- Parameters:
lockToken-resource-- Returns:
- true if the resource is locked by the specified token.
-