com.filenet.api.action

Class Lock

  • All Implemented Interfaces:
    java.io.Serializable


    public class Lock
    extends PendingAction
    Represents a pending action for locking an object. 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 Detail

      • 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.)
    • Method Detail

      • 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, 2013. All rights reserved.