| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.krad.bo.BusinessObjectBase
org.kuali.rice.krad.bo.PersistableBusinessObjectBase
org.kuali.rice.krad.document.DocumentBase
@MappedSuperclass public abstract class DocumentBase
Document, 
Serialized Form| Field Summary | |
|---|---|
| protected  List<AdHocRoutePerson> | adHocRoutePersons | 
| protected  List<AdHocRouteWorkgroup> | adHocRouteWorkgroups | 
| protected  DocumentHeader | documentHeader | 
| protected  String | documentNumber | 
| protected  List<Note> | notes | 
| protected  List<PessimisticLock> | pessimisticLocks | 
| Fields inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase | 
|---|
| extension, newCollectionRecord, objectId, versionNumber | 
| Constructor Summary | |
|---|---|
| DocumentBase()Constructs a DocumentBase.java. | |
| Method Summary | |
|---|---|
| protected  void | addCopyErrorDocumentNote(String noteText)Adds a note to the document indicating it was created by a copy or error correction. | 
|  void | addNote(Note note)Adds the given Note to the document's list of Notes. | 
|  void | addPessimisticLock(PessimisticLock lock)This method adds a new PessimisticLockto 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)The the default implementation for afterWorkflowEngineProcess does nothing, but is meant to provide a hook for documents to implement for other needs. | 
|  void | beforeWorkflowEngineProcess()The the default implementation for beforeWorkflowEngineProcess does nothing, but is meant to provide a hook for documents to implement for other needs. | 
| protected  PropertySerializabilityEvaluator | createPropertySerializabilityEvaluator(WorkflowProperties workflowProperties,
                                                                             WorkflowAttributes workflowAttributes) | 
|  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)The the default implementation for RouteLevelChange does nothing, but is meant to provide a hook for documents to implement for other needs. | 
|  void | doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent)Handle the doRouteStatusChange event from the post processor | 
|  List<KualiDocumentEvent> | generateSaveEvents()Hook for override | 
|  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. | 
| protected  AttachmentService | getAttachmentService() | 
|  String | getBasePathToDocumentDuringSerialization()Returns the POJO property name of "this" document in the object returned by wrapDocumentWithMetadataForXmlSerialization() | 
|  String | getCustomLockDescriptor(Person user)This default implementation just throws a PessimisticLockingException. | 
|  DocumentHeader | getDocumentHeader()This retrieves the standard DocumentHeaderobject, which contains standard meta-data about a document. | 
|  String | getDocumentNumber()All documents have a document header id. | 
|  PropertySerializabilityEvaluator | getDocumentPropertySerizabilityEvaluator()If workflowProperties have been defined within the data dictionary for this document, then it returns an instance of BusinessObjectPropertySerializibilityEvaluatorinitialized with the properties. | 
|  String | getDocumentTitle()Retrieves the title of the document | 
|  List<String> | getLockClearingMethodNames()This is a method that is used by Kuali Pessimistic Locking to get the names (method to call values) of the KNS KualiDocumentActionBase methods that should release locks | 
|  List<String> | getLockClearningMethodNames()Deprecated. | 
| protected  List<String> | getNonLockingActionTakenCodes()Return the list of actions a user could take on a document which should not result in the recalculation of the PessimisticLocks. | 
|  Note | getNote(int index)Retrieves the note at the given index. | 
|  List<Note> | getNotes()Returns a mutable list of all notes on the document. | 
| protected  NoteService | getNoteService() | 
|  PersistableBusinessObject | getNoteTarget()Returns the business object with which notes related to this document should be associated. | 
|  NoteType | getNoteType()Returns the NoteTypeto use for notes associated with this document. | 
|  List<PessimisticLock> | getPessimisticLocks()This method gets a list of the PessimisticLockobjects associated with this document | 
|  List<String> | getWorkflowEngineDocumentIdsToLock()The default implementation returns no additional ids for the workflow engine to lock prior to processing. | 
|  String | getXmlForRouteReport()This method is used to get the xml that should be used in a Route Report. | 
| protected  void | logErrors()This method logs errors. | 
|  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. | 
| protected  void | postLoad()Loads the KRAD document header via the document header service. | 
|  void | postProcessSave(KualiDocumentEvent event)Do any work on the document after the save. | 
| protected  void | postRemove()This overridden method is used to delete the DocumentHeaderobject due to the system not being able to
 manage theDocumentHeaderobject via mapping files | 
|  void | prepareForSave()This method provides a hook that will be called before the document is saved. | 
|  void | prepareForSave(KualiDocumentEvent event)Override this method with implementation specific prepareForSave logic | 
| protected  void | prePersist()Save the KRAD document header via the document header service. | 
|  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 PessimisticLockobjects on the document if changes could
 have been made | 
|  void | refreshReferenceObject(String referenceObjectName)Deprecated. This is a KNS/OJB-related method. It should not be used on KRAD/JPA-based documents. | 
|  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 DocumentHeaderfor this document. | 
|  void | setDocumentNumber(String documentNumber)setter for document header id | 
| protected  void | setNewDocumentHeader()Gets a new document header for this documents type and sets in the document instance. | 
|  void | setNotes(List<Note> notes)Sets the document's list of notes to the given list. | 
|  void | setPessimisticLocks(List<PessimisticLock> pessimisticLocks) | 
|  void | toCopy() | 
|  boolean | useCustomLockDescriptors()This default implementation simply returns false to indicate that custom lock descriptors are not supported by DocumentBase. | 
|  void | validateBusinessRules(KualiDocumentEvent event)Sends document off to the rules engine to verify business rules. | 
|  KualiDocumentXmlMaterializer | wrapDocumentWithMetadataForXmlSerialization()Wraps a document in an instance of KualiDocumentXmlMaterializer, that provides additional metadata for serialization | 
| Methods inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase | 
|---|
| afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, buildListOfDeletionAwareLists, getExtension, getLegacyDataAdapter, getObjectId, getVersionNumber, isNewCollectionRecord, linkEditableUserFields, postPersist, postUpdate, preRemove, preUpdate, refresh, refreshNonUpdateableReferences, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber | 
| Methods inherited from class org.kuali.rice.krad.bo.BusinessObjectBase | 
|---|
| toString | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface org.kuali.rice.krad.bo.PersistableBusinessObject | 
|---|
| buildListOfDeletionAwareLists, getExtension, isNewCollectionRecord, linkEditableUserFields, refreshNonUpdateableReferences, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber | 
| Methods inherited from interface org.kuali.rice.krad.bo.BusinessObject | 
|---|
| refresh | 
| Methods inherited from interface org.kuali.rice.core.api.mo.ModelObjectBasic | 
|---|
| toString | 
| Methods inherited from interface org.kuali.rice.core.api.mo.common.Versioned | 
|---|
| getVersionNumber | 
| Methods inherited from interface org.kuali.rice.core.api.mo.common.GloballyUnique | 
|---|
| getObjectId | 
| Field Detail | 
|---|
protected String documentNumber
protected DocumentHeader documentHeader
protected List<PessimisticLock> pessimisticLocks
protected List<AdHocRoutePerson> adHocRoutePersons
protected List<AdHocRouteWorkgroup> adHocRouteWorkgroups
protected List<Note> notes
| Constructor Detail | 
|---|
public DocumentBase()
| Method Detail | 
|---|
public boolean getAllowsCopy()
Document
getAllowsCopy in interface DocumentDocument.getAllowsCopy()public String getDocumentTitle()
This is the default document title implementation. It concatenates the document's data dictionary file label attribute and the document's document header description together. This title is used to populate workflow and will show up in document search results and user action lists.
return String representing the title of the document
getDocumentTitle in interface DocumentDocument.getDocumentTitle()public void prepareForSave()
Document
prepareForSave in interface DocumentDocument.prepareForSave()public void processAfterRetrieve()
Document
processAfterRetrieve in interface DocumentDocument.processAfterRetrieve()public void doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent)
doRouteLevelChange in interface DocumentlevelChangeEvent - route level change eventDocument.doRouteLevelChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteLevelChange)public void doActionTaken(ActionTakenEvent event)
Document
doActionTaken in interface Documentevent - action taken eventDocument.doActionTaken(org.kuali.rice.kew.framework.postprocessor.ActionTakenEvent)
public void afterActionTaken(ActionType performed,
                             ActionTakenEvent event)
Document
afterActionTaken in interface Documentperformed - action type performedevent - action taken eventDocument.afterActionTaken(ActionType, org.kuali.rice.kew.framework.postprocessor.ActionTakenEvent)protected List<String> getNonLockingActionTakenCodes()
PessimisticLocks.
doActionTaken(ActionTakenEvent)public void afterWorkflowEngineProcess(boolean successfullyProcessed)
afterWorkflowEngineProcess in interface DocumentsuccessfullyProcessed - - true if the document was processed successfully, false otherwiseDocument.afterWorkflowEngineProcess(boolean)public void beforeWorkflowEngineProcess()
beforeWorkflowEngineProcess in interface DocumentDocument.beforeWorkflowEngineProcess()public List<String> getWorkflowEngineDocumentIdsToLock()
getWorkflowEngineDocumentIdsToLock in interface DocumentDocument.getWorkflowEngineDocumentIdsToLock()
public void toCopy()
            throws WorkflowException,
                   IllegalStateException
WorkflowException
IllegalStateExceptionCopyable.toCopy()
protected void setNewDocumentHeader()
                             throws WorkflowException
WorkflowExceptionprotected void addCopyErrorDocumentNote(String noteText)
noteText - - text for notepublic String getXmlForRouteReport()
Document
getXmlForRouteReport in interface DocumentDocument.getXmlForRouteReport()public void populateDocumentForRouting()
Document
populateDocumentForRouting in interface DocumentDocument.populateDocumentForRouting()public String serializeDocumentToXml()
Document
serializeDocumentToXml in interface DocumentDocument.serializeDocumentToXml()public KualiDocumentXmlMaterializer wrapDocumentWithMetadataForXmlSerialization()
wrapDocumentWithMetadataForXmlSerialization in interface DocumentDocument.wrapDocumentWithMetadataForXmlSerialization()public PropertySerializabilityEvaluator getDocumentPropertySerizabilityEvaluator()
BusinessObjectPropertySerializibilityEvaluator initialized with the properties.  If none have been
 defined, then returns
 AlwaysTruePropertySerializibilityEvaluator.
getDocumentPropertySerizabilityEvaluator in interface DocumentDocument.getDocumentPropertySerizabilityEvaluator()
protected PropertySerializabilityEvaluator createPropertySerializabilityEvaluator(WorkflowProperties workflowProperties,
                                                                                  WorkflowAttributes workflowAttributes)
public String getBasePathToDocumentDuringSerialization()
wrapDocumentWithMetadataForXmlSerialization()
getBasePathToDocumentDuringSerialization in interface DocumentDocument.getBasePathToDocumentDuringSerialization()public DocumentHeader getDocumentHeader()
DocumentHeader object, which contains standard meta-data about a document.
getDocumentHeader in interface Documentpublic void setDocumentHeader(DocumentHeader documentHeader)
DocumentHeader for this document.
setDocumentHeader in interface Documentpublic String getDocumentNumber()
getDocumentNumber in interface Documentpublic void setDocumentNumber(String documentNumber)
setDocumentNumber in interface Documentpublic List<AdHocRoutePerson> getAdHocRoutePersons()
getAdHocRoutePersons in interface Documentpublic void setAdHocRoutePersons(List<AdHocRoutePerson> adHocRoutePersons)
setAdHocRoutePersons in interface Documentpublic List<AdHocRouteWorkgroup> getAdHocRouteWorkgroups()
getAdHocRouteWorkgroups in interface Documentpublic void setAdHocRouteWorkgroups(List<AdHocRouteWorkgroup> adHocRouteWorkgroups)
setAdHocRouteWorkgroups in interface Documentpublic void postProcessSave(KualiDocumentEvent event)
Document
postProcessSave in interface Documentevent - - indicates which document event was requestedpublic void prepareForSave(KualiDocumentEvent event)
prepareForSave in interface Documentevent - - indicates which document event was requestedDocument.prepareForSave(org.kuali.rice.krad.rules.rule.event.KualiDocumentEvent)public void validateBusinessRules(KualiDocumentEvent event)
Document
validateBusinessRules in interface Documentevent - - indicates which document event was requestedprotected void logErrors()
public List<KualiDocumentEvent> generateSaveEvents()
generateSaveEvents in interface DocumentDocument.generateSaveEvents()public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent)
Document
doRouteStatusChange in interface DocumentstatusChangeEvent - status change eventDocument.doRouteStatusChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange)public PersistableBusinessObject getNoteTarget()
DocumentHeader of this document will be returned as the note target.
 Sub classes can override this method if they want notes to be associated with something
 other than the document header.  If this method is overridden, the getNoteType()
 method should be overridden to return NoteType.BUSINESS_OBJECT
getNoteTarget in interface Documentpublic NoteType getNoteType()
NoteType to use for notes associated with this document.
 By default this returns NoteType.DOCUMENT_HEADER since notes are
 associated with the DocumentHeader record by default.
 The case in which this should be overridden is if getNoteTarget() is
 overridden to return an object other than the DocumentHeader.
getNoteType in interface DocumentDocument.getNoteType()public void addNote(Note note)
Document
addNote in interface Documentnote - the Note to add, must be non-nullDocument.addNote(org.kuali.rice.krad.bo.Note)public boolean removeNote(Note note)
Document
removeNote in interface Documentnote - the note to remove from the document's list of notes, must be non-null
Document.removeNote(org.kuali.rice.krad.bo.Note)public Note getNote(int index)
Document
getNote in interface Documentindex - the zero-based index of the note to retrieve
Document.getNote(int)public List<Note> getNotes()
Document
getNotes in interface DocumentDocument.getNotes()public void setNotes(List<Note> notes)
Document
setNotes in interface Documentnotes - the list of notes to set on the document, must be non-nullDocument.setNotes(java.util.List)protected void postLoad()
postLoad in class PersistableBusinessObjectBasePersistableBusinessObjectBase.postLoad()protected void prePersist()
prePersist in class PersistableBusinessObjectBaseprotected void postRemove()
DocumentHeader object due to the system not being able to
 manage the DocumentHeader object via mapping files
postRemove in class PersistableBusinessObjectBasePersistableBusinessObjectBase.postRemove()public List<PessimisticLock> getPessimisticLocks()
DocumentPessimisticLock objects associated with this document
getPessimisticLocks in interface DocumentDocument.getPessimisticLocks()public void refreshPessimisticLocks()
DocumentPessimisticLock objects on the document if changes could
 have been made
refreshPessimisticLocks in interface DocumentDocument.refreshPessimisticLocks()public void setPessimisticLocks(List<PessimisticLock> pessimisticLocks)
pessimisticLocks - the PessimisticLock objects to setpublic void addPessimisticLock(PessimisticLock lock)
DocumentPessimisticLock to the document
 NOTE: LOCKS ADDED VIA THIS METHOD WILL NOT BE SAVED WITH THE DOCUMENT
addPessimisticLock in interface Documentlock - - the lock to add to the documentDocument.addPessimisticLock(org.kuali.rice.krad.document.authorization.PessimisticLock)public List<String> getLockClearingMethodNames()
Document
getLockClearingMethodNames in interface DocumentDocument.getLockClearingMethodNames()@Deprecated public List<String> getLockClearningMethodNames()
Document
getLockClearningMethodNames in interface DocumentDocument.getLockClearingMethodNames()public boolean useCustomLockDescriptors()
useCustomLockDescriptors in interface DocumentDocument.useCustomLockDescriptors()public String getCustomLockDescriptor(Person user)
getCustomLockDescriptor in interface Documentuser - The user trying to establish the lock.
Document.getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person)protected AttachmentService getAttachmentService()
protected NoteService getNoteService()
@Deprecated public void refreshReferenceObject(String referenceObjectName)
refreshReferenceObject in interface PersistableBusinessObjectrefreshReferenceObject in class PersistableBusinessObjectBasePersistableBusinessObjectBase.refreshReferenceObject(java.lang.String)| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||