public interface Maintainable extends ViewHelperService, Serializable
Currently the Maintainable
serves many purposes. First since all maintenance documents share the
same document class MaintenanceDocumentBase
certain document callbacks such as workflow post processing
are invoked on the maintainable. Second the maintainable provides a hook for custom actions on the maintenance view.
Finally since the maintainable extends ViewHelperService
it is used to customize View
configuration for MaintenanceDocumentView
instances
Modifier and Type | Method and Description |
---|---|
void |
deleteDataObject()
Invokes to delete the data object being maintained
|
void |
doRouteStatusChange(DocumentHeader documentHeader)
Invoked do perform custom processing when the route status for the containing
maintenance document changes
|
List<MaintenanceLock> |
generateMaintenanceLocks()
Invoked to generating the list of maintenance locks used to block other edits
of the same data object record
|
String |
getCustomLockDescriptor(Person user)
Generates a custom lock descriptor for pessimistic locking.
|
Object |
getDataObject()
Returns instance of the data object that is being maintained
|
Class |
getDataObjectClass()
Returns the class for the data object being maintained
|
String |
getDocumentTitle(MaintenanceDocument document)
Invoked when setting the title for the document instance in workflow (doc search results)
to customize the title
|
String |
getLockingDocumentId()
Retrieves the locking document id for the maintainable which is used to create the
maintenance lock string
|
String |
getMaintenanceAction()
Returns the type of maintenance action this maintainable has been configured with
|
PersistableBusinessObject |
getPersistableBusinessObject()
Returns the persistable business object or null if none exists.
|
List<String> |
getWorkflowEngineDocumentIdsToLock()
Return an array of document ids to lock prior to processing this document
in the workflow engine
|
boolean |
isExternalBusinessObject()
Indicates whether the object being maintained is an instance of
ExternalizableBusinessObject |
boolean |
isLockable()
Indicates whether the object can be locked
|
boolean |
isNotesEnabled()
Indicates whether this maintainable supports notes on the maintenance object
|
boolean |
isOldDataObjectInDocument()
Indicates whether their is an old data object for the maintainable
|
void |
prepareExternalBusinessObject(BusinessObject businessObject)
Invoked to prepare a new
BusinessObject instance that is external |
void |
prepareForSave()
Hook for performing any custom processing before the maintenance object is saved
|
void |
processAfterCopy(MaintenanceDocument document,
Map<String,String[]> requestParameters)
Hook for performing any custom processing after the maintenance object has been setup for a copy action
|
void |
processAfterEdit(MaintenanceDocument document,
Map<String,String[]> requestParameters)
Hook for performing any custom processing after the maintenance object has been setup for a edit action
|
void |
processAfterNew(MaintenanceDocument document,
Map<String,String[]> requestParameters)
Hook for performing any custom processing after the maintenance object has been setup for a new action
|
void |
processAfterPost(MaintenanceDocument document,
Map<String,String[]> requestParameters)
Hook for performing any custom processing after each posting of the maintenance document (for various actions
like add line, refresh)
|
void |
processAfterRetrieve()
Hook for performing any custom processing after the maintenance object is retrieved from persistence storage
|
Object |
retrieveObjectForEditOrCopy(MaintenanceDocument document,
Map<String,String> dataObjectKeys)
Called during setupMaintenanceObject to retrieve the original dataObject that is being
edited or copied.
|
void |
saveDataObject()
Invoked to persist changes to the data object being maintained
|
void |
setDataObject(Object object)
Sets an instance of a data object that should be maintained
|
void |
setDataObjectClass(Class dataObjectClass)
Sets the class for the data object that will be maintained
|
void |
setDocumentNumber(String documentNumber)
Sets the document number on this maintainable for referencing back to the containing
MaintenanceDocument |
void |
setMaintenanceAction(String maintenanceAction)
Sets the type of maintenance action to be performed (new, edit, or copy)
|
void |
setupNewFromExisting(MaintenanceDocument document,
Map<String,String[]> parameters)
Performs the setting of some attributes that might be necessary
if we're creating a new business object using on an existing business object.
|
boolean |
useCustomLockDescriptors()
Indicates whether or not this maintainable supports custom lock
descriptors for pessimistic locking.
|
applyDefaultValuesForCollectionLine, buildExportTableData, buildInquiryLink, cleanViewAfterRender, getCommonContext, getExpressionEvaluator, performApplyModel, performComponentInitialization, performComponentLifecycle, performFinalize, performInitialization, populateViewFromRequestParameters, processCollectionAddBlankLine, processCollectionAddLine, processCollectionDeleteLine, processCollectionSaveLine, processMultipleValueLookupResults, refreshReferences, spawnSubLifecyle
void setDocumentNumber(String documentNumber)
MaintenanceDocument
documentNumber
- - document number for the containing maintenance documentString getDocumentTitle(MaintenanceDocument document)
document
- - maintenance document instance to build title forObject getDataObject()
void setDataObject(Object object)
object
- - data object instanceClass getDataObjectClass()
void setDataObjectClass(Class dataObjectClass)
dataObjectClass
- - class for maintenance data objectboolean isLockable()
If this method is overridden, most likely getPersistableBusinessObject() should be overridden as well.
PersistableBusinessObject getPersistableBusinessObject()
String getMaintenanceAction()
void setMaintenanceAction(String maintenanceAction)
maintenanceAction
- - string identifying the action typeList<MaintenanceLock> generateMaintenanceLocks()
void saveDataObject()
Called after the maintenance document has become final indicating the changes should be applied
void deleteDataObject()
Called after the maintenance document has become final indicating the changes should be applied
void doRouteStatusChange(DocumentHeader documentHeader)
Usually used for determining when the document has become final so further actions can take place in addition to the usual persistence of the object changes
documentHeader
- - document header instance for containing maintenance document which
can be used to check the new statusString getLockingDocumentId()
List<String> getWorkflowEngineDocumentIdsToLock()
boolean useCustomLockDescriptors()
getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person)
String getCustomLockDescriptor(Person user)
useCustomLockDescriptors()
returns
trueuser
- - the user trying to establish the lockuseCustomLockDescriptors()
,
PessimisticLockService
boolean isNotesEnabled()
Note this is only applicable if the data object is an instance of BusinessObject
boolean isExternalBusinessObject()
ExternalizableBusinessObject
For the case when we want to maintain a business object that doesn't necessarily map to a single table in the database or may doesn't map to a database at all
void prepareExternalBusinessObject(BusinessObject businessObject)
BusinessObject
instance that is externalbusinessObject
- - new business object instance to prepareboolean isOldDataObjectInDocument()
void prepareForSave()
void processAfterRetrieve()
Object retrieveObjectForEditOrCopy(MaintenanceDocument document, Map<String,String> dataObjectKeys)
document
- document instance for the maintenance objectdataObjectKeys
- Map of keys for the requested objectvoid setupNewFromExisting(MaintenanceDocument document, Map<String,String[]> parameters)
document
- - maintenance document instance this maintainable belong toparameters
- - map of request parameters sent for the requestvoid processAfterCopy(MaintenanceDocument document, Map<String,String[]> requestParameters)
document
- - maintenance document instance this maintainable belong torequestParameters
- - map of request parameters sent for the copy requestvoid processAfterEdit(MaintenanceDocument document, Map<String,String[]> requestParameters)
document
- - maintenance document instance this maintainable belong torequestParameters
- - map of request parameters sent for the copy requestvoid processAfterNew(MaintenanceDocument document, Map<String,String[]> requestParameters)
document
- - maintenance document instance this maintainable belong torequestParameters
- - map of request parameters sent for the copy requestvoid processAfterPost(MaintenanceDocument document, Map<String,String[]> requestParameters)
document
- - maintenance document instance this maintainable belong torequestParameters
- - map of request parameters from the postCopyright © 2005–2015 The Kuali Foundation. All rights reserved.