@Entity public class MaintenanceDocumentBase extends DocumentBase implements org.kuali.rice.krad.maintenance.MaintenanceDocument, org.kuali.rice.krad.document.SessionDocument
| Modifier and Type | Field and Description |
|---|---|
protected org.kuali.rice.krad.bo.DocumentAttachment |
attachment |
protected String |
attachmentCollectionName |
protected String |
attachmentListPropertyName |
protected String |
attachmentPropertyName |
protected List<org.kuali.rice.krad.bo.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 org.kuali.rice.krad.maintenance.Maintainable |
newMaintainableObject |
static String |
NOTES_TAG_NAME |
static String |
OLD_MAINTAINABLE_TAG_NAME |
protected org.kuali.rice.krad.maintenance.Maintainable |
oldMaintainableObject |
protected static int |
SUB_OBJECT_MATERIALIZATION_DEPTH |
protected String |
xmlDocumentContents |
adHocRoutePersons, adHocRouteWorkgroups, documentHeader, documentNumber, notes, pessimisticLocks| Constructor and Description |
|---|
MaintenanceDocumentBase() |
MaintenanceDocumentBase(String documentTypeName)
Initializies the maintainables.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkAllowsRecordDeletion() |
protected boolean |
checkDeletePermission(Object dataObject) |
protected void |
checkForLockingDocument(boolean throwExceptionIfLocked) |
protected boolean |
checkMaintenanceAction() |
void |
deleteDocumentAttachment()
Deprecated.
|
void |
deleteDocumentAttachmentList()
Deprecated.
|
void |
doRouteStatusChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange statusChangeEvent) |
boolean |
getAllowsCopy() |
org.kuali.rice.krad.bo.DocumentAttachment |
getAttachment() |
String |
getAttachmentCollectionName() |
String |
getAttachmentListPropertyName() |
String |
getAttachmentPropertyName() |
List<org.kuali.rice.krad.bo.MultiDocumentAttachment> |
getAttachments() |
protected org.kuali.rice.krad.service.BusinessObjectSerializerService |
getBusinessObjectSerializerService() |
String |
getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person user)
Returns the custom lock descriptor generated by the new maintainable object, if defined.
|
protected Object |
getDataObjectFromXML(String maintainableTagName)
Get data object from XML
|
Object |
getDocumentDataObject() |
protected org.kuali.rice.krad.service.DocumentDictionaryService |
getDocumentDictionaryService() |
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. |
protected org.kuali.rice.krad.service.DocumentService |
getDocumentService() |
String |
getDocumentTitle()
Builds out the document title for maintenance documents
|
String |
getInitiatorChartOfAccountsCode()
This method is used for routing and simply returns the initiator's Chart code.
|
String |
getInitiatorOrganizationCode()
This method is used for routing and simply returns the initiator's Organization code.
|
protected String[] |
getInitiatorPrimaryDepartmentCode() |
protected String |
getMaintenanceAction(Document xmlDocument,
String oldOrNewElementName)
This method is a lame containment of ugly DOM walking code.
|
protected org.kuali.rice.krad.service.MaintenanceDocumentService |
getMaintenanceDocumentService() |
org.kuali.rice.krad.maintenance.Maintainable |
getNewMaintainableObject() |
org.kuali.rice.core.api.mo.common.GloballyUnique |
getNoteTarget()
The Note target for maintenance documents is determined by whether or not the underlying
Maintainable
supports business object notes or not. |
org.kuali.rice.krad.util.NoteType |
getNoteType()
The
NoteType for maintenance documents is determined by whether or not the underlying Maintainable supports business object notes or not. |
org.kuali.rice.krad.maintenance.Maintainable |
getOldMaintainableObject() |
List<String> |
getWorkflowEngineDocumentIdsToLock()
The default implementation returns no additional ids for the workflow engine to lock prior to processing.
|
String |
getXmlDocumentContents() |
boolean |
isDisplayTopicFieldInNotes() |
boolean |
isEdit() |
boolean |
isFieldsClearedOnCopy() |
boolean |
isNew() |
boolean |
isNewWithExisting() |
boolean |
isOldDataObjectInDocument() |
protected boolean |
isOldMaintainableInDocument(Document xmlDocument)
Check if oldMaintainable is specified in the XML of the maintenance document
|
boolean |
isSessionDocument()
This method to check whether the document class implements SessionDocument
TODO: move to KNS maintenance document base
|
void |
populateAttachmentBeforeSave()
Deprecated.
|
void |
populateAttachmentForBO()
Deprecated.
|
void |
populateAttachmentListForBO()
Deprecated.
|
void |
populateBoAttachmentListBeforeSave()
Deprecated.
|
void |
populateDocumentAttachment()
Deprecated.
|
void |
populateDocumentAttachmentList()
Deprecated.
|
void |
populateMaintainablesFromXmlDocumentContents() |
void |
populateXmlDocumentContentsFromMaintainables()
Populates the xml document contents from the maintainables.
|
void |
postProcessSave(org.kuali.rice.krad.rules.rule.event.DocumentEvent 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
|
void |
prepareForSave() |
void |
prepareForSave(org.kuali.rice.krad.rules.rule.event.DocumentEvent event)
Override this method with implementation specific prepareForSave logic
|
void |
processAfterRetrieve() |
protected void |
refreshAttachment()
Deprecated.
|
protected void |
refreshAttachmentList()
Deprecated.
|
String |
serializeDocumentToXml()
Overridden to avoid serializing the xml twice, because of the xmlDocumentContents property of this object
|
void |
setAttachment(org.kuali.rice.krad.bo.DocumentAttachment attachment) |
void |
setAttachmentCollectionName(String attachmentCollectionName) |
void |
setAttachmentListPropertyName(String attachmentListPropertyName) |
void |
setAttachmentPropertyName(String attachmentPropertyName) |
void |
setAttachments(List<org.kuali.rice.krad.bo.MultiDocumentAttachment> attachments) |
void |
setDisplayTopicFieldInNotes(boolean displayTopicFieldInNotes) |
void |
setDocumentNumber(String documentNumber) |
void |
setFieldsClearedOnCopy(boolean fieldsClearedOnCopy) |
void |
setNewMaintainableObject(org.kuali.rice.krad.maintenance.Maintainable newMaintainableObject) |
void |
setOldMaintainableObject(org.kuali.rice.krad.maintenance.Maintainable oldMaintainableObject) |
void |
setXmlDocumentContents(String xmlDocumentContents) |
boolean |
useCustomLockDescriptors()
Returns whether or not the new maintainable object supports custom lock descriptors.
|
void |
validateBusinessRules(org.kuali.rice.krad.rules.rule.event.DocumentEvent event)
Explicitly NOT calling super here.
|
addCopyErrorDocumentNote, addNote, addPessimisticLock, afterActionTaken, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, createPropertySerializabilityEvaluator, doActionTaken, doRouteLevelChange, generateSaveEvents, getActionRequests, getAdHocRoutePersons, getAdHocRouteWorkgroups, getAttachmentService, getBasePathToDocumentDuringSerialization, getDocumentHeader, getDocumentNumber, getLockClearingMethodNames, getLockClearningMethodNames, getNonLockingActionTakenCodes, getNote, getNotes, getNoteService, getPessimisticLocks, getSuperUserAnnotation, getXmlForRouteReport, logErrors, populateDocumentForRouting, postLoad, postRemove, prePersist, refreshPessimisticLocks, refreshReferenceObject, removeNote, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentHeader, setNewDocumentHeader, setNotes, setPessimisticLocks, setSuperUserAnnotation, toCopy, wrapDocumentWithMetadataForXmlSerialization_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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddNote, addPessimisticLock, afterActionTaken, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, doActionTaken, doRouteLevelChange, generateSaveEvents, getActionRequests, getAdHocRoutePersons, getAdHocRouteWorkgroups, getBasePathToDocumentDuringSerialization, getDocumentHeader, getDocumentNumber, getLockClearingMethodNames, getLockClearningMethodNames, getNote, getNotes, getPessimisticLocks, getSuperUserAnnotation, getXmlForRouteReport, populateDocumentForRouting, refreshPessimisticLocks, removeNote, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentHeader, setNotes, setSuperUserAnnotation, wrapDocumentWithMetadataForXmlSerializationprotected static final int SUB_OBJECT_MATERIALIZATION_DEPTH
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 org.kuali.rice.krad.maintenance.Maintainable oldMaintainableObject
protected org.kuali.rice.krad.maintenance.Maintainable newMaintainableObject
protected String xmlDocumentContents
protected boolean fieldsClearedOnCopy
protected boolean displayTopicFieldInNotes
protected String attachmentPropertyName
protected String attachmentListPropertyName
protected String attachmentCollectionName
protected org.kuali.rice.krad.bo.DocumentAttachment attachment
protected List<org.kuali.rice.krad.bo.MultiDocumentAttachment> attachments
public MaintenanceDocumentBase()
public MaintenanceDocumentBase(String documentTypeName)
public String getDocumentTitle()
This will get loaded into the flex doc and passed into workflow. It will be searchable.
getDocumentTitle in interface org.kuali.rice.krad.document.DocumentgetDocumentTitle in class DocumentBaseDocument.getDocumentTitle()protected boolean isOldMaintainableInDocument(Document xmlDocument)
xmlDocument - Maintenance document in XML formpublic boolean isOldDataObjectInDocument()
isOldDataObjectInDocument in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintainable.isOldDataObjectInDocument()public boolean isNew()
isNew in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.isNew()public boolean isEdit()
isEdit in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.isEdit()public boolean isNewWithExisting()
isNewWithExisting in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.isNewWithExisting()public void populateMaintainablesFromXmlDocumentContents()
populateMaintainablesFromXmlDocumentContents in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.populateMaintainablesFromXmlDocumentContents()protected String getMaintenanceAction(Document xmlDocument, String oldOrNewElementName)
xmlDocument - oldOrNewElementName - - String oldMaintainableObject or newMaintainableObjectprotected Object getDataObjectFromXML(String maintainableTagName)
Retrieves substring of document contents from maintainable tag name. Then use xml service to translate xml into a business object.
maintainableTagName - the xml tag name of the maintainablepublic void populateXmlDocumentContentsFromMaintainables()
populateXmlDocumentContentsFromMaintainables in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.populateXmlDocumentContentsFromMaintainables()public void doRouteStatusChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange statusChangeEvent)
doRouteStatusChange in interface org.kuali.rice.krad.document.DocumentdoRouteStatusChange in class DocumentBaseDocumentBase.doRouteStatusChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange)public List<String> getWorkflowEngineDocumentIdsToLock()
DocumentBasegetWorkflowEngineDocumentIdsToLock in interface org.kuali.rice.krad.document.DocumentgetWorkflowEngineDocumentIdsToLock in class DocumentBaseDocumentBase.getWorkflowEngineDocumentIdsToLock()public void prepareForSave()
prepareForSave in interface org.kuali.rice.krad.document.DocumentprepareForSave in class DocumentBaseDocument.prepareForSave()public void processAfterRetrieve()
processAfterRetrieve in interface org.kuali.rice.krad.document.DocumentprocessAfterRetrieve in class DocumentBaseDocumentBase.processAfterRetrieve()public org.kuali.rice.krad.maintenance.Maintainable getNewMaintainableObject()
getNewMaintainableObject in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.getNewMaintainableObject()public void setNewMaintainableObject(org.kuali.rice.krad.maintenance.Maintainable newMaintainableObject)
setNewMaintainableObject in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.setNewMaintainableObject(Maintainable)public org.kuali.rice.krad.maintenance.Maintainable getOldMaintainableObject()
getOldMaintainableObject in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.getOldMaintainableObject()public void setOldMaintainableObject(org.kuali.rice.krad.maintenance.Maintainable oldMaintainableObject)
setOldMaintainableObject in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.setOldMaintainableObject(Maintainable)public void setDocumentNumber(String documentNumber)
DocumentBasesetDocumentNumber in interface org.kuali.rice.krad.document.DocumentsetDocumentNumber in class DocumentBaseDocumentBase.setDocumentNumber(java.lang.String)public final boolean isFieldsClearedOnCopy()
isFieldsClearedOnCopy in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.isFieldsClearedOnCopy()public final void setFieldsClearedOnCopy(boolean fieldsClearedOnCopy)
setFieldsClearedOnCopy in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.setFieldsClearedOnCopy(boolean)public String getXmlDocumentContents()
getXmlDocumentContents in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.getXmlDocumentContents()public void setXmlDocumentContents(String xmlDocumentContents)
setXmlDocumentContents in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.setXmlDocumentContents(String)public boolean getAllowsCopy()
getAllowsCopy in interface org.kuali.rice.krad.document.DocumentgetAllowsCopy in class DocumentBaseDocument.getAllowsCopy()public boolean isDisplayTopicFieldInNotes()
isDisplayTopicFieldInNotes in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.isDisplayTopicFieldInNotes()public void setDisplayTopicFieldInNotes(boolean displayTopicFieldInNotes)
setDisplayTopicFieldInNotes in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.setDisplayTopicFieldInNotes(boolean)public String serializeDocumentToXml()
serializeDocumentToXml in interface org.kuali.rice.krad.document.DocumentserializeDocumentToXml in class DocumentBaseDocument.serializeDocumentToXml()public void prepareForSave(org.kuali.rice.krad.rules.rule.event.DocumentEvent event)
DocumentBaseprepareForSave in interface org.kuali.rice.krad.document.DocumentprepareForSave in class DocumentBaseDocumentBase.prepareForSave(org.kuali.rice.krad.rules.rule.event.DocumentEvent)@Deprecated protected void refreshAttachment()
@Deprecated protected void refreshAttachmentList()
@Deprecated public void populateAttachmentForBO()
@Deprecated public void populateDocumentAttachment()
@Deprecated public void populateAttachmentListForBO()
@Deprecated public void populateAttachmentBeforeSave()
@Deprecated public void populateDocumentAttachmentList()
@Deprecated public void populateBoAttachmentListBeforeSave()
@Deprecated public void deleteDocumentAttachment()
@Deprecated public void deleteDocumentAttachmentList()
public void validateBusinessRules(org.kuali.rice.krad.rules.rule.event.DocumentEvent event)
validateBusinessRules in interface org.kuali.rice.krad.document.DocumentvalidateBusinessRules in class DocumentBaseDocumentBase.validateBusinessRules(org.kuali.rice.krad.rules.rule.event.DocumentEvent)protected void checkForLockingDocument(boolean throwExceptionIfLocked)
public void postProcessSave(org.kuali.rice.krad.rules.rule.event.DocumentEvent event)
postProcessSave in interface org.kuali.rice.krad.document.DocumentpostProcessSave in class DocumentBaseDocumentBase.postProcessSave(org.kuali.rice.krad.rules.rule.event.DocumentEvent)public Object getDocumentDataObject()
getDocumentDataObject in interface org.kuali.rice.krad.maintenance.MaintenanceDocumentMaintenanceDocument.getDocumentDataObject()public org.kuali.rice.core.api.mo.common.GloballyUnique 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.isNotesEnabled().
The note target is then derived as follows:
Maintainable supports business object
notes, delegate to getDocumentDataObject(). DocumentHeader. getNoteTarget in interface org.kuali.rice.krad.document.DocumentgetNoteTarget in class DocumentBaseDocument.getNoteTarget()public org.kuali.rice.krad.util.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 Maintainable.isNotesEnabled(). The NoteType is then derived as follows: Maintainable supports business object notes, return NoteType.BUSINESS_OBJECT. DocumentBase.getNoteType() getNoteType in interface org.kuali.rice.krad.document.DocumentgetNoteType in class DocumentBaseDocument.getNoteType(),
Document.getNoteTarget()public org.kuali.rice.krad.util.documentserializer.PropertySerializabilityEvaluator getDocumentPropertySerizabilityEvaluator()
DocumentBaseBusinessObjectPropertySerializibilityEvaluator initialized with the properties. If none have been
defined, then returns
AlwaysTruePropertySerializibilityEvaluator.getDocumentPropertySerizabilityEvaluator in interface org.kuali.rice.krad.document.DocumentgetDocumentPropertySerizabilityEvaluator in class DocumentBaseDocument.getDocumentPropertySerizabilityEvaluator()public org.kuali.rice.krad.bo.DocumentAttachment getAttachment()
public void setAttachment(org.kuali.rice.krad.bo.DocumentAttachment attachment)
public List<org.kuali.rice.krad.bo.MultiDocumentAttachment> getAttachments()
public void setAttachments(List<org.kuali.rice.krad.bo.MultiDocumentAttachment> attachments)
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 boolean isSessionDocument()
public boolean useCustomLockDescriptors()
useCustomLockDescriptors in interface org.kuali.rice.krad.document.DocumentuseCustomLockDescriptors in class DocumentBaseDocument.useCustomLockDescriptors(),
Maintainable.useCustomLockDescriptors()public String getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person user)
getCustomLockDescriptor in interface org.kuali.rice.krad.document.DocumentgetCustomLockDescriptor in class DocumentBaseDocument.getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person),
Maintainable.getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person)protected org.kuali.rice.krad.service.DocumentDictionaryService getDocumentDictionaryService()
protected org.kuali.rice.krad.service.MaintenanceDocumentService getMaintenanceDocumentService()
protected org.kuali.rice.krad.service.DocumentService getDocumentService()
protected org.kuali.rice.krad.service.BusinessObjectSerializerService getBusinessObjectSerializerService()
protected boolean checkAllowsRecordDeletion()
protected boolean checkMaintenanceAction()
protected boolean checkDeletePermission(Object dataObject)
public String getInitiatorChartOfAccountsCode()
protected String[] getInitiatorPrimaryDepartmentCode()
public String getInitiatorOrganizationCode()
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.