Class LockState

java.lang.Object
org.alfresco.repo.lock.mem.LockState
All Implemented Interfaces:
Serializable

public final class LockState extends Object implements Serializable
Value class describing the lock state of a node. Lock specific properties may be added using the additionalInfo field - objects assigned to this field MUST implement hashCode and equals methods properly.
Author:
Matt Ward
See Also:
  • Method Details

    • createLock

      public static LockState createLock(NodeRef nodeRef, LockType lockType, String owner, Date expires, Lifetime lifetime, String additionalInfo)
    • createWithLockType

      public static LockState createWithLockType(LockState lockState, LockType lockType)
    • createWithOwner

      public static LockState createWithOwner(LockState lockState, String owner)
    • createWithExpires

      public static LockState createWithExpires(LockState lockState, Date expires)
    • createWithLifetime

      public static LockState createWithLifetime(LockState lockState, Lifetime lifetime)
    • createWithAdditionalInfo

      public static LockState createWithAdditionalInfo(LockState lockState, String additionalInfo)
    • createUnlocked

      public static LockState createUnlocked(NodeRef nodeRef, String additionalInfo)
    • createUnlocked

      public static LockState createUnlocked(NodeRef nodeRef)
    • isLockInfo

      public boolean isLockInfo()
      Returns whether this LockState is for a lock or whether there is no lock defined for the node. If a lock is defined for a node, that does not mean that the node is locked - the LockService must be used to determine that.
      Returns:
      true if there is a lock defined for the node.
    • getNodeRef

      public NodeRef getNodeRef()
    • getLockType

      public LockType getLockType()
    • getOwner

      public String getOwner()
    • getExpires

      public Date getExpires()
    • getLifetime

      public Lifetime getLifetime()
    • getAdditionalInfo

      public String getAdditionalInfo()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object