public interface PessimisticLockService
Modifier and Type | Method and Description |
---|---|
void |
delete(String id)
This method deletes the given lock object
|
Map |
establishLocks(Document document,
Map editMode,
Person user) |
void |
establishWorkflowPessimisticLocking(Document document) |
PessimisticLock |
generateNewLock(String documentNumber)
This method will generate a new
PessimisticLock object with a 'document'
lock descriptor |
PessimisticLock |
generateNewLock(String documentNumber,
Person user)
This method will generate a new
PessimisticLock object with a 'document'
lock descriptor |
PessimisticLock |
generateNewLock(String documentNumber,
String lockDescriptor)
This method will generate a new
PessimisticLock object with a lock descriptor of
the given parameter |
PessimisticLock |
generateNewLock(String documentNumber,
String lockDescriptor,
Person user)
This method will generate a new
PessimisticLock object with a lock descriptor of
the given parameter |
Set |
getDocumentActions(Document document,
Person user,
Set<String> documentActions) |
List<PessimisticLock> |
getPessimisticLocksForDocument(String documentNumber)
This method gets all locks associated with the given document number
|
List<PessimisticLock> |
getPessimisticLocksForSession(String sessionId)
Return all locks associated with the given session id
|
boolean |
isPessimisticLockAdminUser(Person user)
This method is used to identify who is an admin user for
PessimisticLock objects |
void |
releaseAllLocksForUser(List<PessimisticLock> locks,
Person user)
This method will release all locks in the given list that are owned by the given user
|
void |
releaseAllLocksForUser(List<PessimisticLock> locks,
Person user,
String lockDescriptor)
This method will release all locks in the given list that are owned by the given user that have a matching lock
descriptor value
|
void |
releaseWorkflowPessimisticLocking(Document document) |
PessimisticLock |
save(PessimisticLock lock)
This method saves the given lock object
|
void delete(String id)
id
- - the id of the lock to deletePessimisticLock generateNewLock(String documentNumber)
PessimisticLock
object with a 'document'
lock descriptordocumentNumber
- - the document number of the document associated with the new lockPessimisticLock
PessimisticLock generateNewLock(String documentNumber, String lockDescriptor)
PessimisticLock
object with a lock descriptor of
the given parameterdocumentNumber
- - the document number of the document associated with the new locklockDescriptor
- - the lock descriptor the new PessimisticLock object should containPessimisticLock
containing the given lockDescriptorPessimisticLock generateNewLock(String documentNumber, Person user)
PessimisticLock
object with a 'document'
lock descriptordocumentNumber
- - the document number of the document associated with the new lockuser
- - the user to set on the new lock being generatedPessimisticLock
PessimisticLock generateNewLock(String documentNumber, String lockDescriptor, Person user)
PessimisticLock
object with a lock descriptor of
the given parameterdocumentNumber
- - the document number of the document associated with the new locklockDescriptor
- - the lock descriptor the new PessimisticLock object should containuser
- - the user to set on the new lock being generatedPessimisticLock
containing the given lockDescriptorList<PessimisticLock> getPessimisticLocksForDocument(String documentNumber)
documentNumber
- - the document number of the document requiring locksPessimisticLock
objects
found for the given documentNumberList<PessimisticLock> getPessimisticLocksForSession(String sessionId)
sessionId
- - the session idPessimisticLock
objects
found for the given sessionIdboolean isPessimisticLockAdminUser(Person user)
PessimisticLock
objectsuser
- - user to verify as adminvoid releaseAllLocksForUser(List<PessimisticLock> locks, Person user)
locks
- - locks to release if owned by given useruser
- - user to check for lock ownershipvoid releaseAllLocksForUser(List<PessimisticLock> locks, Person user, String lockDescriptor)
locks
- - locks to release if owned by given useruser
- - user to check for lock ownershiplockDescriptor
- - lock descriptor value to match locks againstPessimisticLock save(PessimisticLock lock)
Map establishLocks(Document document, Map editMode, Person user)
document
- - the document locks are to be established against or byeditMode
- - the editMode returned by the method #getEditMode(Document, Person)
user
- - the user locks are being established forvoid establishWorkflowPessimisticLocking(Document document)
document
- - the document to create the lock against and add the lock tovoid releaseWorkflowPessimisticLocking(Document document)
document
- - document to release locks fromCopyright © 2005–2016 The Kuali Foundation. All rights reserved.