org.apache.webdav.lib
Class Lock

java.lang.Object
  |
  +--org.apache.webdav.lib.Lock

public class Lock
extends java.lang.Object

This class represents a lock on a resource.

Version:
$Revision: 1.3 $
Author:
Park, Sung-Gu, Remy Maucherat, Dirk Verbeeck

Field Summary
protected  int depth
           
protected  int lockScope
           
protected  java.lang.String lockToken
           
protected  int lockType
           
protected  java.lang.String owner
           
static int SCOPE_EXCLUSIVE
          The exclusive constant in the lockscope.
static int SCOPE_SHARED
          The shared constant in the lockscope.
static java.lang.String TAG_NAME
          The property name.
protected  long timeout
           
static int TYPE_WRITE
          The write constant in the locktype.
 
Constructor Summary
Lock(int lockScope, int lockType)
          Default constructor for the lockentry.
Lock(int lockScope, int lockType, int depth, java.lang.String owner, long timeout, java.lang.String lockToken)
          Default constructor for the activelock.
 
Method Summary
 int getDepth()
          Get the value of the depth.
 int getLockScope()
          Get whether a lock is an exclusive lock, or a shared lock.
 java.lang.String getLockToken()
          Get the access type of a lock.
 int getLockType()
          Get the access type of a lock.
 java.lang.String getOwner()
          Get information about the principal taking out a lock.
 long getTimeout()
          Get the timeout associated with a lock.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
The property name.

TYPE_WRITE

public static final int TYPE_WRITE
The write constant in the locktype.

SCOPE_EXCLUSIVE

public static final int SCOPE_EXCLUSIVE
The exclusive constant in the lockscope.

SCOPE_SHARED

public static final int SCOPE_SHARED
The shared constant in the lockscope.

lockScope

protected int lockScope

lockType

protected int lockType

depth

protected int depth

owner

protected java.lang.String owner

timeout

protected long timeout

lockToken

protected java.lang.String lockToken
Constructor Detail

Lock

public Lock(int lockScope,
            int lockType)
Default constructor for the lockentry.

Lock

public Lock(int lockScope,
            int lockType,
            int depth,
            java.lang.String owner,
            long timeout,
            java.lang.String lockToken)
Default constructor for the activelock.
Method Detail

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

public java.lang.String getOwner()
Get information about the principal taking out a lock.
Returns:
The owner.

getTimeout

public long getTimeout()
Get the timeout associated with a lock.
Returns:
The timeout vlaue. If it's not set, it could be -1.

getLockToken

public java.lang.String getLockToken()
Get the access type of a lock.
Returns:
The lock token.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object