|
Oracle Beehive Java Content Repository Java API Reference Release 1 (1.5) E14840-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OracleLock
Represents a lock placed on an item.
Method Summary | |
---|---|
java.lang.String |
getLockOwner() Returns the user ID of the user who owns this lock. |
java.lang.String |
getLockToken() May return the lock token for this lock. |
javax.jcr.Node |
getNode() Returns the lock holding node. |
boolean |
isDeep() Returns false always since deep locks are not supported in t the current implementation. |
boolean |
isLive() Returns true if this Lock object represents a lock that is currently in effect. |
boolean |
isSessionScoped() Returns true if this is a session-scoped lock. |
void |
refresh() This method has no effect as in the current implementation. |
Method Detail |
---|
java.lang.String getLockOwner()
jcr:lockOwner
property of the lock-holding node. It is also the value returned by Session.getUserID
at the time that the lock was placed. The lock owner's identity is only provided for informational purposes. It does not govern who can perform an unlock or make changes to the locked nodes; that depends entirely upon who the token holder is.getLockOwner
in interface javax.jcr.lock.Lock
boolean isDeep()
false
always since deep locks are not supported in t the current implementation.isDeep
in interface javax.jcr.lock.Lock
javax.jcr.Node getNode()
N.getLock().getNode()
(where N
is a locked node) will only return N
if N
is the lock holder. If N
is in the subtree of the lock holder, H
, then this call will return H
if the user is different from the one locked it. Otherwise, it throws LockException saying node is not locked. Because in CSI if the parent entity is locked by a user and it's child entity is queried of its locked status, its not possible to say that its parent is locked.getNode
in interface javax.jcr.lock.Lock
Node
.java.lang.String getLockToken()
Session
holds the lock token for this lock, then this method will return that lock token. If this Session
does not hold the applicable lock token then this method will return null.getLockToken
in interface javax.jcr.lock.Lock
String
.boolean isLive() throws javax.jcr.RepositoryException
Lock
object represents a lock that is currently in effect. If this lock has been unlocked then it returns false
. Note that this method is intended for those cases where one is holding a Lock
Java object and wants to find out whether the lock (the JCR-level entity that is attached to the lockable node) that this object originally represented still exists. For example, a explicit unlock
will remove a lock from a node but the Lock
Java object corresponding to that lock may still exist, and in that case its isLive
method will return false
.isLive
in interface javax.jcr.lock.Lock
boolean
.javax.jcr.RepositoryException
- if an error occurs.boolean isSessionScoped()
true
if this is a session-scoped lock. Returns false
if this is an open-scoped lock.isSessionScoped
in interface javax.jcr.lock.Lock
boolean
.void refresh() throws javax.jcr.lock.LockException, javax.jcr.RepositoryException
Session
does not hold the correct lock token for this lock.refresh
in interface javax.jcr.lock.Lock
javax.jcr.lock.LockException
- if this Session
does not hold the correct lock token for this lock.javax.jcr.RepositoryException
- if another error occurs.
|
Oracle Beehive Java Content Repository Java API Reference Release 1 (1.5) E14840-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |