|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.webdav.lock.AbstractActiveLock
org.apache.jackrabbit.webdav.lock.DefaultActiveLock
DefaultActiveLock
implements the ActiveLock
interface
and represents an exclusive write lock with a random uuid lock token.
Lock owner, timeout and depth is retrieved from the LockInfo
object
passed in the constructor. If the lockinfo is null, the following default
values are set:
- timeout is set to infinity. - isDeep is set to true.
Field Summary |
Constructor Summary | |
DefaultActiveLock()
Create a new DefaultActiveLock with default values. |
|
DefaultActiveLock(LockInfo lockInfo)
Create a new lock |
Method Summary | |
String |
getOwner()
Return the name (or id) of the lock owner. |
Scope |
getScope()
This is always an exclusive lock. |
long |
getTimeout()
Return the number of milliseconds the lock will live until it is expired or -1 if the timeout is not available (or the client is not allowed to retrieve it). |
String |
getToken()
Return the lock token. |
Type |
getType()
This is always a write lock. |
boolean |
isDeep()
Return true if the lock is deep. |
boolean |
isExpired()
Returns true, if this lock is already expired. |
boolean |
isLockedByToken(String lockToken)
Return true, if the given token matches the lock token present in this lock thus indicating that any lock relevant operation should not fail due to a lock. |
void |
setIsDeep(boolean isDeep)
Set the lock deepness. |
void |
setOwner(String owner)
Set the name (or id) of the lock owner |
void |
setTimeout(long timeout)
Defines the number of milliseconds until the timeout is reached. |
Methods inherited from class org.apache.jackrabbit.webdav.lock.AbstractActiveLock |
toXml |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultActiveLock()
DefaultActiveLock
with default values.
public DefaultActiveLock(LockInfo lockInfo)
lockInfo
-
IllegalArgumentException
- if either scope or type is invalid.Method Detail |
public boolean isLockedByToken(String lockToken)
ActiveLock
lockToken
- to be checked
ActiveLock.isLockedByToken(String)
public boolean isExpired()
ActiveLock
ActiveLock.isExpired()
public String getToken()
ActiveLock
ActiveLock.getToken()
public String getOwner()
ActiveLock
ActiveLock.getOwner()
public void setOwner(String owner)
ActiveLock
owner
- ActiveLock.setOwner(String)
public long getTimeout()
ActiveLock
ActiveLock.getTimeout()
public void setTimeout(long timeout)
ActiveLock
timeout
- ActiveLock.setTimeout(long)
public boolean isDeep()
ActiveLock
ActiveLock.isDeep()
public void setIsDeep(boolean isDeep)
ActiveLock
isDeep
- ActiveLock.setIsDeep(boolean)
public Type getType()
Type.WRITE
public Scope getScope()
Scope.EXCLUSIVE
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |