Package org.alfresco.repo.lock.mem
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 theadditionalInfofield - objects assigned to this field MUST implement hashCode and equals methods properly.- Author:
- Matt Ward
- See Also:
- Serialized Form
-
-
Method Summary
-
-
-
Method Detail
-
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)
-
createWithLifetime
public static LockState createWithLifetime(LockState lockState, Lifetime lifetime)
-
createWithAdditionalInfo
public static LockState createWithAdditionalInfo(LockState lockState, String additionalInfo)
-
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 NodeRef getNodeRef()
-
getLockType
public LockType getLockType()
-
getOwner
public String getOwner()
-
getExpires
public Date getExpires()
-
getLifetime
public Lifetime getLifetime()
-
getAdditionalInfo
public String getAdditionalInfo()
-
-