public class SimpleLockManager extends Object implements LockManager
Constructor and Description |
---|
SimpleLockManager() |
Modifier and Type | Method and 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 or
null 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.
|
public boolean hasLock(String lockToken, DavResource resource)
LockManager
hasLock
in interface LockManager
lockToken
- resource
- LockManager.hasLock(String, org.apache.jackrabbit.webdav.DavResource)
public ActiveLock getLock(Type type, Scope scope, DavResource resource)
null
if
no lock can be found.getLock
in interface LockManager
type
- scope
- resource
- null
.public ActiveLock createLock(LockInfo lockInfo, DavResource resource) throws DavException
createLock
in interface LockManager
lockInfo
- resource
- being the lock holderDavException
public ActiveLock refreshLock(LockInfo lockInfo, String lockToken, DavResource resource) throws DavException
LockManager
refreshLock
in interface LockManager
lockInfo
- lockToken
- resource
- DavException
DavResource.refreshLock(org.apache.jackrabbit.webdav.lock.LockInfo, String)
public void releaseLock(String lockToken, DavResource resource) throws DavException
releaseLock
in interface LockManager
lockToken
- resource
- that is the lock holderDavException
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.