com.sapportals.wcm.repository

Class LockInfo

java.lang.Object
  extended by com.sapportals.wcm.repository.LockInfo
All Implemented Interfaces:
ILockInfo
Direct Known Subclasses:
ExtendedLockInfo

public class LockInfo
extends Object
implements ILockInfo

This object represents an active lock on a resource.

Copyright 2004 SAP AG


Field Summary
protected  XMLMarkup clientSuppliedOwner
           
protected  Date created
           
protected  LockDepth depth
           
protected  Date expiration
           
static int LOCK_TIMEOUT_INFINITE
           
protected  String lockToken
           
protected  String owner
           
protected  LockScope scope
           
protected  int timeout
          Timeout in seconds
protected  LockType type
           
 
Constructor Summary
LockInfo(LockType type, LockScope scope, LockDepth depth, String owner, int timeout, String lockToken)
           
LockInfo(LockType type, LockScope scope, LockDepth depth, String owner, int timeout, String lockToken, Date created)
           
LockInfo(LockType type, LockScope scope, LockDepth depth, String owner, int timeout, String lockToken, Date created, XMLMarkup ownerInfoFromClient)
           
 
Method Summary
 boolean equals(Object o)
          Compare this LockInfo with another one or with a String (token)
 XMLMarkup getClientSuppliedOwner()
          A client can submit his own owner information that SHOULD be returned upon lock discovery.
 Date getCreated()
           
 LockDepth getDepth()
           
 Date getExpiration()
          The date and time when the lock will expire.
 String getLockToken()
          The lock token must be either an absolute URI (as defined in RFC2396 or a relative URI reference (in which case the opaquelocktoken URI scheme is assumed).
 String getOwner()
          Returns the unique id of the lock owner.
 LockScope getScope()
           
 int getTimeout()
           
 LockType getType()
           
 int hashCode()
           
 long timeRemaining()
          The time remaining until the lock expires.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCK_TIMEOUT_INFINITE

public static final int LOCK_TIMEOUT_INFINITE
See Also:
Constant Field Values

type

protected LockType type

scope

protected LockScope scope

depth

protected LockDepth depth

owner

protected String owner

clientSuppliedOwner

protected XMLMarkup clientSuppliedOwner

lockToken

protected String lockToken

timeout

protected int timeout
Timeout in seconds


expiration

protected Date expiration

created

protected Date created
Constructor Detail

LockInfo

public LockInfo(LockType type,
                LockScope scope,
                LockDepth depth,
                String owner,
                int timeout,
                String lockToken,
                Date created,
                XMLMarkup ownerInfoFromClient)
Parameters:
type - lock type
scope - lock scope
depth - lock depth
owner - lock owner
timeout - timeout in seconds
lockToken - The lock token must be either an absolute URI (as defined in RFC2396 or a relative URI reference (in which case the opaquelocktoken URI scheme is assumed).
created - creation time
ownerInfoFromClient - A client can submit his own owner information that SHOULD be returned upon lock discovery. If present, the format MUST be the XML serialization of a DAV:owner element.

LockInfo

public LockInfo(LockType type,
                LockScope scope,
                LockDepth depth,
                String owner,
                int timeout,
                String lockToken,
                Date created)

LockInfo

public LockInfo(LockType type,
                LockScope scope,
                LockDepth depth,
                String owner,
                int timeout,
                String lockToken)
Method Detail

getType

public LockType getType()
Specified by:
getType in interface ILockInfo
Returns:
LockType of lock.

getScope

public LockScope getScope()
Specified by:
getScope in interface ILockInfo
Returns:
LockScope of lock.

getDepth

public LockDepth getDepth()
Specified by:
getDepth in interface ILockInfo
Returns:
LockDepth of lock.

getOwner

public String getOwner()
Returns the unique id of the lock owner.

Specified by:
getOwner in interface ILockInfo
Returns:
The unique id of the lock owner.

getTimeout

public int getTimeout()
Specified by:
getTimeout in interface ILockInfo
Returns:
get timeout of seconds.

getClientSuppliedOwner

public XMLMarkup getClientSuppliedOwner()
Description copied from interface: ILockInfo
A client can submit his own owner information that SHOULD be returned upon lock discovery. If present, the format MUST be the XML serialization of a DAV:owner element.

Specified by:
getClientSuppliedOwner in interface ILockInfo
Returns:
lock owner information as submitted by client (may be null if not available).

getExpiration

public Date getExpiration()
The date and time when the lock will expire. Returns null if the lock never times out (infinite).

Specified by:
getExpiration in interface ILockInfo
Returns:
expiration

timeRemaining

public long timeRemaining()
The time remaining until the lock expires. Returns -1 if the lock will never expire.

Specified by:
timeRemaining in interface ILockInfo
Returns:
TBD: Description of the outgoing return value

getLockToken

public String getLockToken()
Description copied from interface: ILockInfo
The lock token must be either an absolute URI (as defined in RFC2396 or a relative URI reference (in which case the opaquelocktoken URI scheme is assumed).

Specified by:
getLockToken in interface ILockInfo
Returns:
lock token.

getCreated

public Date getCreated()
Specified by:
getCreated in interface ILockInfo
Returns:
creation timestamp

equals

public boolean equals(Object o)
Compare this LockInfo with another one or with a String (token)

Overrides:
equals in class Object
Parameters:
o - TBD: Description of the incoming method parameter
Returns:
TBD: Description of the outgoing return value

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice