public interface Document extends GloballyUnique
Modifier and Type | Method and Description |
---|---|
void |
addNote(Note note)
Adds the given Note to the document's list of Notes.
|
void |
addPessimisticLock(PessimisticLock lock)
This method adds a new
PessimisticLock to the document
NOTE: LOCKS ADDED VIA THIS METHOD WILL NOT BE SAVED WITH THE DOCUMENT |
void |
afterActionTaken(ActionType performed,
ActionTakenEvent event)
method to integrate with workflow where we will be able to perform logic after an action taken being performed on a document
|
void |
afterWorkflowEngineProcess(boolean successfullyProcessed)
This method will be called after the Workflow engine has completely finished processing a document.
|
void |
beforeWorkflowEngineProcess()
This method will be called before the Workflow engine has begun processing a document.
|
void |
doActionTaken(ActionTakenEvent event)
method to integrate with workflow where we will be able to perform logic for an action taken being performed on a document
|
void |
doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent)
method to integrate with workflow, where we will actually handle the transitions of levels for documents
|
void |
doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent)
Handle the doRouteStatusChange event from the post processor
|
List<DocumentEvent> |
generateSaveEvents()
Generate any necessary events required during the save event generation
|
List<ActionRequest> |
getActionRequests()
This method gets a list of the
ActionRequest objects associated with this document. |
List<AdHocRoutePerson> |
getAdHocRoutePersons()
getter method to get the list of ad hoc route persons associated with a document at a point in time, this list is only valid
for a given users version of a document as this state is only persisted in workflow itself when someone takes an action on a
document
|
List<AdHocRouteWorkgroup> |
getAdHocRouteWorkgroups()
getter method to get the list of ad hoc route workgroups associated with a document at a point in time, this list is only
valid for a given users version of a document as this state is only persisted in workflow itself when someone takes an action
on a document
|
boolean |
getAllowsCopy()
This method returns whether or not this document can be copied.
|
String |
getBasePathToDocumentDuringSerialization()
Returns an evaluator object that determines whether a given property relative to the root object (
wrapDocumentWithMetadataForXmlSerialization()
is serializable during the document serialization process. |
String |
getCustomLockDescriptor(Person user)
Generates a custom lock descriptor for pessimistic locking.
|
DocumentHeader |
getDocumentHeader()
This retrieves the standard
DocumentHeader object, which contains standard meta-data about a document. |
String |
getDocumentNumber()
All documents have a document header id.
|
PropertySerializabilityEvaluator |
getDocumentPropertySerizabilityEvaluator()
Returns an evaluator object that determines whether a given property relative to the root object (
wrapDocumentWithMetadataForXmlSerialization()
is serializable during the document serialization process. |
String |
getDocumentTitle()
Getter method to get the document title as it will appear in and be searchable in workflow.
|
List<String> |
getLockClearingMethodNames()
Deprecated.
Use the
releasePessimisticLocks method in the transactional KRAD controller |
List<String> |
getLockClearningMethodNames()
Deprecated.
|
Note |
getNote(int index)
Retrieves the note at the given index.
|
List<Note> |
getNotes()
Returns a mutable list of all notes on the document.
|
GloballyUnique |
getNoteTarget()
Return the target PersistableBusinessObject that notes associated with this document should be attached to.
|
NoteType |
getNoteType()
Returns the note type which should be used for notes associated with this document.
|
List<PessimisticLock> |
getPessimisticLocks()
This method gets a list of the
PessimisticLock objects associated with this document |
String |
getSuperUserAnnotation()
This method gets the annotation to be attached to a super user action.
|
List<String> |
getWorkflowEngineDocumentIdsToLock()
This method will be called before the Workflow engine has begun processing a document.
|
String |
getXmlForRouteReport()
This method is used to get the xml that should be used in a Route Report.
|
void |
populateDocumentForRouting()
This is the method to integrate with workflow, where we will actually populate the workflow defined data structure(s) so that
workflow can routed based on this data.
|
void |
postProcessSave(DocumentEvent event)
Do any work on the document after the save.
|
void |
prepareForSave()
This method provides a hook that will be called before the document is saved.
|
void |
prepareForSave(DocumentEvent event)
Do any work on the document that requires the DocumentEvent before the save.
|
void |
processAfterRetrieve()
This method provides a hook that will be called after a document is retrieved, but before it is returned from the
DocumentService.
|
void |
refreshPessimisticLocks()
This method updates the list of
PessimisticLock objects on the document if changes could
have been made |
boolean |
removeNote(Note note)
Removes the given note from the document's list of notes.
|
String |
serializeDocumentToXml()
This is a method where we can get the xml of a document that the workflow system will use to base it's routing and search
attributes on.
|
void |
setAdHocRoutePersons(List<AdHocRoutePerson> adHocRoutePersons)
setter method to set the list of ad hoc route persons associated with a document at a point in time, this list is only valid
for a given users version of a document as this state is only persisted in workflow itself when someone takes an action on a
document
|
void |
setAdHocRouteWorkgroups(List<AdHocRouteWorkgroup> adHocRouteWorkgroups)
setter method to set the list of ad hoc route workgroups associated with a document at a point in time, this list is only
valid for a given users version of a document as this state is only persisted in workflow itself when someone takes an action
on a document
|
void |
setDocumentHeader(DocumentHeader documentHeader)
Sets the associated
DocumentHeader for this document. |
void |
setDocumentNumber(String documentHeaderId)
setter for document header id
|
void |
setNotes(List<Note> notes)
Sets the document's list of notes to the given list.
|
void |
setSuperUserAnnotation(String superUserAnnotation)
This method sets the annotation to be attached to a super user action.
|
boolean |
useCustomLockDescriptors()
This method returns whether or not this document supports custom lock descriptors for pessimistic locking.
|
void |
validateBusinessRules(DocumentEvent event)
Sends document off to the rules engine to verify business rules.
|
Object |
wrapDocumentWithMetadataForXmlSerialization()
This method will return the root object to be serialized for workflow routing.
|
getObjectId
DocumentHeader getDocumentHeader()
DocumentHeader
object, which contains standard meta-data about a document.void setDocumentHeader(DocumentHeader documentHeader)
DocumentHeader
for this document.documentHeader
- String getDocumentNumber()
void setDocumentNumber(String documentHeaderId)
documentHeaderId
- void populateDocumentForRouting()
String serializeDocumentToXml()
String getXmlForRouteReport()
void doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent)
levelChangeEvent
- route level change eventvoid doActionTaken(ActionTakenEvent event)
event
- action taken eventvoid afterActionTaken(ActionType performed, ActionTakenEvent event)
performed
- action type performedevent
- action taken eventvoid afterWorkflowEngineProcess(boolean successfullyProcessed)
successfullyProcessed
- - true if the document was processed successfully, false otherwisevoid beforeWorkflowEngineProcess()
List<String> getWorkflowEngineDocumentIdsToLock()
String getDocumentTitle()
List<AdHocRoutePerson> getAdHocRoutePersons()
List<AdHocRouteWorkgroup> getAdHocRouteWorkgroups()
void setAdHocRoutePersons(List<AdHocRoutePerson> adHocRoutePersons)
adHocRoutePersons
- void setAdHocRouteWorkgroups(List<AdHocRouteWorkgroup> adHocRouteWorkgroups)
adHocRouteWorkgroups
- void prepareForSave()
void validateBusinessRules(DocumentEvent event)
event
- - indicates which document event was requestedValidationException
- - containing the MessageMap from the validation session.void prepareForSave(DocumentEvent event)
event
- - indicates which document event was requestedvoid postProcessSave(DocumentEvent event)
event
- - indicates which document event was requestedvoid processAfterRetrieve()
boolean getAllowsCopy()
List<DocumentEvent> generateSaveEvents()
void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent)
statusChangeEvent
- status change eventNoteType getNoteType()
GloballyUnique getNoteTarget()
NoteType.BUSINESS_OBJECT
.
In these cases it's the responsibility for implementers of the Document interface to handle storing transient
copies of the document notes (in XML or otherwise) until the underlying note target has been persisted and can be attached
to the document's notes via it's object id.void addNote(Note note)
note
- the Note to add, must be non-nullList<Note> getNotes()
void setNotes(List<Note> notes)
notes
- the list of notes to set on the document, must be non-nullNote getNote(int index)
index
- the zero-based index of the note to retrieveIndexOutOfBoundsException
- if the index is out of rangeboolean removeNote(Note note)
note
- the note to remove from the document's list of notes, must be non-nullList<ActionRequest> getActionRequests()
ActionRequest
objects associated with this document.String getSuperUserAnnotation()
void setSuperUserAnnotation(String superUserAnnotation)
superUserAnnotation
- the super user annotationList<PessimisticLock> getPessimisticLocks()
PessimisticLock
objects associated with this documentvoid refreshPessimisticLocks()
PessimisticLock
objects on the document if changes could
have been madevoid addPessimisticLock(PessimisticLock lock)
PessimisticLock
to the document
NOTE: LOCKS ADDED VIA THIS METHOD WILL NOT BE SAVED WITH THE DOCUMENTlock
- - the lock to add to the document@Deprecated List<String> getLockClearningMethodNames()
getLockClearingMethodNames()
@Deprecated List<String> getLockClearingMethodNames()
releasePessimisticLocks method
in the transactional KRAD controllerString getBasePathToDocumentDuringSerialization()
wrapDocumentWithMetadataForXmlSerialization()
is serializable during the document serialization process.DocumentSerializerService
,
wrapDocumentWithMetadataForXmlSerialization()
PropertySerializabilityEvaluator getDocumentPropertySerizabilityEvaluator()
wrapDocumentWithMetadataForXmlSerialization()
is serializable during the document serialization process.DocumentSerializerService
,
wrapDocumentWithMetadataForXmlSerialization()
Object wrapDocumentWithMetadataForXmlSerialization()
KualiDocumentXmlMaterializer
boolean useCustomLockDescriptors()
getCustomLockDescriptor(Person)
String getCustomLockDescriptor(Person user)
useCustomLockDescriptors()
returns true.user
- The user trying to establish the lock.useCustomLockDescriptors()
,
PessimisticLockService
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.