Package org.alfresco.repo.lock.mem
Class LockState
- java.lang.Object
-
- org.alfresco.repo.lock.mem.LockState
-
- All Implemented Interfaces:
java.io.Serializable
public final class LockState extends java.lang.Object implements java.io.SerializableValue class describing the lock state of a node. Lock specific properties may be added using theadditionalInfofield - objects assigned to this field MUST implement hashCode and equals methods properly.- Author:
- Matt Ward
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LockStatecreateLock(org.alfresco.service.cmr.repository.NodeRef nodeRef, LockType lockType, java.lang.String owner, java.util.Date expires, Lifetime lifetime, java.lang.String additionalInfo)static LockStatecreateUnlocked(org.alfresco.service.cmr.repository.NodeRef nodeRef)static LockStatecreateUnlocked(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.lang.String additionalInfo)static LockStatecreateWithAdditionalInfo(LockState lockState, java.lang.String additionalInfo)static LockStatecreateWithExpires(LockState lockState, java.util.Date expires)static LockStatecreateWithLifetime(LockState lockState, Lifetime lifetime)static LockStatecreateWithLockType(LockState lockState, LockType lockType)static LockStatecreateWithOwner(LockState lockState, java.lang.String owner)booleanequals(java.lang.Object obj)java.lang.StringgetAdditionalInfo()java.util.DategetExpires()LifetimegetLifetime()LockTypegetLockType()org.alfresco.service.cmr.repository.NodeRefgetNodeRef()java.lang.StringgetOwner()inthashCode()booleanisLockInfo()Returns whether thisLockStateis for a lock or whether there is no lock defined for the node.java.lang.StringtoString()
-
-
-
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)
-
createWithLockType
public static LockState createWithLockType(LockState lockState, LockType lockType)
-
createWithOwner
public static LockState createWithOwner(LockState lockState, java.lang.String owner)
-
createWithExpires
public static LockState createWithExpires(LockState lockState, java.util.Date expires)
-
createWithLifetime
public static LockState createWithLifetime(LockState lockState, Lifetime lifetime)
-
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 thisLockStateis 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 - theLockServicemust 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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-