public interface LockInfo
Modifier and Type | Method and Description |
---|---|
void |
addSharedLockToken(String token)
Adds new shared lock token to sharedLockTokens list.
|
String |
getDepth()
Returns lock depth
|
String |
getExclusiveLockToken()
Getter for exclusive lock token.
|
Date |
getExpires()
Retrieve the expiry date/time for this lock, or null if it never expires.
|
String |
getOwner()
Retrieves the username of the lock owner.
|
long |
getRemainingTimeoutSeconds()
Retrieve the remaining time before the lock expires, in seconds
|
String |
getScope()
Returns lock scope
|
Set<String> |
getSharedLockTokens()
Getter for sharedLockTokens list.
|
boolean |
isExclusive()
Is it an exclusive lock?
|
boolean |
isExpired()
Whether this lock has expired.
|
boolean |
isLocked()
Returns true if node has shared or exclusive locks
|
boolean |
isShared()
Is it a shared lock?
|
void |
setDepth(String depth)
Setter for lock depth
|
void |
setExclusiveLockToken(String token)
Setter for exclusive lock token
|
void |
setExpires(Date expires)
Set the expiry date/time for this lock.
|
void |
setOwner(String owner)
Set the username of who owns the lock.
|
void |
setScope(String scope)
Setter for lock scope.
|
void |
setSharedLockTokens(Set<String> sharedLockTokens)
Setter for sharedLockTokens list.
|
void |
setTimeoutMinutes(int lockTimeoutMins)
Sets the expiry date/time to lockTimeout minutes into the future.
|
void |
setTimeoutSeconds(int lockTimeoutSecs)
Sets the expiry date/time to lockTimeout seconds into the future.
|
String |
toJSON()
Return the lock info as a JSON string
|
boolean isLocked()
void setExclusiveLockToken(String token)
token
- Lock tokenString getExclusiveLockToken()
void setScope(String scope)
scope
- StringString getScope()
void setDepth(String depth)
depth
- lock depthString getDepth()
void setSharedLockTokens(Set<String> sharedLockTokens)
void addSharedLockToken(String token)
token
- The token to add.boolean isShared()
String toJSON()
boolean isExpired()
boolean isExclusive()
String getOwner()
void setOwner(String owner)
owner
- Owner's usernamevoid setExpires(Date expires)
expires
- the expires to setDate getExpires()
long getRemainingTimeoutSeconds()
void setTimeoutSeconds(int lockTimeoutSecs)
lockTimeoutSecs
- intvoid setTimeoutMinutes(int lockTimeoutMins)
lockTimeoutMins
- intCopyright © 2005–2017 Alfresco Software. All rights reserved.