|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.webdav.lock.AbstractActiveLock org.apache.jackrabbit.webdav.jcr.lock.JcrActiveLock
public class JcrActiveLock
JcrActiveLock
wraps a JCR lock
object.
Field Summary |
---|
Constructor Summary | |
---|---|
JcrActiveLock(Lock lock)
Create a new ActiveLock object with type 'write '
and scope 'exclusive '. |
|
JcrActiveLock(Lock lock,
boolean sessionScoped)
Create a new ActiveLock object with type 'write '
and scope 'exclusive '. |
Method Summary | |
---|---|
String |
getOwner()
Return the name (or id) of the lock owner. |
Scope |
getScope()
Return the scope of this lock. |
long |
getTimeout()
Since jcr locks do not reveal the time left until they expire, DavConstants.INFINITE_TIMEOUT
is returned. |
String |
getToken()
Return the lock token if the Session that optained the lock
is the lock token holder, null otherwise.NOTE: currently the token generated by the underlying JCR repository is not checked for compliance with RFC 2518 ("OpaqueLockToken-URI = "opaquelocktoken:" UUID [Extension] ; The UUID production is the string representation of a UUID, as defined in [ISO-11578]. |
Type |
getType()
Always returns Type.WRITE . |
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 lock token equals the token holding that 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)
Throws UnsupportedOperationException |
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 |
Methods inherited from interface org.apache.jackrabbit.webdav.xml.XmlSerializable |
---|
toXml |
Constructor Detail |
---|
public JcrActiveLock(Lock lock)
ActiveLock
object with type 'write
'
and scope 'exclusive
'.
lock
- public JcrActiveLock(Lock lock, boolean sessionScoped)
ActiveLock
object with type 'write
'
and scope 'exclusive
'.
lock
- Method Detail |
---|
public boolean isLockedByToken(String lockToken)
isLockedByToken
in interface ActiveLock
lockToken
-
ActiveLock.isLockedByToken(String)
public boolean isExpired()
ActiveLock
isExpired
in interface ActiveLock
ActiveLock.isExpired()
public String getToken()
Session
that optained the lock
is the lock token holder, null
otherwise.
getToken
in interface ActiveLock
ActiveLock.getToken()
public String getOwner()
ActiveLock
getOwner
in interface ActiveLock
ActiveLock.getOwner()
public void setOwner(String owner)
ActiveLock
setOwner
in interface ActiveLock
ActiveLock.setOwner(String)
public long getTimeout()
DavConstants.INFINITE_TIMEOUT
is returned. A missing timeout causes problems with Microsoft clients.
getTimeout
in interface ActiveLock
DavConstants.INFINITE_TIMEOUT
ActiveLock.getTimeout()
public void setTimeout(long timeout)
UnsupportedOperationException
setTimeout
in interface ActiveLock
ActiveLock.setTimeout(long)
public boolean isDeep()
ActiveLock
isDeep
in interface ActiveLock
ActiveLock.isDeep()
public void setIsDeep(boolean isDeep)
ActiveLock
setIsDeep
in interface ActiveLock
ActiveLock.setIsDeep(boolean)
public Type getType()
Type.WRITE
.
getType
in interface ActiveLock
Type.WRITE
ActiveLock.getType()
public Scope getScope()
ActiveLock
getScope
in interface ActiveLock
exclusive
or exlusive session scoped
lock.ActiveLock.getScope()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |