| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PessimisticLockService
This is the service interface for documents to use the Pessimistic Locking mechanism
| Method Summary | |
|---|---|
|  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 PessimisticLockobject with a 'document'
 lock descriptor | 
|  PessimisticLock | generateNewLock(String documentNumber,
                               Person user)This method will generate a new PessimisticLockobject with a 'document'
 lock descriptor | 
|  PessimisticLock | generateNewLock(String documentNumber,
                               String lockDescriptor)This method will generate a new PessimisticLockobject with a lock descriptor of
 the given parameter | 
|  PessimisticLock | generateNewLock(String documentNumber,
                               String lockDescriptor,
                               Person user)This method will generate a new PessimisticLockobject 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 | 
|  boolean | isPessimisticLockAdminUser(Person user)This method is used to identify who is an admin user for PessimisticLockobjects | 
|  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 | 
| Method Detail | 
|---|
void delete(String id)
id - - the id of the lock to deletePessimisticLock generateNewLock(String documentNumber)
PessimisticLock object with a 'document'
 lock descriptor
documentNumber - - the document number of the document associated with the new lock
PessimisticLock
PessimisticLock generateNewLock(String documentNumber,
                                String lockDescriptor)
PessimisticLock object with a lock descriptor of
 the given parameter
documentNumber - - the document number of the document associated with the new locklockDescriptor - - the lock descriptor the new PessimisticLock object should contain
PessimisticLock containing the given lockDescriptor
PessimisticLock generateNewLock(String documentNumber,
                                Person user)
PessimisticLock object with a 'document'
 lock descriptor
documentNumber - - the document number of the document associated with the new lockuser - - the user to set on the new lock being generated
PessimisticLock
PessimisticLock generateNewLock(String documentNumber,
                                String lockDescriptor,
                                Person user)
PessimisticLock object with a lock descriptor of
 the given parameter
documentNumber - - 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 generated
PessimisticLock containing the given lockDescriptorList<PessimisticLock> getPessimisticLocksForDocument(String documentNumber)
documentNumber - - the document number of the document requiring locks
PessimisticLock objects
 found for the given documentNumberboolean isPessimisticLockAdminUser(Person user)
PessimisticLock objects
user - - user to verify as admin
void releaseAllLocksForUser(List<PessimisticLock> locks,
                            Person user)
locks - - locks to release if owned by given useruser - - user to check for lock ownership
void 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 for
void establishWorkflowPessimisticLocking(Document document)
document - - the document to create the lock against and add the lock tovoid releaseWorkflowPessimisticLocking(Document document)
document - - document to release locks from
Set getDocumentActions(Document document,
                       Person user,
                       Set<String> documentActions)
document - user - 
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||