|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Lock helper class.
Method Summary | |
void |
checkLock(SlideToken slideToken,
ObjectNode object,
ActionNode action)
Utility function for lock checking. |
void |
checkLock(SlideToken slideToken,
ObjectNode subject,
SubjectNode user,
ActionNode action)
Check locking for a specific action and credential. |
java.util.Enumeration |
enumerateLocks(SlideToken slideToken,
java.lang.String objectUri)
Enumerate locks on a subject, including any locks inherited from parent subjects. |
java.util.Enumeration |
enumerateLocks(SlideToken slideToken,
java.lang.String objectUri,
boolean inherited)
Enumerate locks on a subject, optionally excluding locks inherited from parent subjects. |
boolean |
isLocked(SlideToken slideToken,
NodeLock token,
boolean tryToLock)
Tests if an element is locked. |
boolean |
isLocked(SlideToken slideToken,
ObjectNode subject,
SubjectNode user,
ActionNode action,
boolean tryToLock)
Tests if an element is locked. |
boolean |
isLocked(SlideToken slideToken,
ObjectNode subject,
SubjectNode user,
ActionNode action,
boolean inheritance,
boolean tryToLock)
Tests if an element is locked. |
void |
kill(SlideToken slideToken,
SubjectNode subject)
Kills locks. |
void |
lock(SlideToken slideToken,
NodeLock token)
Put a lock on a subject. |
void |
renew(SlideToken slideToken,
NodeLock token,
java.util.Date newExpirationDate)
Renew a lock. |
void |
renew(SlideToken slideToken,
java.lang.String objectUri,
java.lang.String lockId,
java.util.Date newExpirationDate)
Renew a set of linked locks. |
boolean |
unlock(SlideToken slideToken,
NodeLock token)
Removes a lock. |
void |
unlock(SlideToken slideToken,
java.lang.String objectUri,
java.lang.String lockId)
Removes a set of linked locks. |
Method Detail |
public void lock(SlideToken slideToken, NodeLock token) throws ServiceAccessException, ObjectIsAlreadyLockedException, AccessDeniedException, ObjectNotFoundException
crendentialsToken
- Credentials tokentoken
- Object containing all the lock informationServiceAccessException
- Low level service access exceptionObjectNotFoundException
- One of the objects referenced
in the lock token were not foundObjectIsAlreadyLockedException
- Object is already locked
with an incompatible lock tokenAccessDeniedException
- Insufficient credentials to allow
object lockingpublic boolean unlock(SlideToken slideToken, NodeLock token) throws ServiceAccessException, LockTokenNotFoundException
crendentialsToken
- Credentials tokentoken
- Object containing all the lock informationtrue
if the lock was successfully removedServiceAccessException
- Low level service access exceptionLockTokenNotFoundException
- Cannot find the Lock in the
Lock Store servicepublic void unlock(SlideToken slideToken, java.lang.String objectUri, java.lang.String lockId) throws ServiceAccessException, LockTokenNotFoundException, ObjectNotFoundException
crendentialsToken
- Credentials tokentoken
- Object containing all the lock informationServiceAccessException
- Low level service access exceptionLockTokenNotFoundException
- Cannot find the Lock in the
Lock Store serviceObjectNotFoundException
- One of the objects referenced
in the lock token were not foundpublic void renew(SlideToken slideToken, NodeLock token, java.util.Date newExpirationDate) throws ServiceAccessException, LockTokenNotFoundException
crendentialsToken
- Credentials tokentoken
- Object containing the lock info, as well as the new
desired expiration dateServiceAccessException
- Low level service access exceptionLockTokenNotFoundException
- Cannot find the Lock in the
Lock Store servicepublic void renew(SlideToken slideToken, java.lang.String objectUri, java.lang.String lockId, java.util.Date newExpirationDate) throws ServiceAccessException, LockTokenNotFoundException, ObjectNotFoundException
crendentialsToken
- Credentials tokentoken
- Object containing the lock info, as well as the new
desired expiration dateServiceAccessException
- Low level service access exceptionLockTokenNotFoundException
- Cannot find the Lock in the
Lock Store serviceObjectNotFoundException
- One of the objects referenced
in the lock token were not foundpublic void kill(SlideToken slideToken, SubjectNode subject) throws ServiceAccessException, AccessDeniedException, LockTokenNotFoundException, ObjectNotFoundException
crendentialsToken
- Credentials tokensubject
- Subject on which locks are to be removedServiceAccessException
- Low level service access exceptionObjectNotFoundException
- One of the objects referenced
in the lock token were not foundLockTokenNotFoundException
- Cannot find the Lock in the
Lock Store serviceAccessDeniedException
- Insufficient credentials to allow
forced removal of lockspublic java.util.Enumeration enumerateLocks(SlideToken slideToken, java.lang.String objectUri) throws ServiceAccessException, ObjectNotFoundException, LockTokenNotFoundException
slideToken
- the slide tokenobjectUri
- the URI of the object of which we want to enumerate
active locksServiceAccessException
- low level service access exceptionObjectNotFoundException
- one of the objects referenced in
the lock token were not foundpublic java.util.Enumeration enumerateLocks(SlideToken slideToken, java.lang.String objectUri, boolean inherited) throws ServiceAccessException, ObjectNotFoundException, LockTokenNotFoundException
slideToken
- the slide tokenobjectUri
- the URI of the object of which we want to enumerate
active locksinherited
- if true, locks inherited from parent objects will be
included in the result, otherwise, only locks that
explicitly lock the object will be returnedServiceAccessException
- low level service access exceptionObjectNotFoundException
- one of the objects referenced in
the lock token were not foundLockTokenNotFoundException
- cannot find the lock in the
lock store servicepublic void checkLock(SlideToken slideToken, ObjectNode object, ActionNode action) throws ServiceAccessException, ObjectNotFoundException, ObjectLockedException
slideToken
- Credetials tokensubject
- Object on which the action is performedaction
- Action to testObjectLockedException
- Can't perform specified action
on objectServiceAccessException
- Low level service access exceptionObjectNotFoundException
- One of the objects referenced
in the lock token were not foundpublic void checkLock(SlideToken slideToken, ObjectNode subject, SubjectNode user, ActionNode action) throws ServiceAccessException, ObjectNotFoundException, ObjectLockedException
slideToken
- Credetials tokensubject
- Subject to testuser
- User to testaction
- Action to testObjectLockedException
- Can't perform specified action
on objectServiceAccessException
- Low level service access exceptionObjectNotFoundException
- One of the objects referenced
in the lock token were not foundpublic boolean isLocked(SlideToken slideToken, ObjectNode subject, SubjectNode user, ActionNode action, boolean tryToLock) throws ServiceAccessException, ObjectNotFoundException
crendentialsToken
- Credentials tokensubject
- Subject to testuser
- User to testaction
- Locked for actionServiceAccessException
- Low level service access exceptionObjectNotFoundException
- One of the objects referenced
in the lock token were not foundpublic boolean isLocked(SlideToken slideToken, ObjectNode subject, SubjectNode user, ActionNode action, boolean inheritance, boolean tryToLock) throws ServiceAccessException, ObjectNotFoundException
crendentialsToken
- Credentials tokensubject
- Subject to testuser
- User to testaction
- Locked for actioninheritance
- Set to true if we want to check if any children
is locked
with an incompatible locktryToLock
- True if the check is intended to check whether
or not we can put a new lockServiceAccessException
- Low level service access exceptionObjectNotFoundException
- One of the objects referenced in
the lock token were not foundpublic boolean isLocked(SlideToken slideToken, NodeLock token, boolean tryToLock) throws ServiceAccessException, ObjectNotFoundException
token
- Lock token to testServiceAccessException
- Low level service access exceptionObjectNotFoundException
- One of the objects referenced
in the lock token were not found
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |