@MappedSuperclass public abstract class DocumentBase extends org.kuali.rice.krad.bo.PersistableBusinessObjectBaseAdapter implements org.kuali.rice.krad.document.Document
Modifier and Type | Field and Description |
---|---|
protected List<org.kuali.rice.krad.bo.AdHocRoutePerson> |
adHocRoutePersons |
protected List<org.kuali.rice.krad.bo.AdHocRouteWorkgroup> |
adHocRouteWorkgroups |
protected org.kuali.rice.krad.bo.DocumentHeader |
documentHeader |
protected String |
documentNumber |
protected List<org.kuali.rice.krad.bo.Note> |
notes |
protected List<org.kuali.rice.krad.document.authorization.PessimisticLock> |
pessimisticLocks |
Constructor and Description |
---|
DocumentBase()
Constructs a DocumentBase.java.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCopyErrorDocumentNote(String noteText)
Adds a note to the document indicating it was created by a copy or error correction.
|
void |
addNote(org.kuali.rice.krad.bo.Note note) |
void |
addPessimisticLock(org.kuali.rice.krad.document.authorization.PessimisticLock lock) |
void |
afterActionTaken(org.kuali.rice.kew.api.action.ActionType performed,
org.kuali.rice.kew.framework.postprocessor.ActionTakenEvent event) |
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 org.kuali.rice.krad.util.documentserializer.PropertySerializabilityEvaluator |
createPropertySerializabilityEvaluator(org.kuali.rice.krad.datadictionary.WorkflowProperties workflowProperties,
org.kuali.rice.krad.datadictionary.WorkflowAttributes workflowAttributes) |
void |
doActionTaken(org.kuali.rice.kew.framework.postprocessor.ActionTakenEvent event) |
void |
doRouteLevelChange(org.kuali.rice.kew.framework.postprocessor.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(org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange statusChangeEvent) |
List<org.kuali.rice.krad.rules.rule.event.DocumentEvent> |
generateSaveEvents()
Hook for override
|
List<org.kuali.rice.kew.api.action.ActionRequest> |
getActionRequests() |
List<org.kuali.rice.krad.bo.AdHocRoutePerson> |
getAdHocRoutePersons() |
List<org.kuali.rice.krad.bo.AdHocRouteWorkgroup> |
getAdHocRouteWorkgroups() |
boolean |
getAllowsCopy() |
protected org.kuali.rice.krad.service.AttachmentService |
getAttachmentService() |
String |
getBasePathToDocumentDuringSerialization()
Returns the POJO property name of "this" document in the object returned by
wrapDocumentWithMetadataForXmlSerialization() |
String |
getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person user)
This default implementation just throws a PessimisticLockingException.
|
org.kuali.rice.krad.bo.DocumentHeader |
getDocumentHeader() |
String |
getDocumentNumber() |
org.kuali.rice.krad.util.documentserializer.PropertySerializabilityEvaluator |
getDocumentPropertySerizabilityEvaluator()
If workflowProperties have been defined within the data dictionary for this document, then it returns an instance
of
BusinessObjectPropertySerializibilityEvaluator initialized with the properties. |
String |
getDocumentTitle()
Retrieves the title of the document
|
List<String> |
getLockClearingMethodNames()
Deprecated.
|
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
PessimisticLock s. |
org.kuali.rice.krad.bo.Note |
getNote(int index) |
List<org.kuali.rice.krad.bo.Note> |
getNotes() |
protected org.kuali.rice.krad.service.NoteService |
getNoteService() |
org.kuali.rice.core.api.mo.common.GloballyUnique |
getNoteTarget()
Returns the business object with which notes related to this document should be associated.
|
org.kuali.rice.krad.util.NoteType |
getNoteType()
Returns the
NoteType to use for notes associated with this document. |
List<org.kuali.rice.krad.document.authorization.PessimisticLock> |
getPessimisticLocks() |
String |
getSuperUserAnnotation() |
List<String> |
getWorkflowEngineDocumentIdsToLock()
The default implementation returns no additional ids for the workflow engine to lock prior to processing.
|
String |
getXmlForRouteReport() |
protected void |
logErrors()
This method logs errors.
|
void |
populateDocumentForRouting() |
protected void |
postLoad()
Loads the KRAD document header via the document header service.
|
void |
postProcessSave(org.kuali.rice.krad.rules.rule.event.DocumentEvent event) |
protected void |
postRemove()
This overridden method is used to delete the
DocumentHeader ob ject due to the system not being able to
manage the DocumentHeader object via mapping files |
void |
prepareForSave() |
void |
prepareForSave(org.kuali.rice.krad.rules.rule.event.DocumentEvent event)
Override this method with implementation specific prepareForSave logic
|
protected void |
prePersist()
Save the KRAD document header via the document header service.
|
void |
processAfterRetrieve() |
void |
refreshPessimisticLocks() |
void |
refreshReferenceObject(String referenceObjectName)
Deprecated.
This is a KNS/OJB-related method. It should not be used on KRAD/JPA-based documents.
|
boolean |
removeNote(org.kuali.rice.krad.bo.Note note) |
String |
serializeDocumentToXml() |
void |
setAdHocRoutePersons(List<org.kuali.rice.krad.bo.AdHocRoutePerson> adHocRoutePersons) |
void |
setAdHocRouteWorkgroups(List<org.kuali.rice.krad.bo.AdHocRouteWorkgroup> adHocRouteWorkgroups) |
void |
setDocumentHeader(org.kuali.rice.krad.bo.DocumentHeader documentHeader) |
void |
setDocumentNumber(String documentNumber) |
protected void |
setNewDocumentHeader()
Gets a new document header for this documents type and sets in the document instance.
|
void |
setNotes(List<org.kuali.rice.krad.bo.Note> notes) |
void |
setPessimisticLocks(List<org.kuali.rice.krad.document.authorization.PessimisticLock> pessimisticLocks) |
void |
setSuperUserAnnotation(String superUserAnnotation) |
void |
toCopy() |
boolean |
useCustomLockDescriptors()
This default implementation simply returns false to indicate that custom lock descriptors are not supported by
DocumentBase.
|
void |
validateBusinessRules(org.kuali.rice.krad.rules.rule.event.DocumentEvent event) |
org.kuali.rice.krad.workflow.KualiDocumentXmlMaterializer |
wrapDocumentWithMetadataForXmlSerialization()
Wraps a document in an instance of KualiDocumentXmlMaterializer, that provides additional metadata for
serialization
|
_persistence_get, _persistence_new, _persistence_post_clone, _persistence_set, buildListOfDeletionAwareLists, getExtension, getLegacyDataAdapter, isNewCollectionRecord, linkEditableUserFields, refresh, refreshNonUpdateableReferences, setExtension, setNewCollectionRecord
_persistence_checkFetched, _persistence_checkFetchedForSet, _persistence_get_objectId, _persistence_get_versionNumber, _persistence_getCacheKey, _persistence_getFetchGroup, _persistence_getHref, _persistence_getId, _persistence_getPropertyChangeListener, _persistence_getRelationships, _persistence_getSession, _persistence_isAttributeFetched, _persistence_propertyChange, _persistence_resetFetchGroup, _persistence_set_objectId, _persistence_set_versionNumber, _persistence_setCacheKey, _persistence_setFetchGroup, _persistence_setHref, _persistence_setId, _persistence_setPropertyChangeListener, _persistence_setRelationships, _persistence_setSession, _persistence_setShouldRefreshFetchGroup, _persistence_shallow_clone, _persistence_shouldRefreshFetchGroup, generateAndSetObjectIdIfNeeded, getExtensionObject, getObjectId, getVersionNumber, preUpdate, setExtensionObject, setObjectId, setVersionNumber, toString
protected String documentNumber
protected org.kuali.rice.krad.bo.DocumentHeader documentHeader
protected List<org.kuali.rice.krad.document.authorization.PessimisticLock> pessimisticLocks
protected List<org.kuali.rice.krad.bo.AdHocRoutePerson> adHocRoutePersons
protected List<org.kuali.rice.krad.bo.AdHocRouteWorkgroup> adHocRouteWorkgroups
public DocumentBase()
public boolean getAllowsCopy()
getAllowsCopy
in interface org.kuali.rice.krad.document.Document
Document.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 documentgetDocumentTitle
in interface org.kuali.rice.krad.document.Document
Document.getDocumentTitle()
public void prepareForSave()
prepareForSave
in interface org.kuali.rice.krad.document.Document
Document.prepareForSave()
public void processAfterRetrieve()
processAfterRetrieve
in interface org.kuali.rice.krad.document.Document
Document.processAfterRetrieve()
public void doRouteLevelChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteLevelChange levelChangeEvent)
doRouteLevelChange
in interface org.kuali.rice.krad.document.Document
Document.doRouteLevelChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteLevelChange)
public void doActionTaken(org.kuali.rice.kew.framework.postprocessor.ActionTakenEvent event)
doActionTaken
in interface org.kuali.rice.krad.document.Document
Document.doActionTaken(org.kuali.rice.kew.framework.postprocessor.ActionTakenEvent)
public void afterActionTaken(org.kuali.rice.kew.api.action.ActionType performed, org.kuali.rice.kew.framework.postprocessor.ActionTakenEvent event)
afterActionTaken
in interface org.kuali.rice.krad.document.Document
Document.afterActionTaken(org.kuali.rice.kew.api.action.ActionType, org.kuali.rice.kew.framework.postprocessor.ActionTakenEvent)
protected List<String> getNonLockingActionTakenCodes()
PessimisticLock
s.public void afterWorkflowEngineProcess(boolean successfullyProcessed)
afterWorkflowEngineProcess
in interface org.kuali.rice.krad.document.Document
Document.afterWorkflowEngineProcess(boolean)
public void beforeWorkflowEngineProcess()
beforeWorkflowEngineProcess
in interface org.kuali.rice.krad.document.Document
Document.beforeWorkflowEngineProcess()
public List<String> getWorkflowEngineDocumentIdsToLock()
getWorkflowEngineDocumentIdsToLock
in interface org.kuali.rice.krad.document.Document
Document.getWorkflowEngineDocumentIdsToLock()
public void toCopy() throws org.kuali.rice.kew.api.exception.WorkflowException, IllegalStateException
org.kuali.rice.kew.api.exception.WorkflowException
IllegalStateException
Copyable.toCopy()
protected void setNewDocumentHeader() throws org.kuali.rice.kew.api.exception.WorkflowException
org.kuali.rice.kew.api.exception.WorkflowException
protected void addCopyErrorDocumentNote(String noteText)
noteText
- - text for notepublic String getXmlForRouteReport()
getXmlForRouteReport
in interface org.kuali.rice.krad.document.Document
Document.getXmlForRouteReport()
public void populateDocumentForRouting()
populateDocumentForRouting
in interface org.kuali.rice.krad.document.Document
Document.populateDocumentForRouting()
public String serializeDocumentToXml()
serializeDocumentToXml
in interface org.kuali.rice.krad.document.Document
Document.serializeDocumentToXml()
public org.kuali.rice.krad.workflow.KualiDocumentXmlMaterializer wrapDocumentWithMetadataForXmlSerialization()
wrapDocumentWithMetadataForXmlSerialization
in interface org.kuali.rice.krad.document.Document
Document.wrapDocumentWithMetadataForXmlSerialization()
public org.kuali.rice.krad.util.documentserializer.PropertySerializabilityEvaluator getDocumentPropertySerizabilityEvaluator()
BusinessObjectPropertySerializibilityEvaluator
initialized with the properties. If none have been
defined, then returns
AlwaysTruePropertySerializibilityEvaluator
.getDocumentPropertySerizabilityEvaluator
in interface org.kuali.rice.krad.document.Document
Document.getDocumentPropertySerizabilityEvaluator()
protected org.kuali.rice.krad.util.documentserializer.PropertySerializabilityEvaluator createPropertySerializabilityEvaluator(org.kuali.rice.krad.datadictionary.WorkflowProperties workflowProperties, org.kuali.rice.krad.datadictionary.WorkflowAttributes workflowAttributes)
public String getBasePathToDocumentDuringSerialization()
wrapDocumentWithMetadataForXmlSerialization()
getBasePathToDocumentDuringSerialization
in interface org.kuali.rice.krad.document.Document
Document.getBasePathToDocumentDuringSerialization()
public org.kuali.rice.krad.bo.DocumentHeader getDocumentHeader()
getDocumentHeader
in interface org.kuali.rice.krad.document.Document
public void setDocumentHeader(org.kuali.rice.krad.bo.DocumentHeader documentHeader)
setDocumentHeader
in interface org.kuali.rice.krad.document.Document
public String getDocumentNumber()
getDocumentNumber
in interface org.kuali.rice.krad.document.Document
public void setDocumentNumber(String documentNumber)
setDocumentNumber
in interface org.kuali.rice.krad.document.Document
public List<org.kuali.rice.krad.bo.AdHocRoutePerson> getAdHocRoutePersons()
getAdHocRoutePersons
in interface org.kuali.rice.krad.document.Document
public void setAdHocRoutePersons(List<org.kuali.rice.krad.bo.AdHocRoutePerson> adHocRoutePersons)
setAdHocRoutePersons
in interface org.kuali.rice.krad.document.Document
public List<org.kuali.rice.krad.bo.AdHocRouteWorkgroup> getAdHocRouteWorkgroups()
getAdHocRouteWorkgroups
in interface org.kuali.rice.krad.document.Document
public void setAdHocRouteWorkgroups(List<org.kuali.rice.krad.bo.AdHocRouteWorkgroup> adHocRouteWorkgroups)
setAdHocRouteWorkgroups
in interface org.kuali.rice.krad.document.Document
public void postProcessSave(org.kuali.rice.krad.rules.rule.event.DocumentEvent event)
postProcessSave
in interface org.kuali.rice.krad.document.Document
public void prepareForSave(org.kuali.rice.krad.rules.rule.event.DocumentEvent event)
prepareForSave
in interface org.kuali.rice.krad.document.Document
Document.prepareForSave(org.kuali.rice.krad.rules.rule.event.DocumentEvent)
public void validateBusinessRules(org.kuali.rice.krad.rules.rule.event.DocumentEvent event)
validateBusinessRules
in interface org.kuali.rice.krad.document.Document
protected void logErrors()
public List<org.kuali.rice.krad.rules.rule.event.DocumentEvent> generateSaveEvents()
generateSaveEvents
in interface org.kuali.rice.krad.document.Document
Document.generateSaveEvents()
public void doRouteStatusChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange statusChangeEvent)
doRouteStatusChange
in interface org.kuali.rice.krad.document.Document
Document.doRouteStatusChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange)
public org.kuali.rice.core.api.mo.common.GloballyUnique 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 org.kuali.rice.krad.document.Document
public org.kuali.rice.krad.util.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 org.kuali.rice.krad.document.Document
Document.getNoteType()
public void addNote(org.kuali.rice.krad.bo.Note note)
addNote
in interface org.kuali.rice.krad.document.Document
Document.addNote(org.kuali.rice.krad.bo.Note)
public boolean removeNote(org.kuali.rice.krad.bo.Note note)
removeNote
in interface org.kuali.rice.krad.document.Document
Document.removeNote(org.kuali.rice.krad.bo.Note)
public org.kuali.rice.krad.bo.Note getNote(int index)
getNote
in interface org.kuali.rice.krad.document.Document
Document.getNote(int)
public List<org.kuali.rice.krad.bo.Note> getNotes()
getNotes
in interface org.kuali.rice.krad.document.Document
Document.getNotes()
public void setNotes(List<org.kuali.rice.krad.bo.Note> notes)
setNotes
in interface org.kuali.rice.krad.document.Document
Document.setNotes(java.util.List)
public List<org.kuali.rice.kew.api.action.ActionRequest> getActionRequests()
getActionRequests
in interface org.kuali.rice.krad.document.Document
public String getSuperUserAnnotation()
getSuperUserAnnotation
in interface org.kuali.rice.krad.document.Document
public void setSuperUserAnnotation(String superUserAnnotation)
setSuperUserAnnotation
in interface org.kuali.rice.krad.document.Document
protected void postLoad()
PersistableBusinessObjectBase.postLoad()
protected void prePersist()
prePersist
in class org.kuali.rice.krad.bo.DataObjectBase
protected void postRemove()
DocumentHeader
ob ject due to the system not being able to
manage the DocumentHeader
object via mapping filesPersistableBusinessObjectBase.postRemove()
public List<org.kuali.rice.krad.document.authorization.PessimisticLock> getPessimisticLocks()
getPessimisticLocks
in interface org.kuali.rice.krad.document.Document
Document.getPessimisticLocks()
public void refreshPessimisticLocks()
refreshPessimisticLocks
in interface org.kuali.rice.krad.document.Document
Document.refreshPessimisticLocks()
public void setPessimisticLocks(List<org.kuali.rice.krad.document.authorization.PessimisticLock> pessimisticLocks)
pessimisticLocks
- the PessimisticLock objects to setpublic void addPessimisticLock(org.kuali.rice.krad.document.authorization.PessimisticLock lock)
addPessimisticLock
in interface org.kuali.rice.krad.document.Document
Document.addPessimisticLock(org.kuali.rice.krad.document.authorization.PessimisticLock)
@Deprecated public List<String> getLockClearingMethodNames()
getLockClearingMethodNames
in interface org.kuali.rice.krad.document.Document
Document.getLockClearingMethodNames()
@Deprecated public List<String> getLockClearningMethodNames()
getLockClearningMethodNames
in interface org.kuali.rice.krad.document.Document
Document.getLockClearingMethodNames()
public boolean useCustomLockDescriptors()
useCustomLockDescriptors
in interface org.kuali.rice.krad.document.Document
Document.useCustomLockDescriptors()
public String getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person user)
getCustomLockDescriptor
in interface org.kuali.rice.krad.document.Document
Document.getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person)
protected org.kuali.rice.krad.service.AttachmentService getAttachmentService()
protected org.kuali.rice.krad.service.NoteService getNoteService()
@Deprecated public void refreshReferenceObject(String referenceObjectName)
refreshReferenceObject
in class org.kuali.rice.krad.bo.PersistableBusinessObjectBaseAdapter
PersistableBusinessObjectBase.refreshReferenceObject(java.lang.String)
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.