SAP NetWeaver '04

com.sapportals.wcm.repository
Class LockInfo

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.framework_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.repository.LockInfo
All Implemented Interfaces:
ILockInfo
Direct Known Subclasses:
ExtendedLockInfo

public class LockInfo
extends java.lang.Object
implements ILockInfo

This object represents an active lock on a resource.

Copyright 2004 SAP AG


Field Summary
protected  XMLMarkup clientSuppliedOwner
           
protected  java.util.Date created
           
protected  LockDepth depth
           
protected  java.util.Date expiration
           
static int LOCK_TIMEOUT_INFINITE
           
protected  java.lang.String lockToken
           
protected  java.lang.String owner
           
protected  LockScope scope
           
protected  int timeout
          Timeout in seconds
protected  LockType type
           
 
Constructor Summary
LockInfo(LockType type, LockScope scope, LockDepth depth, java.lang.String owner, int timeout, java.lang.String lockToken)
           
LockInfo(LockType type, LockScope scope, LockDepth depth, java.lang.String owner, int timeout, java.lang.String lockToken, java.util.Date created)
           
LockInfo(LockType type, LockScope scope, LockDepth depth, java.lang.String owner, int timeout, java.lang.String lockToken, java.util.Date created, XMLMarkup ownerInfoFromClient)
           
 
Method Summary
 boolean equals(java.lang.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.
 java.util.Date getCreated()
           
 LockDepth getDepth()
           
 java.util.Date getExpiration()
          The date and time when the lock will expire.
 java.lang.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).
 java.lang.String getOwner()
           
 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

type

protected LockType type

scope

protected LockScope scope

depth

protected LockDepth depth

owner

protected java.lang.String owner

clientSuppliedOwner

protected XMLMarkup clientSuppliedOwner

lockToken

protected java.lang.String lockToken

timeout

protected int timeout
Timeout in seconds

expiration

protected java.util.Date expiration

created

protected java.util.Date created
Constructor Detail

LockInfo

public LockInfo(LockType type,
                LockScope scope,
                LockDepth depth,
                java.lang.String owner,
                int timeout,
                java.lang.String lockToken,
                java.util.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,
                java.lang.String owner,
                int timeout,
                java.lang.String lockToken,
                java.util.Date created)

LockInfo

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

getType

public LockType getType()
Specified by:
getType in interface ILockInfo
Following copied from interface: com.sapportals.wcm.repository.ILockInfo
Returns:
LockType of lock.

getScope

public LockScope getScope()
Specified by:
getScope in interface ILockInfo
Following copied from interface: com.sapportals.wcm.repository.ILockInfo
Returns:
LockScope of lock.

getDepth

public LockDepth getDepth()
Specified by:
getDepth in interface ILockInfo
Following copied from interface: com.sapportals.wcm.repository.ILockInfo
Returns:
LockDepth of lock.

getOwner

public java.lang.String getOwner()
Specified by:
getOwner in interface ILockInfo
Following copied from interface: com.sapportals.wcm.repository.ILockInfo
Returns:
user id of lock owner.

getTimeout

public int getTimeout()
Specified by:
getTimeout in interface ILockInfo
Following copied from interface: com.sapportals.wcm.repository.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
Following copied from interface: com.sapportals.wcm.repository.ILockInfo
Returns:
lock owner information as submitted by client (may be null if not available).

getExpiration

public java.util.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 java.lang.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
Following copied from interface: com.sapportals.wcm.repository.ILockInfo
Returns:
lock token.

getCreated

public java.util.Date getCreated()
Specified by:
getCreated in interface ILockInfo
Following copied from interface: com.sapportals.wcm.repository.ILockInfo
Returns:
creation timestamp

equals

public boolean equals(java.lang.Object o)
Compare this LockInfo with another one or with a String (token)
Overrides:
equals in class java.lang.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 java.lang.Object

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.