com.filenet.api.action
Class Lock
java.lang.Object
com.filenet.api.action.PendingAction
com.filenet.api.action.Lock
- All Implemented Interfaces:
- java.io.Serializable
public class Lock
- extends PendingAction
Represents a “lock” pending action. Calling a method that locks an object
automatically creates an instance of Lock
, which is then added
to the underlying object’s PendingActions
collection.
- See Also:
- Serialized Form
Constructor Summary |
Lock(java.lang.Long timeOut,
java.lang.String owner)
Creates a new instance of a Lock pending action object initialized with
the specified parameters. |
Method Summary |
java.lang.String |
getOwner()
Returns a String containing the intended value of the
LockOwner property of the underlying object. |
java.lang.Long |
getTimeout()
Returns the number of seconds that the underlying object is intended to be
locked. |
Methods inherited from class com.filenet.api.action.PendingAction |
getBinaryListValue, getBinaryValue, getBooleanListValue, getBooleanValue, getDateTimeListValue, getDateTimeValue, getEngineObjectValue, getFloat64ListValue, getFloat64Value, getIdListValue, getIdValue, getInteger32ListValue, getInteger32Value, getObjectValue, getStringListValue, getStringValue, putObjectValue, putValue, putValue, putValue, putValue, putValue, putValue, putValue, putValue, putValue, putValue, putValue, putValue, putValue, putValue, putValue, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Lock
public Lock(java.lang.Long timeOut,
java.lang.String owner)
- Creates a new instance of a
Lock
pending action object initialized with
the specified parameters. You typically do not need to explicitly create a Lock
instance.
Calling lock-related methods creates an instance of Lock
and adds it to the underlying object's
PendingActions
collection. (See the lock
,
updateLock
, fetchAndLockObject
, and unlock
methods.)
- Parameters:
timeOut
- The new value for the underlying object’s LockTimeout
property. The timeout value is the number of seconds that the object is intended to
be locked.
owner
- A String
specifying the intended owner of the lock.
The value of this property is simply a custom string that has no real effect in determining the user of the lock.
The owner specified by this property is not validated against any user or group known to the Content Engine.
This value can be any string, and is used to populate
the underlying object’s LockOwner
property. It does not
represent the actual user of the lock, which is recorded internally by
the server. If not supplied, defaults to the short principal name of the requesting user.
- Throws:
E_REQUIRED_VALUE_ABSENT
- if timeout
parameter value is null
.
(Thrown by the server on a subsequent save
call.)
getTimeout
public java.lang.Long getTimeout()
- Returns the number of seconds that the underlying object is intended to be
locked.
- Returns:
- The lock timeout value.
getOwner
public java.lang.String getOwner()
- Returns a
String
containing the intended value of the
LockOwner
property of the underlying object.
- Returns:
- A
String
containing the name of the user holding the lock.
© Copyright IBM Corporation 2006, 2008. All rights reserved.