Interface ActiveLock
-
- All Superinterfaces:
XmlSerializable
- All Known Implementing Classes:
AbstractActiveLock,DefaultActiveLock,TxActiveLock
public interface ActiveLock extends XmlSerializable
ActiveLockencapsulates the lock information for aDavResource.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetLockroot()Returns the lockroot.java.lang.StringgetOwner()Return the name (or id) of the lock owner.ScopegetScope()Return the scope of this lock.longgetTimeout()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).java.lang.StringgetToken()Return the lock token.TypegetType()Return the type of this lock.booleanisDeep()Return true if the lock is deep.booleanisExpired()Returns true, if this lock is already expired.booleanisLockedByToken(java.lang.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.voidsetIsDeep(boolean isDeep)Set the lock deepness.voidsetLockroot(java.lang.String lockroot)Set the lockroot.voidsetOwner(java.lang.String owner)Set the name (or id) of the lock ownervoidsetTimeout(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
boolean isLockedByToken(java.lang.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
boolean isExpired()
Returns true, if this lock is already expired.- Returns:
- true if the lock is expired
-
getToken
java.lang.String getToken()
Return the lock token.- Returns:
- token string representing the lock token.
-
getOwner
java.lang.String getOwner()
Return the name (or id) of the lock owner.- Returns:
- name (or id) of the lock owner.
-
setOwner
void setOwner(java.lang.String owner)
Set the name (or id) of the lock owner- Parameters:
owner-
-
getTimeout
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:
- number of milliseconds.
-
setTimeout
void setTimeout(long timeout)
Defines the number of milliseconds until the timeout is reached.- Parameters:
timeout-
-
isDeep
boolean isDeep()
Return true if the lock is deep.- Returns:
- true if the lock is deep.
-
setIsDeep
void setIsDeep(boolean isDeep)
Set the lock deepness.- Parameters:
isDeep-
-
getLockroot
java.lang.String getLockroot()
Returns the lockroot.- Returns:
- lockroot
- See Also:
- RFC 4918
-
setLockroot
void setLockroot(java.lang.String lockroot)
Set the lockroot.- Parameters:
lockroot-- See Also:
- RFC 4918
-
getType
Type getType()
Return the type of this lock.- Returns:
- type
-
getScope
Scope getScope()
Return the scope of this lock.- Returns:
- scope
-
-