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 ActiveLockcreateLock(LockInfo lockInfo, DavResource resource)Adds the lock for the given resource, replacing any existing lock.ActiveLockgetLock(Type type, Scope scope, DavResource resource)Returns the lock applying to the given resource ornullif no lock can be found.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.ActiveLockrefreshLock(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)Remove the lock hold by the given resource.
-
-
-
Method Detail
-
hasLock
public boolean hasLock(String lockToken, DavResource resource)
Description copied from interface:LockManagerReturns true, if the the manager contains a lock for the given resource, that is hold by the specified token.- Specified by:
hasLockin 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 ornullif no lock can be found.- Specified by:
getLockin 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:
createLockin 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:LockManagerRefresh 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:
refreshLockin 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:
releaseLockin interfaceLockManager- Parameters:
lockToken-resource- that is the lock holder- Throws:
DavException
-
-