Class SimpleLockManager
- java.lang.Object
-
- org.apache.jackrabbit.webdav.lock.SimpleLockManager
-
- All Implemented Interfaces:
LockManager
public class SimpleLockManager extends Object implements LockManager
Simple manager for webdav locks.
-
-
Constructor Summary
Constructors Constructor Description SimpleLockManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActiveLock
createLock(LockInfo lockInfo, DavResource resource)
Adds the lock for the given resource, replacing any existing lock.ActiveLock
getLock(Type type, Scope scope, DavResource resource)
Returns the lock applying to the given resource ornull
if no lock can be found.boolean
hasLock(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, String lockToken, DavResource resource)
Refresh the lock identified by the given lockToken and initially created on the specified resource.void
releaseLock(String lockToken, DavResource resource)
Remove the lock hold by the given resource.
-
-
-
Method Detail
-
hasLock
public boolean hasLock(String lockToken, DavResource resource)
Description copied from interface:LockManager
Returns true, if the the manager contains a lock for the given resource, that is hold by the specified token.- Specified by:
hasLock
in interfaceLockManager
- Parameters:
lockToken
-resource
-- Returns:
- See Also:
LockManager.hasLock(String, org.apache.jackrabbit.webdav.DavResource)
-
getLock
public ActiveLock getLock(Type type, Scope scope, DavResource resource)
Returns the lock applying to the given resource ornull
if no lock can be found.- Specified by:
getLock
in interfaceLockManager
- Parameters:
type
-scope
-resource
-- Returns:
- lock that applies to the given resource or
null
.
-
createLock
public ActiveLock createLock(LockInfo lockInfo, DavResource resource) throws DavException
Adds the lock for the given resource, replacing any existing lock.- Specified by:
createLock
in interfaceLockManager
- Parameters:
lockInfo
-resource
- being the lock holder- Returns:
- Throws:
DavException
-
refreshLock
public ActiveLock refreshLock(LockInfo lockInfo, String lockToken, DavResource resource) throws DavException
Description copied from interface:LockManager
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.- Specified by:
refreshLock
in interfaceLockManager
- Parameters:
lockInfo
-lockToken
-resource
-- Returns:
- Throws:
DavException
- See Also:
DavResource.refreshLock(org.apache.jackrabbit.webdav.lock.LockInfo, String)
-
releaseLock
public void releaseLock(String lockToken, DavResource resource) throws DavException
Remove the lock hold by the given resource.- Specified by:
releaseLock
in interfaceLockManager
- Parameters:
lockToken
-resource
- that is the lock holder- Throws:
DavException
-
-