Interface LockManager
-
- All Known Subinterfaces:
TxLockManager
- All Known Implementing Classes:
SimpleLockManager
public interface LockManager
TheLockManager
interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ActiveLock
createLock(LockInfo lockInfo, DavResource resource)
Create a new lock for the givenresource
.ActiveLock
getLock(Type type, Scope scope, DavResource resource)
Retrieve the lock with the given type and scope that is applied to the given resource.boolean
hasLock(java.lang.String lockToken, DavResource resource)
Returns true, if the the manager contains a lock for the given resource, that is hold by the specified token.ActiveLock
refreshLock(LockInfo lockInfo, java.lang.String lockToken, DavResource resource)
Refresh the lock identified by the given lockToken and initially created on the specified resource.void
releaseLock(java.lang.String lockToken, DavResource resource)
Release the lock identified by the given lockToken and initially created on the specified resource.
-
-
-
Method Detail
-
createLock
ActiveLock createLock(LockInfo lockInfo, DavResource resource) throws DavException
Create a new lock for the givenresource
.- Parameters:
lockInfo
-resource
-- Returns:
- Throws:
DavException
-
refreshLock
ActiveLock refreshLock(LockInfo lockInfo, java.lang.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
void releaseLock(java.lang.String lockToken, DavResource resource) throws DavException
Release the lock identified by the given lockToken and initially created on the specified resource.- Parameters:
lockToken
-resource
-- Throws:
DavException
-
getLock
ActiveLock getLock(Type type, Scope scope, DavResource resource)
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 resourcenull
must be returned.- Parameters:
type
-scope
-resource
-- Returns:
- lock with the given type and scope applied to the resource or
null
if no lock applies.
-
hasLock
boolean hasLock(java.lang.String lockToken, DavResource resource)
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.
-
-