com.ibm.commerce.context.content.locking

Class LockData

  • java.lang.Object
    • com.ibm.commerce.context.content.locking.LockData
  • All Implemented Interfaces:
    java.io.Serializable


    public class LockData
    extends java.lang.Object
    implements java.io.Serializable
    This class represents the metadata associated with the content managed updates of a business object. This data object contains the attributes that are associated with a managed resource when it is locked.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      LockData()
      This is the default constructor for this class.
      LockData(LockingPolicy lockingPolicy)
      This is a constructor for this class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getAction()
      This method returns the action that is associated with the action performed on the managed resource that the locking data represents.
      LockingPolicy getLockingPolicy()
      This method returns the locking policy assigned to the locking data.
      java.sql.Timestamp getLockTimestamp()
      This method returns when the metadata associated with the lock that was created.
      ManagedResourceKey getManagedResourceKey()
      This method returns the managed resource key which represents the external and internal unique key to identify the managed resource.
      java.lang.Long getMemberId()
      This method returns the user identifier associated with the modification of the managed resource.
      java.lang.String getTask()
      This method returns the task identifier associated with the modification of the managed resource.
      java.lang.String getTaskGroup()
      This method returns the task group identifier associated with the modification of the managed resource.
      java.lang.String getWorkspace()
      This method returns the workspace identifier associated with the modification of the managed resource.
      boolean isLocked(ActivityToken activityToken)
      This method returns whether the business object is considered to be locked so the current request cannot modify it.
      void setAction(java.lang.String action)
      This method sets the action associated with the reason why the lock is created for the managed resource.
      void setLockingPolicy(LockingPolicy policy)
      This method sets the locking policy to associate with the locking data.
      void setLockTimestamp(java.sql.Timestamp timestamp)
      This method sets the date and time the lock should be created.
      void setManagedResourceKey(ManagedResourceKey resourceKey)
      This method sets the unique key to identify the managed resource.
      void setMemberId(java.lang.Long memberId)
      This method sets the user identifier associated with why the managed resource will be locked.
      void setTask(java.lang.String task)
      This method sets the task identifier associated with why the managed resource will be locked.
      void setTaskGroup(java.lang.String taskgroup)
      This method sets the task group identifier associated with why the managed resource will be locked.
      void setWorkspace(java.lang.String workspace)
      This method sets the workspace identifier associated with why the managed resource will be locked.
      java.lang.String toString()
      This method returns a string representation of the object.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LockData

        public LockData()
        This is the default constructor for this class. It calls the constructor from the superclass.
      • LockData

        public LockData(LockingPolicy lockingPolicy)
        This is a constructor for this class. It creates an instance of a lock data object using the locking policy passed to it as a parameter.
        Parameters:
        lockingPolicy - The locking policy associated with the lock data.
    • Method Detail

      • toString

        public java.lang.String toString()
        This method returns a string representation of the object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the object.
      • getAction

        public java.lang.String getAction()
        This method returns the action that is associated with the action performed on the managed resource that the locking data represents. This action will either represent a new, update or delete operation.
        Returns:
        The action associated with the locking data.
      • getLockTimestamp

        public java.sql.Timestamp getLockTimestamp()
        This method returns when the metadata associated with the lock that was created. This is the date and time when the lock was first created.
        Returns:
        The date and time when the lock was created.
      • getMemberId

        public java.lang.Long getMemberId()
        This method returns the user identifier associated with the modification of the managed resource. This may be null if the resource was locked by an external utility.
        Returns:
        The user identifier associated with the locking of the managed resource.
      • getTask

        public java.lang.String getTask()
        This method returns the task identifier associated with the modification of the managed resource. If no task identifier is associated with the lock, then null will be returned.
        Returns:
        The task identifier of the lock data.
      • getTaskGroup

        public java.lang.String getTaskGroup()
        This method returns the task group identifier associated with the modification of the managed resource. If no task group identifier is associated with the lock, then null will be returned.
        Returns:
        The task group identifier of the lock data.
      • getWorkspace

        public java.lang.String getWorkspace()
        This method returns the workspace identifier associated with the modification of the managed resource. If no workspace identifier is associated with the lock, then null will be returned.
        Returns:
        The workspace identifier of the lock data.
      • setAction

        public void setAction(java.lang.String action)
        This method sets the action associated with the reason why the lock is created for the managed resource.
        Parameters:
        action - The action that is associated with the reason for why the lock is created.
      • setLockTimestamp

        public void setLockTimestamp(java.sql.Timestamp timestamp)
        This method sets the date and time the lock should be created.
        Parameters:
        timestamp - The date and time when the lock is created.
      • setMemberId

        public void setMemberId(java.lang.Long memberId)
        This method sets the user identifier associated with why the managed resource will be locked.
        Parameters:
        memberId - The user identifier to associate with the locking of the managed resource.
      • setTask

        public void setTask(java.lang.String task)
        This method sets the task identifier associated with why the managed resource will be locked.
        Parameters:
        task - The task identifier to associate with the locking of the managed resource.
      • setTaskGroup

        public void setTaskGroup(java.lang.String taskgroup)
        This method sets the task group identifier associated with why the managed resource will be locked.
        Parameters:
        taskgroup - The task group identifier to associate with the locking of the managed resource.
      • setWorkspace

        public void setWorkspace(java.lang.String workspace)
        This method sets the workspace identifier associated with why the managed resource will be locked.
        Parameters:
        workspace - The workspace identifier to associate with the locking of the managed resource.
      • getManagedResourceKey

        public ManagedResourceKey getManagedResourceKey()
        This method returns the managed resource key which represents the external and internal unique key to identify the managed resource. This represents the managed resource that the lock is associated with.
        Returns:
        The unique key to identify the managed resource.
      • setManagedResourceKey

        public void setManagedResourceKey(ManagedResourceKey resourceKey)
        This method sets the unique key to identify the managed resource. This represents the managed resource that the lock is associated with.
        Parameters:
        resourceKey - The unique key to identify the managed resource.
      • isLocked

        public boolean isLocked(ActivityToken activityToken)
        This method returns whether the business object is considered to be locked so the current request cannot modify it.
        Parameters:
        activityToken - The current activity.
        Returns:
        Whether the business object is locked.
      • getLockingPolicy

        public LockingPolicy getLockingPolicy()
        This method returns the locking policy assigned to the locking data.
        Returns:
        The locking policy.
      • setLockingPolicy

        public void setLockingPolicy(LockingPolicy policy)
        This method sets the locking policy to associate with the locking data.
        Parameters:
        policy - The locking policy.