org.apache.jackrabbit.spi.commons
Class LockInfoImpl

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.LockInfoImpl
All Implemented Interfaces:
Serializable, LockInfo

public class LockInfoImpl
extends Object
implements LockInfo, Serializable

LockInfoImpl implements a serializable LockInfo based on another lock info.

See Also:
Serialized Form

Constructor Summary
LockInfoImpl(String lockToken, String lockOwner, boolean isDeep, boolean isSessionScoped, NodeId nodeId)
          Creates a new lock info for the given lock info.
 
Method Summary
 String getLockToken()
          Returns the lock token for this lock if it is hold by the requesting session or null otherwise.
 NodeId getNodeId()
          Returns the NodeId of the lock-holding Node.
 String getOwner()
          Returns the user ID of the user who owns this lock.
 boolean isDeep()
          Returns true if the Lock is deep.
 boolean isSessionScoped()
          Returns true if the Lock is session scoped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockInfoImpl

public LockInfoImpl(String lockToken,
                    String lockOwner,
                    boolean isDeep,
                    boolean isSessionScoped,
                    NodeId nodeId)
Creates a new lock info for the given lock info.

Parameters:
lockToken - the lock token
lockOwner - the lock owner
isDeep - whether this lock is deep or not
isSessionScoped - whether this lock is session scoped or not
nodeId - the node id of the locked node.
Method Detail

getLockToken

public String getLockToken()
Returns the lock token for this lock if it is hold by the requesting session or null otherwise.

Specified by:
getLockToken in interface LockInfo
Returns:
lock token or null
See Also:
Lock.getLockToken()

getOwner

public String getOwner()
Returns the user ID of the user who owns this lock.

Specified by:
getOwner in interface LockInfo
Returns:
user ID of the user who owns this lock.
See Also:
Lock.getLockOwner()

isDeep

public boolean isDeep()
Returns true if the Lock is deep. False otherwise.

Specified by:
isDeep in interface LockInfo
Returns:
true if the Lock is deep. False otherwise.
See Also:
Lock.isDeep()

isSessionScoped

public boolean isSessionScoped()
Returns true if the Lock is session scoped. False otherwise.

Specified by:
isSessionScoped in interface LockInfo
Returns:
true if the Lock is session scoped. False otherwise.
See Also:
Lock.isSessionScoped()

getNodeId

public NodeId getNodeId()
Returns the NodeId of the lock-holding Node.

Specified by:
getNodeId in interface LockInfo
Returns:
the NodeId of the lock-holding Node.


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