org.apache.jackrabbit.webdav.lock
Interface LockManager

All Known Subinterfaces:
TxLockManager
All Known Implementing Classes:
SimpleLockManager, TxLockManagerImpl

public interface LockManager

The LockManager interface.


Method Summary
 ActiveLock createLock(LockInfo lockInfo, DavResource resource)
          Create a new lock for the given resource.
 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(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 resouce.
 void releaseLock(String lockToken, DavResource resource)
          Release the lock identified by the given lockToken and initially created on the specified resouce.
 

Method Detail

createLock

ActiveLock createLock(LockInfo lockInfo,
                      DavResource resource)
                      throws DavException
Create a new lock for the given resource.

Parameters:
lockInfo -
resource -
Returns:
Throws:
DavException

refreshLock

ActiveLock refreshLock(LockInfo lockInfo,
                       String lockToken,
                       DavResource resource)
                       throws DavException
Refresh the lock identified by the given lockToken and initially created on the specified resouce. The update information can be retrieved from the lockInfo object passes.

Parameters:
lockInfo -
lockToken -
resource -
Returns:
Throws:
DavException

releaseLock

void releaseLock(String lockToken,
                 DavResource resource)
                 throws DavException
Release the lock identified by the given lockToken and initially created on the specified resouce.

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 resource null 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(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.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.