Class LockState

  • All Implemented Interfaces:
    java.io.Serializable

    public final class LockState
    extends java.lang.Object
    implements java.io.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:
    Serialized Form
    • Method Detail

      • createLock

        public static LockState createLock​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                           LockType lockType,
                                           java.lang.String owner,
                                           java.util.Date expires,
                                           Lifetime lifetime,
                                           java.lang.String additionalInfo)
      • createWithOwner

        public static LockState createWithOwner​(LockState lockState,
                                                java.lang.String owner)
      • createWithExpires

        public static LockState createWithExpires​(LockState lockState,
                                                  java.util.Date expires)
      • createWithAdditionalInfo

        public static LockState createWithAdditionalInfo​(LockState lockState,
                                                         java.lang.String additionalInfo)
      • createUnlocked

        public static LockState createUnlocked​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                               java.lang.String additionalInfo)
      • createUnlocked

        public static LockState createUnlocked​(org.alfresco.service.cmr.repository.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 org.alfresco.service.cmr.repository.NodeRef getNodeRef()
      • getLockType

        public LockType getLockType()
      • getOwner

        public java.lang.String getOwner()
      • getExpires

        public java.util.Date getExpires()
      • getLifetime

        public Lifetime getLifetime()
      • getAdditionalInfo

        public java.lang.String getAdditionalInfo()
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object