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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LockStatecreateLock(org.alfresco.service.cmr.repository.NodeRef nodeRef, LockType lockType, String owner, Date expires, Lifetime lifetime, String additionalInfo)static LockStatecreateUnlocked(org.alfresco.service.cmr.repository.NodeRef nodeRef)static LockStatecreateUnlocked(org.alfresco.service.cmr.repository.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)booleanequals(Object obj)StringgetAdditionalInfo()DategetExpires()LifetimegetLifetime()LockTypegetLockType()org.alfresco.service.cmr.repository.NodeRefgetNodeRef()StringgetOwner()inthashCode()booleanisLockInfo()Returns whether thisLockStateis for a lock or whether there is no lock defined for the node.StringtoString()
-
-
-
Method Detail
-
createLock
public static LockState createLock(org.alfresco.service.cmr.repository.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)
-
createUnlocked
public static LockState createUnlocked(org.alfresco.service.cmr.repository.NodeRef nodeRef, 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 String getOwner()
-
getExpires
public Date getExpires()
-
getLifetime
public Lifetime getLifetime()
-
getAdditionalInfo
public String getAdditionalInfo()
-
-