com.sapportals.wcm.repository

Class LockInfo

java.lang.Object
  extended bycom.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 user 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 user id of the lock owner.

Specified by:
getOwner in interface ILockInfo
Returns:
The user id of the lock owner as specified by the com.sapportals.usermanagement API.

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)

Parameters:
o - TBD: Description of the incoming method parameter
Returns:
TBD: Description of the outgoing return value

hashCode

public int hashCode()


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. 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.