|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LockingMechanism
This interface describes locking mechanism used for WebDAV locking
Field Summary | |
---|---|
static int |
SCOPE_EXCLUSIVE
Exclusive lock |
static int |
SCOPE_NONE
No scope defined |
static int |
SCOPE_SHARED
Shared lock |
static int |
TYPE_WRITE
Write lock |
Method Summary | |
---|---|
Lock |
createLock(int type,
int scope,
Object owner,
Timeout timeout,
int depth)
Creates lock |
Lock |
findLock(String token)
Finds a lock or returns null |
Lock[] |
getLocks(Object resource)
Returns all locks on the resource or null |
Object[] |
getResources(Lock lock)
Returns all resources locked by the given lock |
int[] |
getSupportedLockScopes(Object resource)
Returns an array of supported lock scopes on a resource |
boolean |
isAccessAllowed(Object resource,
String token)
Checks if resource is accessible if token is supplied |
boolean |
isLocked(Object resource)
Checks if the resource is locked |
boolean |
lockResource(Lock lock,
Object resource)
Locks a resource |
void |
removeLocks(Object resource)
Removes a lock form the resource |
void |
unlockResources(Lock lock)
Unlocks all resource defined by this lock |
Field Detail |
---|
static final int SCOPE_NONE
static final int SCOPE_SHARED
static final int SCOPE_EXCLUSIVE
static final int TYPE_WRITE
Method Detail |
---|
Lock createLock(int type, int scope, Object owner, Timeout timeout, int depth)
type
- lcok typescope
- lock scopeowner
- lock ownertimeout
- lock timeoutdepth
- lock depth
Lock findLock(String token)
null
token
- lock token
null
boolean lockResource(Lock lock, Object resource)
lock
- lockresource
- resource
true
if locking succededvoid unlockResources(Lock lock)
lock
- lockvoid removeLocks(Object resource)
resource
- resourceLock[] getLocks(Object resource)
null
resource
- resource
null
Object[] getResources(Lock lock)
lock
- lock
boolean isLocked(Object resource)
resource
- resource
true
if the resource is lockedboolean isAccessAllowed(Object resource, String token)
resource
- resourcetoken
- token, may be null
true
if not locked or locked by the lock with givne tokenint[] getSupportedLockScopes(Object resource)
resource
- resource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |