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.)


Namespace: FileNet.Api.Action
Assembly: FileNet.Api (in filenet.api.dll)

Syntax

Visual Basic (Declaration)
Public Sub New( _ 
   ByVal timeOut As Nullable(Of Long),  _ 
   ByVal owner As String _ 
)
C#
public Lock(
   Nullable<long> timeOut,
   string owner
)
C++
public:
 Lock(
   Nullable<long> timeOut,
   String owner
) sealed 
J#
public Lock(
   Nullable<long> timeOut,
   string owner
)
JScript
public function Lock(
   timeOut : Nullable<long>,
   owner : String
)

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.

Exceptions

Exception TypeCondition
E_REQUIRED_VALUE_ABSENT Thrown if the timeout parameter value is Null. (Thrown by the server on a subsequent call to the Save method.)

See Also