|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kns.bo.BusinessObjectBase org.kuali.rice.kns.bo.PersistableBusinessObjectBase org.kuali.rice.kns.document.DocumentBase org.kuali.rice.kns.document.MaintenanceDocumentBase
public class MaintenanceDocumentBase
The maintenance xml structure will be:
Field Summary | |
---|---|
protected DocumentAttachment |
attachment
|
protected String |
attachmentPropertyName
|
protected boolean |
displayTopicFieldInNotes
|
protected boolean |
fieldsClearedOnCopy
|
protected org.apache.struts.upload.FormFile |
fileAttachment
|
static String |
MAINTAINABLE_IMPL_CLASS
|
static String |
MAINTENANCE_ACTION_TAG_NAME
|
static String |
NEW_MAINTAINABLE_TAG_NAME
|
protected Maintainable |
newMaintainableObject
|
static String |
OLD_MAINTAINABLE_TAG_NAME
|
protected Maintainable |
oldMaintainableObject
|
protected String |
xmlDocumentContents
|
Fields inherited from class org.kuali.rice.kns.document.DocumentBase |
---|
documentBusinessObject, documentHeader, documentNumber |
Fields inherited from class org.kuali.rice.kns.bo.PersistableBusinessObjectBase |
---|
extension, versionNumber |
Constructor Summary | |
---|---|
MaintenanceDocumentBase()
|
|
MaintenanceDocumentBase(String documentTypeName)
Initializies the maintainables. |
Method Summary | |
---|---|
void |
afterDelete(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
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 |
afterLookup(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
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 |
beforeInsert(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
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 |
void |
beforeUpdate(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
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 |
protected boolean |
checkAllowsRecordDeletion()
|
protected boolean |
checkDeletePermission(BusinessObject businessObject)
|
protected void |
checkForLockingDocument(boolean throwExceptionIfLocked)
|
protected boolean |
checkMaintenanceAction()
|
void |
deleteDocumentAttachment()
|
void |
doRouteStatusChange(DocumentRouteStatusChangeDTO 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 |
getAttachmentPropertyName()
|
protected PersistableBusinessObject |
getBusinessObjectFromXML(String maintainableTagName)
Retrieves substring of document contents from maintainable tag name. |
String |
getCustomLockDescriptor(Person user)
Returns the custom lock descriptor generated by the new maintainable object, if defined. |
boolean |
getDisplayTopicFieldInNotes()
This method... |
PersistableBusinessObject |
getDocumentBusinessObject()
Gets the documentBusinessObject attribute. |
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. |
String |
getDocumentTitle()
Builds out the document title for maintenance documents - this will get loaded into the flex doc and passed into workflow. |
org.apache.struts.upload.FormFile |
getFileAttachment()
|
protected String |
getMaintenanceAction(Document xmlDocument,
String oldOrNewElementName)
This method is a lame containment of ugly DOM walking code. |
protected MaintenanceDocumentDictionaryService |
getMaintenanceDocumentDictionaryService()
|
protected MaintenanceDocumentService |
getMaintenanceDocumentService()
|
Maintainable |
getNewMaintainableObject()
|
Maintainable |
getOldMaintainableObject()
|
List<Long> |
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 isOldBusinessObjectInDocument(), so that the method name matches the functionality. |
boolean |
isFieldsClearedOnCopy()
Gets the fieldsClearedOnCopy attribute. |
boolean |
isNew()
This method is a simplified-naming wrapper around isOldBusinessObjectInDocument(), 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 |
isOldBusinessObjectInDocument()
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 |
populateAttachmentForBO()
|
void |
populateDocumentAttachment()
|
void |
populateMaintainablesFromXmlDocumentContents()
Populates the old and new maintainables from the xml document contents string. |
void |
populateXmlDocumentContentsFromMaintainables()
Populates the xml document contents from the maintainables. |
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 |
void |
prepareForSave()
Pre-Save hook. |
void |
prepareForSave(KualiDocumentEvent event)
Override this method with implementation specific prepareForSave logic |
void |
processAfterRetrieve()
This is the default implementation which ensures that document note attachment references are loaded. |
protected void |
refreshAttachment()
The attachment BO is proxied in OJB. |
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 |
setAttachmentPropertyName(String attachmentPropertyName)
|
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 |
setFileAttachment(org.apache.struts.upload.FormFile fileAttachment)
|
void |
setNewMaintainableObject(Maintainable newMaintainableObject)
|
void |
setOldMaintainableObject(Maintainable oldMaintainableObject)
|
void |
setXmlDocumentContents(String xmlDocumentContents)
Sets the xmlDocumentContents attribute value. |
protected LinkedHashMap |
toStringMapper()
|
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.kns.bo.BusinessObjectBase |
---|
prepareForWorkflow |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.kuali.rice.kns.bo.PersistableBusinessObject |
---|
addNote, buildListOfDeletionAwareLists, deleteNote, getBoNote, getBoNotes, getExtension, getObjectId, getVersionNumber, isBoNotesSupport, isNewCollectionRecord, linkEditableUserFields, refreshNonUpdateableReferences, refreshReferenceObject, setAutoIncrementSet, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber |
Methods inherited from interface org.kuali.rice.kns.bo.BusinessObject |
---|
prepareForWorkflow, refresh |
Methods inherited from interface org.apache.ojb.broker.PersistenceBrokerAware |
---|
afterInsert, afterUpdate, beforeDelete |
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
protected Maintainable oldMaintainableObject
protected Maintainable newMaintainableObject
protected String xmlDocumentContents
protected boolean fieldsClearedOnCopy
protected boolean displayTopicFieldInNotes
protected transient org.apache.struts.upload.FormFile fileAttachment
protected String attachmentPropertyName
protected DocumentAttachment attachment
Constructor Detail |
---|
public MaintenanceDocumentBase()
public MaintenanceDocumentBase(String documentTypeName)
Method Detail |
---|
public org.apache.struts.upload.FormFile getFileAttachment()
public void setFileAttachment(org.apache.struts.upload.FormFile fileAttachment)
public String getAttachmentPropertyName()
public void setAttachmentPropertyName(String attachmentPropertyName)
public String getDocumentTitle()
getDocumentTitle
in interface Document
getDocumentTitle
in class DocumentBase
Document.getDocumentTitle()
protected boolean isOldMaintainableInDocument(Document xmlDocument)
xmlDocument
-
public boolean isOldBusinessObjectInDocument()
isOldBusinessObjectInDocument
in interface MaintenanceDocument
public boolean isNew()
isNew
in interface MaintenanceDocument
public boolean isEdit()
isEdit
in interface MaintenanceDocument
public boolean isNewWithExisting()
MaintenanceDocument
isNewWithExisting
in interface MaintenanceDocument
public void populateMaintainablesFromXmlDocumentContents()
MaintenanceDocument
populateMaintainablesFromXmlDocumentContents
in interface MaintenanceDocument
protected String getMaintenanceAction(Document xmlDocument, String oldOrNewElementName)
xmlDocument
- oldOrNewElementName
- - String oldMaintainableObject or newMaintainableObject
protected PersistableBusinessObject getBusinessObjectFromXML(String maintainableTagName)
public void populateXmlDocumentContentsFromMaintainables()
populateXmlDocumentContentsFromMaintainables
in interface MaintenanceDocument
MaintenanceDocument.populateXmlDocumentContentsFromMaintainables()
public void doRouteStatusChange(DocumentRouteStatusChangeDTO statusChangeEvent)
Document
doRouteStatusChange
in interface Document
doRouteStatusChange
in class DocumentBase
DocumentBase.doRouteStatusChange(org.kuali.rice.kew.dto.DocumentRouteStatusChangeDTO)
public List<Long> getWorkflowEngineDocumentIdsToLock()
DocumentBase
getWorkflowEngineDocumentIdsToLock
in interface Document
getWorkflowEngineDocumentIdsToLock
in class DocumentBase
Document.getWorkflowEngineDocumentIdsToLock()
public void prepareForSave()
prepareForSave
in interface Document
prepareForSave
in class DocumentBase
Document.prepareForSave()
public void processAfterRetrieve()
DocumentBase
processAfterRetrieve
in interface Document
processAfterRetrieve
in class DocumentBase
DocumentBase.processAfterRetrieve()
public Maintainable getNewMaintainableObject()
getNewMaintainableObject
in interface MaintenanceDocument
public void setNewMaintainableObject(Maintainable newMaintainableObject)
setNewMaintainableObject
in interface MaintenanceDocument
newMaintainableObject
- The newMaintainableObject to set.public Maintainable getOldMaintainableObject()
getOldMaintainableObject
in interface MaintenanceDocument
public void setOldMaintainableObject(Maintainable oldMaintainableObject)
setOldMaintainableObject
in interface MaintenanceDocument
oldMaintainableObject
- The oldMaintainableObject to set.public void setDocumentNumber(String documentNumber)
Document
setDocumentNumber
in interface Document
setDocumentNumber
in class DocumentBase
Document.setDocumentNumber(java.lang.String)
public final boolean isFieldsClearedOnCopy()
isFieldsClearedOnCopy
in interface MaintenanceDocument
public final void setFieldsClearedOnCopy(boolean fieldsClearedOnCopy)
setFieldsClearedOnCopy
in interface MaintenanceDocument
fieldsClearedOnCopy
- The fieldsClearedOnCopy to set.protected LinkedHashMap toStringMapper()
toStringMapper
in class DocumentBase
BusinessObjectBase.toStringMapper()
public String getXmlDocumentContents()
getXmlDocumentContents
in interface MaintenanceDocument
public void setXmlDocumentContents(String xmlDocumentContents)
setXmlDocumentContents
in interface MaintenanceDocument
xmlDocumentContents
- The xmlDocumentContents to set.public boolean getAllowsCopy()
Document
getAllowsCopy
in interface Document
getAllowsCopy
in class DocumentBase
Document.getAllowsCopy()
public boolean getDisplayTopicFieldInNotes()
MaintenanceDocument
getDisplayTopicFieldInNotes
in interface MaintenanceDocument
MaintenanceDocument.getDisplayTopicFieldInNotes()
public void setDisplayTopicFieldInNotes(boolean displayTopicFieldInNotes)
MaintenanceDocument
setDisplayTopicFieldInNotes
in interface MaintenanceDocument
MaintenanceDocument.setDisplayTopicFieldInNotes(boolean)
public String serializeDocumentToXml()
Document
serializeDocumentToXml
in interface Document
serializeDocumentToXml
in class DocumentBase
Document.serializeDocumentToXml()
public void prepareForSave(KualiDocumentEvent event)
DocumentBase
prepareForSave
in interface Document
prepareForSave
in class DocumentBase
event
- - indicates which document event was requestedDocument.prepareForSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent)
protected void refreshAttachment()
public void populateAttachmentForBO()
public void populateDocumentAttachment()
public void deleteDocumentAttachment()
public void validateBusinessRules(KualiDocumentEvent event)
validateBusinessRules
in interface Document
validateBusinessRules
in class DocumentBase
event
- - indicates which document event was requestedDocumentBase.validateBusinessRules(org.kuali.rice.kns.rule.event.KualiDocumentEvent)
protected void checkForLockingDocument(boolean throwExceptionIfLocked)
public void postProcessSave(KualiDocumentEvent event)
postProcessSave
in interface Document
postProcessSave
in class DocumentBase
event
- - indicates which document event was requestedDocumentBase.postProcessSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent)
public PersistableBusinessObject getDocumentBusinessObject()
DocumentBase
getDocumentBusinessObject
in interface Document
getDocumentBusinessObject
in class DocumentBase
DocumentBase.getDocumentBusinessObject()
public PropertySerializabilityEvaluator getDocumentPropertySerizabilityEvaluator()
DocumentBase
BusinessObjectPropertySerializibilityEvaluator
initialized with the properties. If none have been defined, then returns
AlwaysTruePropertySerializibilityEvaluator
.
getDocumentPropertySerizabilityEvaluator
in interface Document
getDocumentPropertySerizabilityEvaluator
in class DocumentBase
Document.getDocumentPropertySerizabilityEvaluator()
public DocumentAttachment getAttachment()
public void setAttachment(DocumentAttachment attachment)
public void afterDelete(org.apache.ojb.broker.PersistenceBroker persistenceBroker) throws org.apache.ojb.broker.PersistenceBrokerException
DocumentHeader
object due to the system not being able to manage the DocumentHeader
object via mapping files
afterDelete
in interface org.apache.ojb.broker.PersistenceBrokerAware
afterDelete
in class PersistableBusinessObjectBase
org.apache.ojb.broker.PersistenceBrokerException
PersistableBusinessObjectBase.afterDelete(org.apache.ojb.broker.PersistenceBroker)
public void afterLookup(org.apache.ojb.broker.PersistenceBroker persistenceBroker) throws org.apache.ojb.broker.PersistenceBrokerException
DocumentHeader
object due to the system not being able to manage the DocumentHeader
object via mapping files
afterLookup
in interface org.apache.ojb.broker.PersistenceBrokerAware
afterLookup
in class DocumentBase
org.apache.ojb.broker.PersistenceBrokerException
PersistableBusinessObjectBase.afterLookup(org.apache.ojb.broker.PersistenceBroker)
public void beforeInsert(org.apache.ojb.broker.PersistenceBroker persistenceBroker) throws org.apache.ojb.broker.PersistenceBrokerException
DocumentHeader
object due to the system not being able to manage the DocumentHeader
object via mapping files
beforeInsert
in interface org.apache.ojb.broker.PersistenceBrokerAware
beforeInsert
in class PersistableBusinessObjectBase
org.apache.ojb.broker.PersistenceBrokerException
PersistableBusinessObjectBase.beforeInsert(org.apache.ojb.broker.PersistenceBroker)
public void beforeUpdate(org.apache.ojb.broker.PersistenceBroker persistenceBroker) throws org.apache.ojb.broker.PersistenceBrokerException
DocumentHeader
object due to the system not being able to manage the DocumentHeader
object via mapping files
beforeUpdate
in interface org.apache.ojb.broker.PersistenceBrokerAware
beforeUpdate
in class PersistableBusinessObjectBase
org.apache.ojb.broker.PersistenceBrokerException
PersistableBusinessObjectBase.beforeUpdate(org.apache.ojb.broker.PersistenceBroker)
public boolean isSessionDocument()
public boolean useCustomLockDescriptors()
useCustomLockDescriptors
in interface Document
useCustomLockDescriptors
in class DocumentBase
Document.useCustomLockDescriptors()
,
Maintainable.useCustomLockDescriptors()
public String getCustomLockDescriptor(Person user)
getCustomLockDescriptor
in interface Document
getCustomLockDescriptor
in class DocumentBase
user
- The user trying to establish the lock.
Document.getCustomLockDescriptor(org.kuali.rice.kim.bo.Person)
,
Maintainable.getCustomLockDescriptor(org.kuali.rice.kim.bo.Person)
protected MaintenanceDocumentDictionaryService getMaintenanceDocumentDictionaryService()
protected MaintenanceDocumentService getMaintenanceDocumentService()
protected DocumentHeaderService getDocumentHeaderService()
protected boolean checkAllowsRecordDeletion()
protected boolean checkMaintenanceAction()
protected boolean checkDeletePermission(BusinessObject businessObject)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |