Package org.apache.webdav.lib
Class Lock
java.lang.Object
org.apache.webdav.lib.Lock
This class represents a lock on a resource.
- Version:
- $Revision: 1.3.2.1 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected Stringprotected intprotected Stringprotected Stringstatic final intThe exclusive constant in the lockscope.static final intThe shared constant in the lockscope.static final StringThe property name.protected intstatic final intType indicating lock is a transaction lock.static final intThe write constant in the locktype. -
Constructor Summary
ConstructorsConstructorDescriptionLock(int lockScope, int lockType) Default constructor for the lockentry.Default constructor for the activelock.Lock(int lockScope, int lockType, int depth, String owner, int timeout, String lockToken, String principalUrl) Deprecated.The timeout value MUST NOT be greater than 2^32-1. -
Method Summary
Modifier and TypeMethodDescriptionintgetDepth()Get the value of the depth.intGet whether a lock is an exclusive lock, or a shared lock.Get the access type of a lock.intGet the access type of a lock.getOwner()Get information about the principal taking out a lock.Get theprincipal-URLproperty of the lock, if one.intGet the timeout associated with a lock.toString()
-
Field Details
-
TAG_NAME
The property name.- See Also:
-
TYPE_WRITE
public static final int TYPE_WRITEThe write constant in the locktype.- See Also:
-
TYPE_TRANSACTION
public static final int TYPE_TRANSACTIONType indicating lock is a transaction lock.- See Also:
-
SCOPE_EXCLUSIVE
public static final int SCOPE_EXCLUSIVEThe exclusive constant in the lockscope.- See Also:
-
SCOPE_SHARED
public static final int SCOPE_SHAREDThe shared constant in the lockscope.- See Also:
-
lockScope
protected int lockScope -
lockType
protected int lockType -
depth
protected int depth -
owner
-
timeout
protected int timeout -
lockToken
-
principalUrl
-
-
Constructor Details
-
Lock
public Lock(int lockScope, int lockType) Default constructor for the lockentry. -
Lock
Default constructor for the activelock. -
Lock
-
Lock
Deprecated.The timeout value MUST NOT be greater than 2^32-1.Default constructor for the activelock.
-
-
Method Details
-
getLockScope
public int getLockScope()Get whether a lock is an exclusive lock, or a shared lock.- Returns:
- The lock scope. If it's not set, it could be -1.
-
getLockType
public int getLockType()Get the access type of a lock.- Returns:
- The lock type. If it's not set, it could be -1.
-
getDepth
public int getDepth()Get the value of the depth.- Returns:
- The depth vlaue. If it's not set, it could be -1.
-
getOwner
Get information about the principal taking out a lock.- Returns:
- The owner.
-
getPrincipalUrl
Get theprincipal-URLproperty of the lock, if one.- Returns:
- an URL as String
-
getTimeout
public int getTimeout()Get the timeout associated with a lock.- Returns:
- The timeout vlaue. If it's not set, it could be -1.
-
getLockToken
Get the access type of a lock.- Returns:
- The lock token.
-
toString
-