Package org.alfresco.repo.lock.mem
Class LockState
java.lang.Object
org.alfresco.repo.lock.mem.LockState
- All Implemented Interfaces:
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 Summary
Modifier and TypeMethodDescriptionstatic LockStatecreateLock(NodeRef nodeRef, LockType lockType, String owner, Date expires, Lifetime lifetime, String additionalInfo) static LockStatecreateUnlocked(NodeRef nodeRef) static LockStatecreateUnlocked(NodeRef nodeRef, String additionalInfo) static LockStatecreateWithAdditionalInfo(LockState lockState, String additionalInfo) static LockStatecreateWithExpires(LockState lockState, Date expires) static LockStatecreateWithLifetime(LockState lockState, Lifetime lifetime) static LockStatecreateWithLockType(LockState lockState, LockType lockType) static LockStatecreateWithOwner(LockState lockState, String owner) booleangetOwner()inthashCode()booleanReturns whether thisLockStateis for a lock or whether there is no lock defined for the node.toString()
-
Method Details
-
createLock
-
createWithLockType
-
createWithOwner
-
createWithExpires
-
createWithLifetime
-
createWithAdditionalInfo
-
createUnlocked
-
createUnlocked
-
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
-
getLockType
-
getOwner
-
getExpires
-
getLifetime
-
getAdditionalInfo
-
hashCode
public int hashCode() -
equals
-
toString
-