|
||||||||||
| 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
org.kuali.rice.krad.maintenance.MaintenanceDocumentBase
@Entity public class MaintenanceDocumentBase
Document class for all maintenance documents which wraps the maintenance object in
a Maintainable that is also used for various callbacks
The maintenance xml structure will be:
| Field Summary | |
|---|---|
protected DocumentAttachment |
attachment
|
protected String |
attachmentCollectionName
|
protected String |
attachmentListPropertyName
|
protected String |
attachmentPropertyName
|
protected List<MultiDocumentAttachment> |
attachments
|
protected boolean |
displayTopicFieldInNotes
|
protected boolean |
fieldsClearedOnCopy
|
static String |
MAINTAINABLE_IMPL_CLASS
|
static String |
MAINTENANCE_ACTION_TAG_NAME
|
static String |
NEW_MAINTAINABLE_TAG_NAME
|
protected Maintainable |
newMaintainableObject
|
static String |
NOTES_TAG_NAME
|
static String |
OLD_MAINTAINABLE_TAG_NAME
|
protected Maintainable |
oldMaintainableObject
|
protected String |
xmlDocumentContents
|
| Fields inherited from class org.kuali.rice.krad.document.DocumentBase |
|---|
documentHeader, documentNumber |
| Fields inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase |
|---|
extension, versionNumber |
| Constructor Summary | |
|---|---|
MaintenanceDocumentBase()
|
|
MaintenanceDocumentBase(String documentTypeName)
Initializies the maintainables. |
|
| Method Summary | |
|---|---|
protected boolean |
checkAllowsRecordDeletion()
|
protected boolean |
checkDeletePermission(Object dataObject)
|
protected void |
checkForLockingDocument(boolean throwExceptionIfLocked)
|
protected boolean |
checkMaintenanceAction()
|
void |
deleteDocumentAttachment()
|
void |
deleteDocumentAttachmentList()
|
void |
doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent)
Handle the doRouteStatusChange event from the post processor |
boolean |
getAllowsCopy()
This method returns whether or not this document can be copied. |
DocumentAttachment |
getAttachment()
|
String |
getAttachmentCollectionName()
|
String |
getAttachmentListPropertyName()
|
String |
getAttachmentPropertyName()
|
List<MultiDocumentAttachment> |
getAttachments()
|
String |
getCustomLockDescriptor(Person user)
Returns the custom lock descriptor generated by the new maintainable object, if defined. |
protected Object |
getDataObjectFromXML(String maintainableTagName)
Retrieves substring of document contents from maintainable tag name. |
boolean |
getDisplayTopicFieldInNotes()
This method... |
Object |
getDocumentDataObject()
Returns a reference to the data object that this MaintenanceDocument is maintaining |
protected DocumentDictionaryService |
getDocumentDictionaryService()
|
protected DocumentHeaderService |
getDocumentHeaderService()
|
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. |
protected DocumentService |
getDocumentService()
|
String |
getDocumentTitle()
Builds out the document title for maintenance documents - this will get loaded into the flex doc and passed into workflow. |
protected String |
getMaintenanceAction(Document xmlDocument,
String oldOrNewElementName)
This method is a lame containment of ugly DOM walking code. |
protected MaintenanceDocumentService |
getMaintenanceDocumentService()
|
Maintainable |
getNewMaintainableObject()
|
PersistableBusinessObject |
getNoteTarget()
The Note target for maintenance documents is determined by whether or not the underlying Maintainable
supports business object notes or not. |
NoteType |
getNoteType()
The NoteType for maintenance documents is determined by whether or not the underlying Maintainable supports business object notes or not. |
Maintainable |
getOldMaintainableObject()
|
List<String> |
getWorkflowEngineDocumentIdsToLock()
The default implementation returns no additional ids for the workflow engine to lock prior to processing. |
String |
getXmlDocumentContents()
Gets the xmlDocumentContents attribute. |
boolean |
isEdit()
This method is a simplified-naming wrapper around isOldDataObjectInDocument(), so that the method name matches the functionality. |
boolean |
isFieldsClearedOnCopy()
Gets the fieldsClearedOnCopy attribute. |
boolean |
isNew()
This method is a simplified-naming wrapper around isOldDataObjectInDocument(), so that the method name matches the functionality. |
boolean |
isNewWithExisting()
Returns true if this maintenance document is creating a new Business Object out of an existing Business Object, for example, a new division vendor out of an existing parent vendor. |
boolean |
isOldDataObjectInDocument()
Checks old maintainable bo has key values |
protected boolean |
isOldMaintainableInDocument(Document xmlDocument)
|
boolean |
isSessionDocument()
This method to check whether the document class implements SessionDocument |
void |
populateAttachmentBeforeSave()
|
void |
populateAttachmentForBO()
|
void |
populateAttachmentListForBO()
|
void |
populateBoAttachmentListBeforeSave()
|
void |
populateDocumentAttachment()
|
void |
populateDocumentAttachmentList()
|
void |
populateMaintainablesFromXmlDocumentContents()
Populates the old and new maintainables from the xml document contents string. |
void |
populateXmlDocumentContentsFromMaintainables()
Populates the xml document contents from the maintainables. |
protected void |
postLoad()
This overridden method is used to retrieve the DocumentHeader object due to the system not being able to
manage the DocumentHeader object via mapping files |
void |
postProcessSave(KualiDocumentEvent event)
this needs to happen after the document itself is saved, to preserve consistency of the ver_nbr and in the case of initial save, because this can't be saved until the document is saved initially |
protected void |
postRemove()
This overridden method is used to delete the DocumentHeader object due to the system not being able to
manage the DocumentHeader object via mapping files |
void |
prepareForSave()
Pre-Save hook. |
void |
prepareForSave(KualiDocumentEvent event)
Override this method with implementation specific prepareForSave logic |
protected void |
prePersist()
This overridden method is used to insert the DocumentHeader object due to the system not being able to
manage the DocumentHeader object via mapping files |
protected void |
preUpdate()
This overridden method is used to save the DocumentHeader object due to the system not being able to
manage the DocumentHeader object via mapping files |
void |
processAfterRetrieve()
This method provides a hook that will be called after a document is retrieved, but before it is returned from the DocumentService. |
protected void |
refreshAttachment()
The attachment BO is proxied in OJB. |
protected void |
refreshAttachmentList()
|
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 |
setAttachment(DocumentAttachment attachment)
|
void |
setAttachmentCollectionName(String attachmentCollectionName)
|
void |
setAttachmentListPropertyName(String attachmentListPropertyName)
|
void |
setAttachmentPropertyName(String attachmentPropertyName)
|
void |
setAttachments(List<MultiDocumentAttachment> attachments)
|
void |
setDisplayTopicFieldInNotes(boolean displayTopicFieldInNotes)
This method... |
void |
setDocumentNumber(String documentNumber)
setter for document header id |
void |
setFieldsClearedOnCopy(boolean fieldsClearedOnCopy)
Sets the fieldsClearedOnCopy attribute value. |
void |
setNewMaintainableObject(Maintainable newMaintainableObject)
|
void |
setOldMaintainableObject(Maintainable oldMaintainableObject)
|
void |
setXmlDocumentContents(String xmlDocumentContents)
Sets the xmlDocumentContents attribute value. |
boolean |
useCustomLockDescriptors()
Returns whether or not the new maintainable object supports custom lock descriptors. |
void |
validateBusinessRules(KualiDocumentEvent event)
Explicitly NOT calling super here. |
| 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, refreshReferenceObject, 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 |
|---|
public static final String MAINTAINABLE_IMPL_CLASS
public static final String OLD_MAINTAINABLE_TAG_NAME
public static final String NEW_MAINTAINABLE_TAG_NAME
public static final String MAINTENANCE_ACTION_TAG_NAME
public static final String NOTES_TAG_NAME
protected Maintainable oldMaintainableObject
protected Maintainable newMaintainableObject
protected String xmlDocumentContents
protected boolean fieldsClearedOnCopy
protected boolean displayTopicFieldInNotes
protected String attachmentPropertyName
protected String attachmentListPropertyName
protected String attachmentCollectionName
protected DocumentAttachment attachment
protected List<MultiDocumentAttachment> attachments
| Constructor Detail |
|---|
public MaintenanceDocumentBase()
public MaintenanceDocumentBase(String documentTypeName)
| Method Detail |
|---|
public String getAttachmentPropertyName()
public void setAttachmentPropertyName(String attachmentPropertyName)
public String getAttachmentListPropertyName()
public void setAttachmentListPropertyName(String attachmentListPropertyName)
public String getAttachmentCollectionName()
public void setAttachmentCollectionName(String attachmentCollectionName)
public String getDocumentTitle()
getDocumentTitle in interface DocumentgetDocumentTitle in class DocumentBaseDocument.getDocumentTitle()protected boolean isOldMaintainableInDocument(Document xmlDocument)
xmlDocument -
public boolean isOldDataObjectInDocument()
isOldDataObjectInDocument in interface MaintenanceDocumentpublic boolean isNew()
isNew in interface MaintenanceDocumentpublic boolean isEdit()
isEdit in interface MaintenanceDocumentpublic boolean isNewWithExisting()
MaintenanceDocument
isNewWithExisting in interface MaintenanceDocumentpublic void populateMaintainablesFromXmlDocumentContents()
MaintenanceDocument
populateMaintainablesFromXmlDocumentContents in interface MaintenanceDocument
protected String getMaintenanceAction(Document xmlDocument,
String oldOrNewElementName)
xmlDocument - oldOrNewElementName - - String oldMaintainableObject or newMaintainableObject
protected Object getDataObjectFromXML(String maintainableTagName)
public void populateXmlDocumentContentsFromMaintainables()
populateXmlDocumentContentsFromMaintainables in interface MaintenanceDocumentMaintenanceDocument.populateXmlDocumentContentsFromMaintainables()public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent)
Document
doRouteStatusChange in interface DocumentdoRouteStatusChange in class DocumentBaseDocumentBase.doRouteStatusChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange)public List<String> getWorkflowEngineDocumentIdsToLock()
DocumentBase
getWorkflowEngineDocumentIdsToLock in interface DocumentgetWorkflowEngineDocumentIdsToLock in class DocumentBaseDocument.getWorkflowEngineDocumentIdsToLock()public void prepareForSave()
prepareForSave in interface DocumentprepareForSave in class DocumentBaseDocument.prepareForSave()public void processAfterRetrieve()
Document
processAfterRetrieve in interface DocumentprocessAfterRetrieve in class DocumentBaseDocumentBase.processAfterRetrieve()public Maintainable getNewMaintainableObject()
getNewMaintainableObject in interface MaintenanceDocumentpublic void setNewMaintainableObject(Maintainable newMaintainableObject)
setNewMaintainableObject in interface MaintenanceDocumentnewMaintainableObject - The newMaintainableObject to set.public Maintainable getOldMaintainableObject()
getOldMaintainableObject in interface MaintenanceDocumentpublic void setOldMaintainableObject(Maintainable oldMaintainableObject)
setOldMaintainableObject in interface MaintenanceDocumentoldMaintainableObject - The oldMaintainableObject to set.public void setDocumentNumber(String documentNumber)
Document
setDocumentNumber in interface DocumentsetDocumentNumber in class DocumentBaseDocument.setDocumentNumber(java.lang.String)public final boolean isFieldsClearedOnCopy()
isFieldsClearedOnCopy in interface MaintenanceDocumentpublic final void setFieldsClearedOnCopy(boolean fieldsClearedOnCopy)
setFieldsClearedOnCopy in interface MaintenanceDocumentfieldsClearedOnCopy - The fieldsClearedOnCopy to set.public String getXmlDocumentContents()
getXmlDocumentContents in interface MaintenanceDocumentpublic void setXmlDocumentContents(String xmlDocumentContents)
setXmlDocumentContents in interface MaintenanceDocumentxmlDocumentContents - The xmlDocumentContents to set.public boolean getAllowsCopy()
Document
getAllowsCopy in interface DocumentgetAllowsCopy in class DocumentBaseDocument.getAllowsCopy()public boolean getDisplayTopicFieldInNotes()
MaintenanceDocument
getDisplayTopicFieldInNotes in interface MaintenanceDocumentMaintenanceDocument.getDisplayTopicFieldInNotes()public void setDisplayTopicFieldInNotes(boolean displayTopicFieldInNotes)
MaintenanceDocument
setDisplayTopicFieldInNotes in interface MaintenanceDocumentMaintenanceDocument.setDisplayTopicFieldInNotes(boolean)public String serializeDocumentToXml()
Document
serializeDocumentToXml in interface DocumentserializeDocumentToXml in class DocumentBaseDocument.serializeDocumentToXml()public void prepareForSave(KualiDocumentEvent event)
DocumentBase
prepareForSave in interface DocumentprepareForSave in class DocumentBaseevent - - indicates which document event was requestedDocument.prepareForSave(org.kuali.rice.krad.rules.rule.event.KualiDocumentEvent)protected void refreshAttachment()
protected void refreshAttachmentList()
public void populateAttachmentForBO()
public void populateDocumentAttachment()
public void populateAttachmentListForBO()
public void populateAttachmentBeforeSave()
public void populateDocumentAttachmentList()
public void populateBoAttachmentListBeforeSave()
public void deleteDocumentAttachment()
public void deleteDocumentAttachmentList()
public void validateBusinessRules(KualiDocumentEvent event)
validateBusinessRules in interface DocumentvalidateBusinessRules in class DocumentBaseevent - - indicates which document event was requestedDocumentBase.validateBusinessRules(org.kuali.rice.krad.rules.rule.event.KualiDocumentEvent)protected void checkForLockingDocument(boolean throwExceptionIfLocked)
public void postProcessSave(KualiDocumentEvent event)
postProcessSave in interface DocumentpostProcessSave in class DocumentBaseevent - - indicates which document event was requestedDocumentBase.postProcessSave(org.kuali.rice.krad.rules.rule.event.KualiDocumentEvent)public Object getDocumentDataObject()
MaintenanceDocument
getDocumentDataObject in interface MaintenanceDocumentorg.kuali.rice.krad.document.DocumentBase#getDocumentBusinessObject()public PersistableBusinessObject getNoteTarget()
The Note target for maintenance documents is determined by whether or not the underlying Maintainable
supports business object notes or not. This is determined via a call to Maintainable#isBoNotesEnabled().
The note target is then derived as follows:
Maintainable supports business object
notes, delegate to getDocumentDataObject(). DocumentHeader.
getNoteTarget in interface DocumentgetNoteTarget in class DocumentBaseDocument.getNoteTarget()public NoteType getNoteType()
NoteType for maintenance documents is determined by whether or not the underlying Maintainable supports business object notes or not. This is determined via a call to isBoNotesEnabled(). The NoteType is then derived as follows: Maintainable supports business object notes, return NoteType.BUSINESS_OBJECT. DocumentBase.getNoteType()
getNoteType in interface DocumentgetNoteType in class DocumentBaseDocument.getNoteType(),
Document.getNoteTarget()public PropertySerializabilityEvaluator getDocumentPropertySerizabilityEvaluator()
DocumentBaseBusinessObjectPropertySerializibilityEvaluator initialized with the properties. If none have been defined, then returns
AlwaysTruePropertySerializibilityEvaluator.
getDocumentPropertySerizabilityEvaluator in interface DocumentgetDocumentPropertySerizabilityEvaluator in class DocumentBaseDocument.getDocumentPropertySerizabilityEvaluator()public DocumentAttachment getAttachment()
public void setAttachment(DocumentAttachment attachment)
public List<MultiDocumentAttachment> getAttachments()
public void setAttachments(List<MultiDocumentAttachment> attachments)
protected void postRemove()
DocumentHeader object due to the system not being able to
manage the DocumentHeader object via mapping files
postRemove in class PersistableBusinessObjectBasePersistableBusinessObjectBase.postRemove()protected void postLoad()
DocumentHeader object due to the system not being able to
manage the DocumentHeader object via mapping files
postLoad in class DocumentBasePersistableBusinessObjectBase.postLoad()protected void prePersist()
DocumentHeader object due to the system not being able to
manage the DocumentHeader object via mapping files
prePersist in class PersistableBusinessObjectBasePersistableBusinessObjectBase.prePersist()protected void preUpdate()
DocumentHeader object due to the system not being able to
manage the DocumentHeader object via mapping files
preUpdate in class PersistableBusinessObjectBasePersistableBusinessObjectBase.preUpdate()public boolean isSessionDocument()
public boolean useCustomLockDescriptors()
useCustomLockDescriptors in interface DocumentuseCustomLockDescriptors in class DocumentBaseDocument.useCustomLockDescriptors(),
Maintainable.useCustomLockDescriptors()public String getCustomLockDescriptor(Person user)
getCustomLockDescriptor in interface DocumentgetCustomLockDescriptor in class DocumentBaseuser - The user trying to establish the lock.
Document.getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person),
Maintainable.getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person)protected DocumentDictionaryService getDocumentDictionaryService()
protected MaintenanceDocumentService getMaintenanceDocumentService()
protected DocumentHeaderService getDocumentHeaderService()
protected DocumentService getDocumentService()
protected boolean checkAllowsRecordDeletion()
protected boolean checkMaintenanceAction()
protected boolean checkDeletePermission(Object dataObject)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||