org.apache.jackrabbit.webdav.lock
Interface ActiveLock

All Superinterfaces:
XmlSerializable
All Known Implementing Classes:
AbstractActiveLock

public interface ActiveLock
extends XmlSerializable

ActiveLock encapsulates the lock information for a DavResource.


Method Summary
 String getOwner()
          Return the name (or id) of the lock owner.
 Scope getScope()
          Return the scope of this lock.
 long getTimeout()
          Return the number of milliseconds the lock will live until it is expired or -1 if the timeout is not available (or the client is not allowed to retrieve it).
 String getToken()
          Return the lock token.
 Type getType()
          Return the type of this lock.
 boolean isDeep()
          Return true if the lock is deep.
 boolean isExpired()
          Returns true, if this lock is already expired.
 boolean isLockedByToken(String lockToken)
          Return true, if the given token matches the lock token present in this lock thus indicating that any lock relevant operation should not fail due to a lock.
 void setIsDeep(boolean isDeep)
          Set the lock deepness.
 void setOwner(String owner)
          Set the name (or id) of the lock owner
 void setTimeout(long timeout)
          Defines the number of milliseconds until the timeout is reached.
 
Methods inherited from interface org.apache.jackrabbit.webdav.xml.XmlSerializable
toXml
 

Method Detail

isLockedByToken

public boolean isLockedByToken(String lockToken)
Return true, if the given token matches the lock token present in this lock thus indicating that any lock relevant operation should not fail due to a lock.

Parameters:
lockToken - to be checked
Returns:
true if the given lock token matches.

isExpired

public boolean isExpired()
Returns true, if this lock is already expired.

Returns:
true if the lock is expired

getToken

public String getToken()
Return the lock token.

Returns:
token string representing the lock token.

getOwner

public String getOwner()
Return the name (or id) of the lock owner.

Returns:
name (or id) of the lock owner.

setOwner

public void setOwner(String owner)
Set the name (or id) of the lock owner

Parameters:
owner -

getTimeout

public long getTimeout()
Return the number of milliseconds the lock will live until it is expired or -1 if the timeout is not available (or the client is not allowed to retrieve it).

Returns:

setTimeout

public void setTimeout(long timeout)
Defines the number of milliseconds until the timeout is reached.

Parameters:
timeout -

isDeep

public boolean isDeep()
Return true if the lock is deep.

Returns:
true if the lock is deep.

setIsDeep

public void setIsDeep(boolean isDeep)
Set the lock deepness.

Parameters:
isDeep -

getType

public Type getType()
Return the type of this lock.

Returns:
type

getScope

public Scope getScope()
Return the scope of this lock.

Returns:
scope


Copyright © 2005-2006 . All Rights Reserved.