Oracle Content Management SDK

oracle.ifs.beans
Class LockObjectDefinition

java.lang.Object
  |
  +--oracle.ifs.beans.LibraryObjectDefinition
        |
        +--oracle.ifs.beans.SystemObjectDefinition
              |
              +--oracle.ifs.beans.LockObjectDefinition
Direct Known Subclasses:
SystemLockObjectDefinition

public class LockObjectDefinition
extends SystemObjectDefinition

The LockObjectDefinition class is used to define an instance of a LockObject. The only attribute that is required to be set on a LockObjectDefinition is the LockState. Refer to the documentation for LockObject for a definition of the various lock states supported out-of-the-box.
The LockHolder and LockedForSession attributes are automatically set by the server for USERLOCK's and SESSIONLOCK's respectively. The LockTimeOut is used for time based locks and it is the actual time at which the Lock on a PublicObject should expire.
After constructing this definition, use po.lock(LockObjectDefinition) to lock the PublicObject.


Constructor Summary
LockObjectDefinition(LibrarySession session)
          Constructs a LockObjectDefinition explicitly capturing the session.
 
Method Summary
 int getLockState()
          get the value for the lockstate of this lock
 java.util.Date getLockTimeOut()
          get the value for the TimeOut of this lock
 void setLockState(int ls)
          Set the LockState for the LockObject
 void setLockTimeOut(java.util.Date timeout)
          Set the LockTime Out for the LockObject
 
Methods inherited from class oracle.ifs.beans.LibraryObjectDefinition
clone, getAttribute, getAttributes, getClassObject, getOption, getOptionKeys, removeAttribute, removeOption, setAttribute, setAttribute, setAttributeByUpperCaseName, setAttributes, setClassObject, setOption
 

Constructor Detail


LockObjectDefinition

public LockObjectDefinition(LibrarySession session)
                     throws IfsException
Constructs a LockObjectDefinition explicitly capturing the session.
Parameters:
session - the session
Throws:
IfsException - if the operation fails
Method Detail

setLockState

public void setLockState(int ls)
                  throws IfsException
Set the LockState for the LockObject
Parameters:
lockstate - the integer LockState to be set
Throws:
IfsException - if the operation fails
See Also:
LockObject

getLockState

public int getLockState()
                 throws IfsException
get the value for the lockstate of this lock
Returns:
the integer LockState
Throws:
IfsException - if the operation fails

setLockTimeOut

public void setLockTimeOut(java.util.Date timeout)
                    throws IfsException
Set the LockTime Out for the LockObject
Parameters:
locktimeout - the actual time at which this lock should automatically expire
Throws:
IfsException - if the operation fails
See Also:
LockObject

getLockTimeOut

public java.util.Date getLockTimeOut()
                              throws IfsException
get the value for the TimeOut of this lock
Returns:
the timeout value for this lock
Throws:
IfsException - if the operation fails

Oracle Content Management SDK

(c) 2002 Copyright Oracle Corporation. All rights reserved.