org.kuali.rice.krad.maintenance
Class MaintenanceDocumentBase

java.lang.Object
  extended by org.kuali.rice.krad.bo.BusinessObjectBase
      extended by org.kuali.rice.krad.bo.PersistableBusinessObjectBase
          extended by org.kuali.rice.krad.document.DocumentBase
              extended by org.kuali.rice.krad.maintenance.MaintenanceDocumentBase
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, GloballyUnique, Versioned, ModelObjectBasic, BusinessObject, PersistableBusinessObject, Document, SessionDocument, MaintenanceDocument
Direct Known Subclasses:
MaintenanceDocumentBase

@Entity
public class MaintenanceDocumentBase
extends DocumentBase
implements MaintenanceDocument, SessionDocument

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: ... ... Maintenance Document

See Also:
Serialized Form

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)
          Get data object from XML
 Object getDocumentDataObject()
          Return 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
protected  String getMaintenanceAction(Document xmlDocument, String oldOrNewElementName)
          This method is a lame containment of ugly DOM walking code.
protected  MaintenanceDocumentService getMaintenanceDocumentService()
           
 Maintainable getNewMaintainableObject()
          Get the new maintainable object
 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()
          Get the old maintainable object
 List<String> getWorkflowEngineDocumentIdsToLock()
          The default implementation returns no additional ids for the workflow engine to lock prior to processing.
 String getXmlDocumentContents()
          Get the XML representation of the maintenance document
 boolean isDisplayTopicFieldInNotes()
          Check if the topic field should be displayed in the notes section
 boolean isEdit()
          Check if maintenance document is editing an existing Business Object
 boolean isFieldsClearedOnCopy()
          Check if fields are cleared on copy
 boolean isNew()
          Check if maintenance document is creating a new Business Object
 boolean isNewWithExisting()
          Check if maintenance document is creating a new Business Object out of an existing Business Object
 boolean isOldDataObjectInDocument()
          Check if maintenance document has old maintenance data
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
 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()
          Build the xml document string from the contents of the old and new 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()
          This method provides a hook that will be called before the document is saved.
 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()
          Overridden to avoid serializing the xml twice, because of the xmlDocumentContents property of this object
 void setAttachment(DocumentAttachment attachment)
           
 void setAttachmentCollectionName(String attachmentCollectionName)
           
 void setAttachmentListPropertyName(String attachmentListPropertyName)
           
 void setAttachmentPropertyName(String attachmentPropertyName)
           
 void setAttachments(List<MultiDocumentAttachment> attachment)
           
 void setDisplayTopicFieldInNotes(boolean displayTopicFieldInNotes)
          Set the display topic field in notes flag
 void setDocumentNumber(String documentNumber)
          setter for document header id
 void setFieldsClearedOnCopy(boolean fieldsClearedOnCopy)
          Set the keys cleared on copy flag
 void setNewMaintainableObject(Maintainable newMaintainableObject)
          Set the new maintainable object
 void setOldMaintainableObject(Maintainable oldMaintainableObject)
          Set the old maintainable object
 void setXmlDocumentContents(String xmlDocumentContents)
          Sets the xml contents of the maintenance document
 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.document.DocumentBase
addCopyErrorDocumentNote, addNote, addPessimisticLock, afterActionTaken, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, createPropertySerializabilityEvaluator, doActionTaken, doRouteLevelChange, generateSaveEvents, getAdHocRoutePersons, getAdHocRouteWorkgroups, getAttachmentService, getBasePathToDocumentDuringSerialization, getDocumentHeader, getDocumentNumber, getLockClearningMethodNames, getNonLockingActionTakenCodes, getNote, getNotes, getNoteService, getPessimisticLocks, getXmlForRouteReport, logErrors, populateDocumentForRouting, refresh, refreshIfEmpty, refreshPessimisticLocks, refreshReferenceObject, removeNote, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentHeader, setNewDocumentHeader, setNotes, setPessimisticLocks, toCopy, wrapDocumentWithMetadataForXmlSerialization
 
Methods inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, buildListOfDeletionAwareLists, getExtension, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isNewCollectionRecord, linkEditableUserFields, postPersist, postUpdate, preRemove, refreshNonUpdateableReferences, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber
 
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.document.Document
addNote, addPessimisticLock, afterActionTaken, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, doActionTaken, doRouteLevelChange, generateSaveEvents, getAdHocRoutePersons, getAdHocRouteWorkgroups, getBasePathToDocumentDuringSerialization, getDocumentHeader, getDocumentNumber, getLockClearningMethodNames, getNote, getNotes, getPessimisticLocks, getXmlForRouteReport, populateDocumentForRouting, refreshPessimisticLocks, removeNote, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentHeader, setNotes, wrapDocumentWithMetadataForXmlSerialization
 
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

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

NOTES_TAG_NAME

public static final String NOTES_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

attachmentPropertyName

protected String attachmentPropertyName

attachmentListPropertyName

protected String attachmentListPropertyName

attachmentCollectionName

protected String attachmentCollectionName

attachment

protected DocumentAttachment attachment

attachments

protected List<MultiDocumentAttachment> attachments
Constructor Detail

MaintenanceDocumentBase

public MaintenanceDocumentBase()

MaintenanceDocumentBase

public MaintenanceDocumentBase(String documentTypeName)
Initializies the maintainables.

Method Detail

getAttachmentPropertyName

public String getAttachmentPropertyName()

setAttachmentPropertyName

public void setAttachmentPropertyName(String attachmentPropertyName)

getAttachmentListPropertyName

public String getAttachmentListPropertyName()

setAttachmentListPropertyName

public void setAttachmentListPropertyName(String attachmentListPropertyName)

getAttachmentCollectionName

public String getAttachmentCollectionName()

setAttachmentCollectionName

public void setAttachmentCollectionName(String attachmentCollectionName)

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
Returns:
document title
See Also:
Document.getDocumentTitle()

isOldMaintainableInDocument

protected boolean isOldMaintainableInDocument(Document xmlDocument)
Check if oldMaintainable is specified in the XML of the maintenance document

Parameters:
xmlDocument - Maintenance document in XML form
Returns:
true if an oldMainainable exists in the xmlDocument, false otherwise

isOldDataObjectInDocument

public boolean isOldDataObjectInDocument()
Description copied from interface: MaintenanceDocument
Check if maintenance document has old maintenance data

Specified by:
isOldDataObjectInDocument in interface MaintenanceDocument
Returns:
true if this maintenance document has old data, false otherwise
See Also:
Maintainable.isOldDataObjectInDocument()

isNew

public boolean isNew()
Description copied from interface: MaintenanceDocument
Check if maintenance document is creating a new Business Object

Specified by:
isNew in interface MaintenanceDocument
Returns:
true if this maintenance document is creating a new Business Object, false otherwise
See Also:
MaintenanceDocument.isNew()

isEdit

public boolean isEdit()
Description copied from interface: MaintenanceDocument
Check if maintenance document is editing an existing Business Object

Specified by:
isEdit in interface MaintenanceDocument
Returns:
true if this maintenance document is editing an existing Business Object, false otherwise
See Also:
MaintenanceDocument.isEdit()

isNewWithExisting

public boolean isNewWithExisting()
Description copied from interface: MaintenanceDocument
Check if 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
Returns:
true if maintenance document is creating a new Business Object out of an existing Business object, false otherwise
See Also:
MaintenanceDocument.isNewWithExisting()

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
See Also:
MaintenanceDocument.populateMaintainablesFromXmlDocumentContents()

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

getDataObjectFromXML

protected Object getDataObjectFromXML(String maintainableTagName)
Get data object from XML

Retrieves substring of document contents from maintainable tag name. Then use xml service to translate xml into a business object.

Parameters:
maintainableTagName - the xml tag name of the maintainable
Returns:
data object

populateXmlDocumentContentsFromMaintainables

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

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

doRouteStatusChange

public void doRouteStatusChange(DocumentRouteStatusChange 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.framework.postprocessor.DocumentRouteStatusChange)

getWorkflowEngineDocumentIdsToLock

public List<String> 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:
DocumentBase.getWorkflowEngineDocumentIdsToLock()

prepareForSave

public void prepareForSave()
Description copied from interface: Document
This method provides a hook that will be called before the document is saved. This method is useful for applying document level data to children. For example, if someone changes data at the document level, and that data needs to be propagated to child objects or child lists of objects, you can use this method to update the child object or iterate through the list of child objects and apply the document level data to them. Any document that follows this paradigm will need to make use of this method to apply all of those changes.

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

processAfterRetrieve

public void processAfterRetrieve()
Description copied from interface: Document
This method provides a hook that will be called after a document is retrieved, but before it is returned from the DocumentService.

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

getNewMaintainableObject

public Maintainable getNewMaintainableObject()
Description copied from interface: MaintenanceDocument
Get the new maintainable object

Specified by:
getNewMaintainableObject in interface MaintenanceDocument
Returns:
Maintainable which holds the new maintenance record
See Also:
MaintenanceDocument.getNewMaintainableObject()

setNewMaintainableObject

public void setNewMaintainableObject(Maintainable newMaintainableObject)
Description copied from interface: MaintenanceDocument
Set the new maintainable object

Specified by:
setNewMaintainableObject in interface MaintenanceDocument
Parameters:
newMaintainableObject - maintainable with the new maintenance record
See Also:
MaintenanceDocument.setNewMaintainableObject(Maintainable)

getOldMaintainableObject

public Maintainable getOldMaintainableObject()
Description copied from interface: MaintenanceDocument
Get the old maintainable object

Specified by:
getOldMaintainableObject in interface MaintenanceDocument
Returns:
Maintainable which holds the old maintenance record
See Also:
MaintenanceDocument.getOldMaintainableObject()

setOldMaintainableObject

public void setOldMaintainableObject(Maintainable oldMaintainableObject)
Description copied from interface: MaintenanceDocument
Set the old maintainable object

Specified by:
setOldMaintainableObject in interface MaintenanceDocument
Parameters:
oldMaintainableObject - maintainable with the old maintenance record
See Also:
MaintenanceDocument.setOldMaintainableObject(Maintainable)

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:
DocumentBase.setDocumentNumber(java.lang.String)

isFieldsClearedOnCopy

public final boolean isFieldsClearedOnCopy()
Description copied from interface: MaintenanceDocument
Check if fields are cleared on copy

For copy action the primary keys need to be cleared. This flag indicates if the clearing has occurred.

Specified by:
isFieldsClearedOnCopy in interface MaintenanceDocument
Returns:
true if the primary keys have been cleared already, false otherwise
See Also:
MaintenanceDocument.isFieldsClearedOnCopy()

setFieldsClearedOnCopy

public final void setFieldsClearedOnCopy(boolean fieldsClearedOnCopy)
Description copied from interface: MaintenanceDocument
Set the keys cleared on copy flag

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

getXmlDocumentContents

public String getXmlDocumentContents()
Description copied from interface: MaintenanceDocument
Get the XML representation of the maintenance document

Specified by:
getXmlDocumentContents in interface MaintenanceDocument
Returns:
String containing the xml representation of the maintenance document
See Also:
MaintenanceDocument.getXmlDocumentContents()

setXmlDocumentContents

public void setXmlDocumentContents(String xmlDocumentContents)
Description copied from interface: MaintenanceDocument
Sets the xml contents of the maintenance document

Specified by:
setXmlDocumentContents in interface MaintenanceDocument
Parameters:
xmlDocumentContents - String xml
See Also:
MaintenanceDocument.setXmlDocumentContents(String)

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()

isDisplayTopicFieldInNotes

public boolean isDisplayTopicFieldInNotes()
Description copied from interface: MaintenanceDocument
Check if the topic field should be displayed in the notes section

Specified by:
isDisplayTopicFieldInNotes in interface MaintenanceDocument
Returns:
true if the topic field should be displayed in the notes section, false otherwise
See Also:
MaintenanceDocument.isDisplayTopicFieldInNotes()

setDisplayTopicFieldInNotes

public void setDisplayTopicFieldInNotes(boolean displayTopicFieldInNotes)
Description copied from interface: MaintenanceDocument
Set the display topic field in notes flag

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

serializeDocumentToXml

public String serializeDocumentToXml()
Overridden to avoid serializing the xml twice, because of the xmlDocumentContents property of this object

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:
DocumentBase.prepareForSave(org.kuali.rice.krad.rules.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.


refreshAttachmentList

protected void refreshAttachmentList()

populateAttachmentForBO

public void populateAttachmentForBO()

populateDocumentAttachment

public void populateDocumentAttachment()

populateAttachmentListForBO

public void populateAttachmentListForBO()

populateAttachmentBeforeSave

public void populateAttachmentBeforeSave()

populateDocumentAttachmentList

public void populateDocumentAttachmentList()

populateBoAttachmentListBeforeSave

public void populateBoAttachmentListBeforeSave()

deleteDocumentAttachment

public void deleteDocumentAttachment()

deleteDocumentAttachmentList

public void deleteDocumentAttachmentList()

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.krad.rules.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.krad.rules.rule.event.KualiDocumentEvent)

getDocumentDataObject

public Object getDocumentDataObject()
Description copied from interface: MaintenanceDocument
Return the data object that this MaintenanceDocument is maintaining

Specified by:
getDocumentDataObject in interface MaintenanceDocument
Returns:
document data object instance
See Also:
MaintenanceDocument.getDocumentDataObject()

getNoteTarget

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:

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

getNoteType

public NoteType getNoteType()
The 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:

Specified by:
getNoteType in interface Document
Overrides:
getNoteType in class DocumentBase
Returns:
the note type to use for notes associated with this document
See Also:
Document.getNoteType(), Document.getNoteTarget()

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)

getAttachments

public List<MultiDocumentAttachment> getAttachments()

setAttachments

public void setAttachments(List<MultiDocumentAttachment> attachment)

postRemove

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

Overrides:
postRemove in class PersistableBusinessObjectBase
See Also:
PersistableBusinessObjectBase.postRemove()

postLoad

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

Overrides:
postLoad in class DocumentBase
See Also:
PersistableBusinessObjectBase.postLoad()

prePersist

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

Overrides:
prePersist in class PersistableBusinessObjectBase
See Also:
PersistableBusinessObjectBase.prePersist()

preUpdate

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

Overrides:
preUpdate in class PersistableBusinessObjectBase
See Also:
PersistableBusinessObjectBase.preUpdate()

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.api.identity.Person), Maintainable.getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person)

getDocumentDictionaryService

protected DocumentDictionaryService getDocumentDictionaryService()

getMaintenanceDocumentService

protected MaintenanceDocumentService getMaintenanceDocumentService()

getDocumentHeaderService

protected DocumentHeaderService getDocumentHeaderService()

getDocumentService

protected DocumentService getDocumentService()

checkAllowsRecordDeletion

protected boolean checkAllowsRecordDeletion()

checkMaintenanceAction

protected boolean checkMaintenanceAction()

checkDeletePermission

protected boolean checkDeletePermission(Object dataObject)


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