Interface Maintainable
- All Superinterfaces:
Serializable,ViewHelperService
- All Known Subinterfaces:
BulkUpdateMaintainable
- All Known Implementing Classes:
BulkUpdateMaintainableImpl,MaintainableImpl
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
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptionvoidInvokes to delete the data object being maintainedvoiddoRouteStatusChange(org.kuali.rice.krad.bo.DocumentHeader documentHeader) Invoked do perform custom processing when the route status for the containing maintenance document changesList<org.kuali.rice.krad.maintenance.MaintenanceLock> Invoked to generating the list of maintenance locks used to block other edits of the same data object recordgetCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person user) Generates a custom lock descriptor for pessimistic locking.Returns instance of the data object that is being maintainedClass<?> Returns the class for the data object being maintainedgetDocumentTitle(MaintenanceDocument document) Invoked when setting the title for the document instance in workflow (doc search results) to customize the titleRetrieves the locking document id for the maintainable which is used to create the maintenance lock stringReturns the type of maintenance action this maintainable has been configured withReturns the persistable business object or null if none exists.Return an array of document ids to lock prior to processing this document in the workflow enginebooleanIndicates whether the object being maintained is an instance ofExternalizableBusinessObjectbooleanIndicates whether the object can be lockedbooleanIndicates whether this maintainable supports notes on the maintenance objectbooleanIndicates whether their is an old data object for the maintainablevoidprepareExternalBusinessObject(org.kuali.rice.krad.bo.BusinessObject businessObject) Invoked to prepare a newBusinessObjectinstance that is externalvoidHook for performing any custom processing before the maintenance object is savedvoidprocessAfterCopy(MaintenanceDocument document, Map<String, String[]> requestParameters) Hook for performing any custom processing after the maintenance object has been setup for a copy actionvoidprocessAfterEdit(MaintenanceDocument document, Map<String, String[]> requestParameters) Hook for performing any custom processing after the maintenance object has been setup for a edit actionvoidprocessAfterNew(MaintenanceDocument document, Map<String, String[]> requestParameters) Hook for performing any custom processing after the maintenance object has been setup for a new actionvoidprocessAfterPost(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)voidHook for performing any custom processing after the maintenance object is retrieved from persistence storageretrieveObjectForEditOrCopy(MaintenanceDocument document, Map<String, String> dataObjectKeys) Called during setupMaintenanceObject to retrieve the original dataObject that is being edited or copied.voidInvoked to persist changes to the data object being maintainedvoidsetDataObject(Object object) Sets an instance of a data object that should be maintainedvoidsetDataObjectClass(Class<?> dataObjectClass) Sets the class for the data object that will be maintainedvoidsetDocumentNumber(String documentNumber) Sets the document number on this maintainable for referencing back to the containingMaintenanceDocumentvoidsetMaintenanceAction(String maintenanceAction) Sets the type of maintenance action to be performed (new, edit, or copy)voidsetupNewFromExisting(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.booleanIndicates whether or not this maintainable supports custom lock descriptors for pessimistic locking.Methods inherited from interface org.kuali.rice.krad.uif.service.ViewHelperService
addCustomContainerComponents, applyDefaultValues, applyDefaultValuesForCollectionLine, buildGrowlScript, buildInquiryLink, getDefaultValueForField, getExpressionEvaluatorFactory, performCustomApplyModel, performCustomFinalize, performCustomInitialization, performCustomViewFinalize, performCustomViewInitialization, populateDefaultValueForField, populateViewFromRequestParameters, processAfterAddLine, processAfterDeleteLine, processAfterEditLine, processAfterSaveLine, processAndAddLineObject, processBeforeAddLine, processBeforeEditLine, processBeforeSaveLine, processCollectionAddBlankLine, processCollectionAddLine, processCollectionCloseEditLineDialog, processCollectionDeleteLine, processCollectionEditLine, processCollectionRetrieveEditLineDialog, processCollectionSaveLine, processMultipleValueLookupResults, refreshReference, refreshReferences, retrieveEditModesAndActionFlags, setElementContext, setViewContext
-
Method Details
-
setDocumentNumber
Sets the document number on this maintainable for referencing back to the containingMaintenanceDocument- Parameters:
documentNumber- - document number for the containing maintenance document
-
getDocumentTitle
Invoked when setting the title for the document instance in workflow (doc search results) to customize the title- Parameters:
document- - maintenance document instance to build title for- Returns:
- String document title
-
getDataObject
Object getDataObject()Returns instance of the data object that is being maintained- Returns:
- Object data object instance
-
setDataObject
Sets an instance of a data object that should be maintained- Parameters:
object- - data object instance
-
getDataObjectClass
Class<?> getDataObjectClass()Returns the class for the data object being maintained- Returns:
- Class data object class
-
setDataObjectClass
Sets the class for the data object that will be maintained- Parameters:
dataObjectClass- - class for maintenance data object
-
isLockable
boolean isLockable()Indicates whether the object can be lockedIf this method is overridden, most likely getPersistableBusinessObject() should be overridden as well.
- Returns:
- true if maintenance is lockable, false otherwise
-
getPersistableBusinessObject
Object getPersistableBusinessObject()Returns the persistable business object or null if none exists.- Returns:
- persistable buisness object
-
getMaintenanceAction
String getMaintenanceAction()Returns the type of maintenance action this maintainable has been configured with- Returns:
- String maintenance action string
-
setMaintenanceAction
Sets the type of maintenance action to be performed (new, edit, or copy)- Parameters:
maintenanceAction- - string identifying the action type
-
generateMaintenanceLocks
List<org.kuali.rice.krad.maintenance.MaintenanceLock> generateMaintenanceLocks()Invoked to generating the list of maintenance locks used to block other edits of the same data object record- Returns:
- the locking representation(s) of this document, which are reproducible given the same keys and the same maintainable object
-
saveDataObject
void saveDataObject()Invoked to persist changes to the data object being maintainedCalled after the maintenance document has become final indicating the changes should be applied
-
deleteDataObject
void deleteDataObject()Invokes to delete the data object being maintainedCalled after the maintenance document has become final indicating the changes should be applied
-
doRouteStatusChange
void doRouteStatusChange(org.kuali.rice.krad.bo.DocumentHeader documentHeader) Invoked do perform custom processing when the route status for the containing maintenance document changesUsually 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
- Parameters:
documentHeader- - document header instance for containing maintenance document which can be used to check the new status
-
getLockingDocumentId
String getLockingDocumentId()Retrieves the locking document id for the maintainable which is used to create the maintenance lock string- Returns:
- String locking id
-
getWorkflowEngineDocumentIdsToLock
Return an array of document ids to lock prior to processing this document in the workflow engine- Returns:
- List<String> list of document ids
-
useCustomLockDescriptors
boolean useCustomLockDescriptors()Indicates whether or not this maintainable supports custom lock descriptors for pessimistic locking.- Returns:
- boolean true if the maintainable can generate custom lock descriptors, false otherwise
- See Also:
-
getCustomLockDescriptor
Generates a custom lock descriptor for pessimistic locking. This method should not be called unlessuseCustomLockDescriptors()returns true- Parameters:
user- - the user trying to establish the lock- Returns:
- String representing the lock descriptor
- See Also:
-
isNotesEnabled
boolean isNotesEnabled()Indicates whether this maintainable supports notes on the maintenance objectNote this is only applicable if the data object is an instance of
BusinessObject- Returns:
- boolean true if notes are supported, false if they are not supported
-
isExternalBusinessObject
boolean isExternalBusinessObject()Indicates whether the object being maintained is an instance ofExternalizableBusinessObjectFor 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
- Returns:
- boolean true if the data object is an external business object, false if not
-
prepareExternalBusinessObject
void prepareExternalBusinessObject(org.kuali.rice.krad.bo.BusinessObject businessObject) Invoked to prepare a newBusinessObjectinstance that is external- Parameters:
businessObject- - new business object instance to prepare
-
isOldDataObjectInDocument
boolean isOldDataObjectInDocument()Indicates whether their is an old data object for the maintainable- Returns:
- boolean true if old data object exists, false if not
-
prepareForSave
void prepareForSave()Hook for performing any custom processing before the maintenance object is saved -
processAfterRetrieve
void processAfterRetrieve()Hook for performing any custom processing after the maintenance object is retrieved from persistence storage -
retrieveObjectForEditOrCopy
Called during setupMaintenanceObject to retrieve the original dataObject that is being edited or copied. Override this method for non BusinessObject external persistence, Maintainable objects that extend BO should override isExternalBusinessObject and prepareExternalBusinessObject instead. Do not override this method and isExternalBusinessObject.- Parameters:
document- document instance for the maintenance objectdataObjectKeys- Map of keys for the requested object- Returns:
- the object identified by the dataObjectKeys
-
setupNewFromExisting
Performs the setting of some attributes that might be necessary if we're creating a new business object using on an existing business object. For example, create a division Vendor based on an existing parent Vendor. (Please see VendorMaintainableImpl.java)- Parameters:
document- - maintenance document instance this maintainable belong toparameters- - map of request parameters sent for the request
-
processAfterCopy
Hook for performing any custom processing after the maintenance object has been setup for a copy action- Parameters:
document- - maintenance document instance this maintainable belong torequestParameters- - map of request parameters sent for the copy request
-
processAfterEdit
Hook for performing any custom processing after the maintenance object has been setup for a edit action- Parameters:
document- - maintenance document instance this maintainable belong torequestParameters- - map of request parameters sent for the copy request
-
processAfterNew
Hook for performing any custom processing after the maintenance object has been setup for a new action- Parameters:
document- - maintenance document instance this maintainable belong torequestParameters- - map of request parameters sent for the copy request
-
processAfterPost
Hook for performing any custom processing after each posting of the maintenance document (for various actions like add line, refresh)- Parameters:
document- - maintenance document instance this maintainable belong torequestParameters- - map of request parameters from the post
-