org.kuali.rice.kns.document
Class MaintenanceDocumentBase

java.lang.Object
  extended by org.kuali.rice.kns.bo.BusinessObjectBase
      extended by org.kuali.rice.kns.bo.PersistableBusinessObjectBase
          extended by org.kuali.rice.kns.document.DocumentBase
              extended by org.kuali.rice.kns.document.MaintenanceDocumentBase
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, BusinessObject, PersistableBusinessObject, Document, MaintenanceDocument, SessionDocument

public class MaintenanceDocumentBase
extends DocumentBase
implements MaintenanceDocument, SessionDocument

The maintenance xml structure will be: ... ... Maintenance Document

See Also:
Serialized Form

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.document.DocumentBase
addCopyErrorDocumentNote, addPessimisticLock, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, createPropertySerializabilityEvaluator, doActionTaken, doRouteLevelChange, generateSaveEvents, getAdHocRoutePersons, getAdHocRouteWorkgroups, getBasePathToDocumentDuringSerialization, getDocumentHeader, getDocumentNumber, getLockClearningMethodNames, getNonLockingActionTakenCodes, getPessimisticLocks, getXmlForRouteReport, logErrors, populateDocumentForRouting, refresh, refreshIfEmpty, refreshPessimisticLocks, refreshReferenceObject, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentHeader, setNewDocumentHeader, setPessimisticLocks, toCopy, toString, toStringBuilder, wrapDocumentWithMetadataForXmlSerialization
 
Methods inherited from class org.kuali.rice.kns.bo.PersistableBusinessObjectBase
addNote, afterInsert, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, buildListOfDeletionAwareLists, deleteNote, getAttachmentService, getBoNote, getBoNotes, getExtension, getNoteService, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isAutoIncrementSet, isBoNotesSupport, isNewCollectionRecord, linkEditableUserFields, refreshNonUpdateableReferences, setAutoIncrementSet, setBoNotes, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber, supportsBoNotes
 
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.document.Document
addPessimisticLock, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, doActionTaken, doRouteLevelChange, generateSaveEvents, getAdHocRoutePersons, getAdHocRouteWorkgroups, getBasePathToDocumentDuringSerialization, getDocumentHeader, getDocumentNumber, getLockClearningMethodNames, getPessimisticLocks, getXmlForRouteReport, populateDocumentForRouting, refreshPessimisticLocks, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentHeader, wrapDocumentWithMetadataForXmlSerialization
 
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

MAINTAINABLE_IMPL_CLASS

public static final String MAINTAINABLE_IMPL_CLASS
See Also:
Constant Field Values

OLD_MAINTAINABLE_TAG_NAME

public static final String OLD_MAINTAINABLE_TAG_NAME
See Also:
Constant Field Values

NEW_MAINTAINABLE_TAG_NAME

public static final String NEW_MAINTAINABLE_TAG_NAME
See Also:
Constant Field Values

MAINTENANCE_ACTION_TAG_NAME

public static final String MAINTENANCE_ACTION_TAG_NAME
See Also:
Constant Field Values

oldMaintainableObject

protected Maintainable oldMaintainableObject

newMaintainableObject

protected Maintainable newMaintainableObject

xmlDocumentContents

protected String xmlDocumentContents

fieldsClearedOnCopy

protected boolean fieldsClearedOnCopy

displayTopicFieldInNotes

protected boolean displayTopicFieldInNotes

fileAttachment

protected transient org.apache.struts.upload.FormFile fileAttachment

attachmentPropertyName

protected String attachmentPropertyName

attachment

protected DocumentAttachment attachment
Constructor Detail

MaintenanceDocumentBase

public MaintenanceDocumentBase()

MaintenanceDocumentBase

public MaintenanceDocumentBase(String documentTypeName)
Initializies the maintainables.

Method Detail

getFileAttachment

public org.apache.struts.upload.FormFile getFileAttachment()

setFileAttachment

public void setFileAttachment(org.apache.struts.upload.FormFile fileAttachment)

getAttachmentPropertyName

public String getAttachmentPropertyName()

setAttachmentPropertyName

public void setAttachmentPropertyName(String attachmentPropertyName)

getDocumentTitle

public String getDocumentTitle()
Builds out the document title for maintenance documents - this will get loaded into the flex doc and passed into workflow. It will be searchable.

Specified by:
getDocumentTitle in interface Document
Overrides:
getDocumentTitle in class DocumentBase
See Also:
Document.getDocumentTitle()

isOldMaintainableInDocument

protected boolean isOldMaintainableInDocument(Document xmlDocument)
Parameters:
xmlDocument -
Returns:

isOldBusinessObjectInDocument

public boolean isOldBusinessObjectInDocument()
Checks old maintainable bo has key values

Specified by:
isOldBusinessObjectInDocument in interface MaintenanceDocument
Returns:
boolean - indicates whether this is an edit or new maintenace document by the existence of an old maintainable

isNew

public boolean isNew()
This method is a simplified-naming wrapper around isOldBusinessObjectInDocument(), so that the method name matches the functionality.

Specified by:
isNew in interface MaintenanceDocument

isEdit

public boolean isEdit()
This method is a simplified-naming wrapper around isOldBusinessObjectInDocument(), so that the method name matches the functionality.

Specified by:
isEdit in interface MaintenanceDocument

isNewWithExisting

public boolean isNewWithExisting()
Description copied from interface: MaintenanceDocument
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.

Specified by:
isNewWithExisting in interface MaintenanceDocument

populateMaintainablesFromXmlDocumentContents

public void populateMaintainablesFromXmlDocumentContents()
Description copied from interface: MaintenanceDocument
Populates the old and new maintainables from the xml document contents string.

Specified by:
populateMaintainablesFromXmlDocumentContents in interface MaintenanceDocument

getMaintenanceAction

protected String getMaintenanceAction(Document xmlDocument,
                                      String oldOrNewElementName)
This method is a lame containment of ugly DOM walking code. This is ONLY necessary because of the version conflicts between Xalan.jar in 2.6.x and 2.7. As soon as we can upgrade to 2.7, this will be switched to using XPath, which is faster and much easier on the eyes.

Parameters:
xmlDocument -
oldOrNewElementName - - String oldMaintainableObject or newMaintainableObject
Returns:
the value of the element, or null if none was there

getBusinessObjectFromXML

protected PersistableBusinessObject getBusinessObjectFromXML(String maintainableTagName)
Retrieves substring of document contents from maintainable tag name. Then use xml service to translate xml into a business object.


populateXmlDocumentContentsFromMaintainables

public void populateXmlDocumentContentsFromMaintainables()
Populates the xml document contents from the maintainables.

Specified by:
populateXmlDocumentContentsFromMaintainables in interface MaintenanceDocument
See Also:
MaintenanceDocument.populateXmlDocumentContentsFromMaintainables()

doRouteStatusChange

public void doRouteStatusChange(DocumentRouteStatusChangeDTO statusChangeEvent)
Description copied from interface: Document
Handle the doRouteStatusChange event from the post processor

Specified by:
doRouteStatusChange in interface Document
Overrides:
doRouteStatusChange in class DocumentBase
See Also:
DocumentBase.doRouteStatusChange(org.kuali.rice.kew.dto.DocumentRouteStatusChangeDTO)

getWorkflowEngineDocumentIdsToLock

public List<Long> getWorkflowEngineDocumentIdsToLock()
Description copied from class: DocumentBase
The default implementation returns no additional ids for the workflow engine to lock prior to processing.

Specified by:
getWorkflowEngineDocumentIdsToLock in interface Document
Overrides:
getWorkflowEngineDocumentIdsToLock in class DocumentBase
See Also:
Document.getWorkflowEngineDocumentIdsToLock()

prepareForSave

public void prepareForSave()
Pre-Save hook.

Specified by:
prepareForSave in interface Document
Overrides:
prepareForSave in class DocumentBase
See Also:
Document.prepareForSave()

processAfterRetrieve

public void processAfterRetrieve()
Description copied from class: DocumentBase
This is the default implementation which ensures that document note attachment references are loaded.

Specified by:
processAfterRetrieve in interface Document
Overrides:
processAfterRetrieve in class DocumentBase
See Also:
DocumentBase.processAfterRetrieve()

getNewMaintainableObject

public Maintainable getNewMaintainableObject()
Specified by:
getNewMaintainableObject in interface MaintenanceDocument
Returns:
Returns the newMaintainableObject.

setNewMaintainableObject

public void setNewMaintainableObject(Maintainable newMaintainableObject)
Specified by:
setNewMaintainableObject in interface MaintenanceDocument
Parameters:
newMaintainableObject - The newMaintainableObject to set.

getOldMaintainableObject

public Maintainable getOldMaintainableObject()
Specified by:
getOldMaintainableObject in interface MaintenanceDocument
Returns:
Returns the oldMaintainableObject.

setOldMaintainableObject

public void setOldMaintainableObject(Maintainable oldMaintainableObject)
Specified by:
setOldMaintainableObject in interface MaintenanceDocument
Parameters:
oldMaintainableObject - The oldMaintainableObject to set.

setDocumentNumber

public void setDocumentNumber(String documentNumber)
Description copied from interface: Document
setter for document header id

Specified by:
setDocumentNumber in interface Document
Overrides:
setDocumentNumber in class DocumentBase
See Also:
Document.setDocumentNumber(java.lang.String)

isFieldsClearedOnCopy

public final boolean isFieldsClearedOnCopy()
Gets the fieldsClearedOnCopy attribute.

Specified by:
isFieldsClearedOnCopy in interface MaintenanceDocument
Returns:
Returns the fieldsClearedOnCopy.

setFieldsClearedOnCopy

public final void setFieldsClearedOnCopy(boolean fieldsClearedOnCopy)
Sets the fieldsClearedOnCopy attribute value.

Specified by:
setFieldsClearedOnCopy in interface MaintenanceDocument
Parameters:
fieldsClearedOnCopy - The fieldsClearedOnCopy to set.

toStringMapper

protected LinkedHashMap toStringMapper()
Overrides:
toStringMapper in class DocumentBase
Returns:
Map containing the fieldValues of the key fields for this class, indexed by fieldName
See Also:
BusinessObjectBase.toStringMapper()

getXmlDocumentContents

public String getXmlDocumentContents()
Gets the xmlDocumentContents attribute.

Specified by:
getXmlDocumentContents in interface MaintenanceDocument
Returns:
Returns the xmlDocumentContents.

setXmlDocumentContents

public void setXmlDocumentContents(String xmlDocumentContents)
Sets the xmlDocumentContents attribute value.

Specified by:
setXmlDocumentContents in interface MaintenanceDocument
Parameters:
xmlDocumentContents - The xmlDocumentContents to set.

getAllowsCopy

public boolean getAllowsCopy()
Description copied from interface: Document
This method returns whether or not this document can be copied.

Specified by:
getAllowsCopy in interface Document
Overrides:
getAllowsCopy in class DocumentBase
Returns:
True if it can be copied, false if not.
See Also:
Document.getAllowsCopy()

getDisplayTopicFieldInNotes

public boolean getDisplayTopicFieldInNotes()
Description copied from interface: MaintenanceDocument
This method...

Specified by:
getDisplayTopicFieldInNotes in interface MaintenanceDocument
Returns:
See Also:
MaintenanceDocument.getDisplayTopicFieldInNotes()

setDisplayTopicFieldInNotes

public void setDisplayTopicFieldInNotes(boolean displayTopicFieldInNotes)
Description copied from interface: MaintenanceDocument
This method...

Specified by:
setDisplayTopicFieldInNotes in interface MaintenanceDocument
See Also:
MaintenanceDocument.setDisplayTopicFieldInNotes(boolean)

serializeDocumentToXml

public String serializeDocumentToXml()
Description copied from interface: Document
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.

Specified by:
serializeDocumentToXml in interface Document
Overrides:
serializeDocumentToXml in class DocumentBase
Returns:
the document serialized to an xml string
See Also:
Document.serializeDocumentToXml()

prepareForSave

public void prepareForSave(KualiDocumentEvent event)
Description copied from class: DocumentBase
Override this method with implementation specific prepareForSave logic

Specified by:
prepareForSave in interface Document
Overrides:
prepareForSave in class DocumentBase
Parameters:
event - - indicates which document event was requested
See Also:
Document.prepareForSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent)

refreshAttachment

protected void refreshAttachment()
The attachment BO is proxied in OJB. For some reason when an attachment does not yet exist, refreshReferenceObject is not returning null and the proxy cannot be materialized. So, this method exists to properly handle the proxied attachment BO. This is a hack and should be removed post JPA migration.


populateAttachmentForBO

public void populateAttachmentForBO()

populateDocumentAttachment

public void populateDocumentAttachment()

deleteDocumentAttachment

public void deleteDocumentAttachment()

validateBusinessRules

public void validateBusinessRules(KualiDocumentEvent event)
Explicitly NOT calling super here. This is a complete override of the validation rules behavior.

Specified by:
validateBusinessRules in interface Document
Overrides:
validateBusinessRules in class DocumentBase
Parameters:
event - - indicates which document event was requested
See Also:
DocumentBase.validateBusinessRules(org.kuali.rice.kns.rule.event.KualiDocumentEvent)

checkForLockingDocument

protected void checkForLockingDocument(boolean throwExceptionIfLocked)

postProcessSave

public 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

Specified by:
postProcessSave in interface Document
Overrides:
postProcessSave in class DocumentBase
Parameters:
event - - indicates which document event was requested
See Also:
DocumentBase.postProcessSave(org.kuali.rice.kns.rule.event.KualiDocumentEvent)

getDocumentBusinessObject

public PersistableBusinessObject getDocumentBusinessObject()
Description copied from class: DocumentBase
Gets the documentBusinessObject attribute.

Specified by:
getDocumentBusinessObject in interface Document
Overrides:
getDocumentBusinessObject in class DocumentBase
Returns:
Returns the documentBusinessObject.
See Also:
DocumentBase.getDocumentBusinessObject()

getDocumentPropertySerizabilityEvaluator

public PropertySerializabilityEvaluator getDocumentPropertySerizabilityEvaluator()
Description copied from class: DocumentBase
If workflowProperties have been defined within the data dictionary for this document, then it returns an instance of BusinessObjectPropertySerializibilityEvaluator initialized with the properties. If none have been defined, then returns AlwaysTruePropertySerializibilityEvaluator.

Specified by:
getDocumentPropertySerizabilityEvaluator in interface Document
Overrides:
getDocumentPropertySerizabilityEvaluator in class DocumentBase
Returns:
a fully initialized evaluator object, ready to be used for workflow routing
See Also:
Document.getDocumentPropertySerizabilityEvaluator()

getAttachment

public DocumentAttachment getAttachment()

setAttachment

public void setAttachment(DocumentAttachment attachment)

afterDelete

public void afterDelete(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
                 throws org.apache.ojb.broker.PersistenceBrokerException
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

Specified by:
afterDelete in interface org.apache.ojb.broker.PersistenceBrokerAware
Overrides:
afterDelete in class PersistableBusinessObjectBase
Throws:
org.apache.ojb.broker.PersistenceBrokerException
See Also:
PersistableBusinessObjectBase.afterDelete(org.apache.ojb.broker.PersistenceBroker)

afterLookup

public void afterLookup(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
                 throws org.apache.ojb.broker.PersistenceBrokerException
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

Specified by:
afterLookup in interface org.apache.ojb.broker.PersistenceBrokerAware
Overrides:
afterLookup in class DocumentBase
Throws:
org.apache.ojb.broker.PersistenceBrokerException
See Also:
PersistableBusinessObjectBase.afterLookup(org.apache.ojb.broker.PersistenceBroker)

beforeInsert

public void beforeInsert(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
                  throws org.apache.ojb.broker.PersistenceBrokerException
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

Specified by:
beforeInsert in interface org.apache.ojb.broker.PersistenceBrokerAware
Overrides:
beforeInsert in class PersistableBusinessObjectBase
Throws:
org.apache.ojb.broker.PersistenceBrokerException
See Also:
PersistableBusinessObjectBase.beforeInsert(org.apache.ojb.broker.PersistenceBroker)

beforeUpdate

public void beforeUpdate(org.apache.ojb.broker.PersistenceBroker persistenceBroker)
                  throws org.apache.ojb.broker.PersistenceBrokerException
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

Specified by:
beforeUpdate in interface org.apache.ojb.broker.PersistenceBrokerAware
Overrides:
beforeUpdate in class PersistableBusinessObjectBase
Throws:
org.apache.ojb.broker.PersistenceBrokerException
See Also:
PersistableBusinessObjectBase.beforeUpdate(org.apache.ojb.broker.PersistenceBroker)

isSessionDocument

public boolean isSessionDocument()
This method to check whether the document class implements SessionDocument

Returns:

useCustomLockDescriptors

public boolean useCustomLockDescriptors()
Returns whether or not the new maintainable object supports custom lock descriptors. Will always return false if the new maintainable is null.

Specified by:
useCustomLockDescriptors in interface Document
Overrides:
useCustomLockDescriptors in class DocumentBase
Returns:
True if the document can generate custom lock descriptors, false otherwise.
See Also:
Document.useCustomLockDescriptors(), Maintainable.useCustomLockDescriptors()

getCustomLockDescriptor

public String getCustomLockDescriptor(Person user)
Returns the custom lock descriptor generated by the new maintainable object, if defined. Will throw a PessimisticLockingException if the new maintainable is null.

Specified by:
getCustomLockDescriptor in interface Document
Overrides:
getCustomLockDescriptor in class DocumentBase
Parameters:
user - The user trying to establish the lock.
Returns:
A String representing the lock descriptor.
See Also:
Document.getCustomLockDescriptor(org.kuali.rice.kim.bo.Person), Maintainable.getCustomLockDescriptor(org.kuali.rice.kim.bo.Person)

getMaintenanceDocumentDictionaryService

protected MaintenanceDocumentDictionaryService getMaintenanceDocumentDictionaryService()

getMaintenanceDocumentService

protected MaintenanceDocumentService getMaintenanceDocumentService()

getDocumentHeaderService

protected DocumentHeaderService getDocumentHeaderService()

checkAllowsRecordDeletion

protected boolean checkAllowsRecordDeletion()

checkMaintenanceAction

protected boolean checkMaintenanceAction()

checkDeletePermission

protected boolean checkDeletePermission(BusinessObject businessObject)


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.