public class MaintainableImpl extends ViewHelperServiceImpl implements Maintainable
Maintainable
interface.Constructor and Description |
---|
MaintainableImpl() |
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()
Note: as currently implemented, every key field for a given
data object class must have a visible getter.
|
protected List<MaintenanceLock> |
generateMaintenanceLocks(String documentNumber,
String documentTypeName,
Class<?> dataObjectClass,
Object dataObject)
Allows locking of maintenance objects other than the one of the current maintenance object.
|
String |
getCustomLockDescriptor(Person user)
Default implementation just throws a PessimisticLockingException.
|
Object |
getDataObject()
Returns instance of the data object that is being maintained
|
protected DataObjectAuthorizationService |
getDataObjectAuthorizationService() |
Class<?> |
getDataObjectClass()
Returns the class for the data object being maintained
|
protected DataObjectService |
getDataObjectService() |
DocumentDictionaryService |
getDocumentDictionaryService() |
protected String |
getDocumentNumber()
Retrieves the document number configured on this maintainable.
|
String |
getDocumentTitle(MaintenanceDocument document)
Invoked when setting the title for the document instance in workflow (doc search results)
to customize the title
|
protected String |
getDocumentTypeName()
Retrieves the document type name from the data dictionary based on
business object class
|
protected EncryptionService |
getEncryptionService() |
KualiRuleService |
getKualiRuleService() |
protected LegacyDataAdapter |
getLegacyDataAdapter()
Deprecated.
|
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
|
protected MaintenanceDocumentService |
getMaintenanceDocumentService() |
Object |
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()
Deprecated.
note used by Rice framework
|
boolean |
isNotesEnabled()
Indicates whether this maintainable supports notes on the maintenance object
|
boolean |
isOldDataObjectInDocument()
Checks whether the data object is not null and has its primary key values populated.
|
protected boolean |
performAddLineValidation(ViewModel viewModel,
Object newLine,
String collectionId,
String collectionPath)
Performs validation on the new collection line before it is added to the corresponding collection.
|
void |
performCustomApplyModel(LifecycleElement element,
Object model)
Hook for service overrides to perform custom apply model logic on the component.
|
void |
performCustomFinalize(LifecycleElement element,
Object model,
LifecycleElement parent)
For the copy action, clears out primary key values, applies defaults to previously cleared fields,
and replaces any new fields that the current user is unauthorized for with default values in the old record.
|
void |
performCustomViewFinalize(Object model)
For the copy action, runs the custom processing after the copy and sets the indicator that fields have been
copied as true.
|
void |
prepareExternalBusinessObject(BusinessObject businessObject)
Deprecated.
|
void |
prepareForSave()
Hook for performing any custom processing before the maintenance object is saved
|
void |
processAfterAddLine(ViewModel viewModel,
Object addLine,
String collectionId,
String collectionPath,
boolean isValidLine)
In the case of edit maintenance adds a new blank line to the old side.
|
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 |
processAfterDeleteLine(ViewModel model,
String collectionId,
String collectionPath,
int lineIndex)
In the case of edit maintenance deleted the item on the old side.
|
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 |
setDataObjectAuthorizationService(DataObjectAuthorizationService dataObjectAuthorizationService) |
void |
setDataObjectClass(Class<?> dataObjectClass)
Sets the class for the data object that will be maintained
|
void |
setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService) |
void |
setDocumentNumber(String documentNumber)
Sets the document number on this maintainable for referencing back to the containing
MaintenanceDocument |
void |
setEncryptionService(EncryptionService encryptionService) |
void |
setKualiRuleService(KualiRuleService kualiRuleService) |
void |
setLegacyDataAdapter(LegacyDataAdapter legacyDataAdapter)
Deprecated.
|
void |
setMaintenanceAction(String maintenanceAction)
Sets the type of maintenance action to be performed (new, edit, or copy)
|
void |
setMaintenanceDocumentService(MaintenanceDocumentService maintenanceDocumentService) |
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()
Default implementation simply returns false to indicate that custom
lock descriptors are not supported by MaintainableImpl.
|
addCustomContainerComponents, addLine, applyDefaultValues, applyDefaultValuesForCollectionLine, buildGrowlScript, buildInquiryLink, containsDuplicateLine, extractNewValuesAndAssign, extractSingleValue, filterByReturnedFieldConversions, getConfigurationService, getDataDictionaryService, getDefaultValueForField, getExpressionEvaluatorFactory, getViewDictionaryService, isDuplicateLine, linkAddedLine, logAndThrowRuntime, performCustomInitialization, performCustomViewInitialization, performDeleteLineValidation, populateDefaultValueForField, populateViewFromRequestParameters, processAfterEditLine, processAfterSaveLine, processAndAddLineObject, processBeforeAddLine, processBeforeEditLine, processBeforeSaveLine, processCollectionAddBlankLine, processCollectionAddLine, processCollectionCloseEditLineDialog, processCollectionDeleteLine, processCollectionEditLine, processCollectionRetrieveEditLineDialog, processCollectionSaveLine, processMultipleValueLookupResults, refreshReference, refreshReferences, retrieveEditModesAndActionFlags, setConfigurationService, setDataDictionaryService, setDataObjectService, setElementContext, setExpressionEvaluatorFactory, setViewContext, setViewDictionaryService
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addCustomContainerComponents, applyDefaultValues, applyDefaultValuesForCollectionLine, buildGrowlScript, buildInquiryLink, getDefaultValueForField, getExpressionEvaluatorFactory, performCustomInitialization, performCustomViewInitialization, populateDefaultValueForField, populateViewFromRequestParameters, processAfterEditLine, processAfterSaveLine, processAndAddLineObject, processBeforeAddLine, processBeforeEditLine, processBeforeSaveLine, processCollectionAddBlankLine, processCollectionAddLine, processCollectionCloseEditLineDialog, processCollectionDeleteLine, processCollectionEditLine, processCollectionRetrieveEditLineDialog, processCollectionSaveLine, processMultipleValueLookupResults, refreshReference, refreshReferences, retrieveEditModesAndActionFlags, setElementContext, setViewContext
public MaintainableImpl()
public Object retrieveObjectForEditOrCopy(MaintenanceDocument document, Map<String,String> dataObjectKeys)
Maintainable
retrieveObjectForEditOrCopy
in interface Maintainable
document
- document instance for the maintenance objectdataObjectKeys
- Map of keys for the requested objectMaintainable.retrieveObjectForEditOrCopy(MaintenanceDocument, java.util.Map)
public void setDocumentNumber(String documentNumber)
Maintainable
MaintenanceDocument
setDocumentNumber
in interface Maintainable
documentNumber
- - document number for the containing maintenance documentMaintainable.setDocumentNumber(java.lang.String)
public String getDocumentTitle(MaintenanceDocument document)
Maintainable
getDocumentTitle
in interface Maintainable
document
- - maintenance document instance to build title forMaintainable.getDocumentTitle(org.kuali.rice.krad.maintenance.MaintenanceDocument)
public Object getDataObject()
Maintainable
getDataObject
in interface Maintainable
Maintainable.getDataObject()
public void setDataObject(Object object)
Maintainable
setDataObject
in interface Maintainable
object
- - data object instanceMaintainable.setDataObject(java.lang.Object)
public Class<?> getDataObjectClass()
Maintainable
getDataObjectClass
in interface Maintainable
Maintainable.getDataObjectClass()
public void setDataObjectClass(Class<?> dataObjectClass)
Maintainable
setDataObjectClass
in interface Maintainable
dataObjectClass
- - class for maintenance data objectMaintainable.setDataObjectClass(java.lang.Class<?>)
@Deprecated public boolean isLockable()
isLockable
in interface Maintainable
public String getMaintenanceAction()
Maintainable
getMaintenanceAction
in interface Maintainable
Maintainable.getMaintenanceAction()
public void setMaintenanceAction(String maintenanceAction)
Maintainable
setMaintenanceAction
in interface Maintainable
maintenanceAction
- - string identifying the action typeMaintainable.setMaintenanceAction(java.lang.String)
public List<MaintenanceLock> generateMaintenanceLocks()
generateMaintenanceLocks
in interface Maintainable
Maintainable.generateMaintenanceLocks()
protected List<MaintenanceLock> generateMaintenanceLocks(String documentNumber, String documentTypeName, Class<?> dataObjectClass, Object dataObject)
documentNumber
- of the locking maintenance documentdocumentTypeName
- of the maintenance document to be lockeddataObjectClass
- of the maintenance document to be lockeddataObject
- of the maintenance document to be lockedprotected String getDocumentTypeName()
public void saveDataObject()
Maintainable
Called after the maintenance document has become final indicating the changes should be applied
saveDataObject
in interface Maintainable
Maintainable.saveDataObject()
public void deleteDataObject()
Maintainable
Called after the maintenance document has become final indicating the changes should be applied
deleteDataObject
in interface Maintainable
Maintainable.deleteDataObject()
public void doRouteStatusChange(DocumentHeader documentHeader)
Maintainable
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
doRouteStatusChange
in interface Maintainable
documentHeader
- - document header instance for containing maintenance document which
can be used to check the new statusMaintainable.doRouteStatusChange(org.kuali.rice.krad.bo.DocumentHeader)
public String getLockingDocumentId()
Maintainable
getLockingDocumentId
in interface Maintainable
Maintainable.getLockingDocumentId()
public List<String> getWorkflowEngineDocumentIdsToLock()
Maintainable
getWorkflowEngineDocumentIdsToLock
in interface Maintainable
Maintainable.getWorkflowEngineDocumentIdsToLock()
public boolean useCustomLockDescriptors()
useCustomLockDescriptors
in interface Maintainable
Maintainable.useCustomLockDescriptors()
public String getCustomLockDescriptor(Person user)
getCustomLockDescriptor
in interface Maintainable
user
- - the user trying to establish the lockMaintainable.getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person)
public boolean isNotesEnabled()
Maintainable
Note this is only applicable if the data object is an instance of BusinessObject
isNotesEnabled
in interface Maintainable
Maintainable.isNotesEnabled()
public boolean isExternalBusinessObject()
Maintainable
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
isExternalBusinessObject
in interface Maintainable
isExternalBusinessObject()
@Deprecated public void prepareExternalBusinessObject(BusinessObject businessObject)
Maintainable
BusinessObject
instance that is externalprepareExternalBusinessObject
in interface Maintainable
businessObject
- - new business object instance to prepareprepareExternalBusinessObject(org.kuali.rice.krad.bo.BusinessObject)
public boolean isOldDataObjectInDocument()
isOldDataObjectInDocument
in interface Maintainable
isOldDataObjectInDocument()
public void prepareForSave()
Maintainable
prepareForSave
in interface Maintainable
Maintainable.prepareForSave()
public void processAfterRetrieve()
Maintainable
processAfterRetrieve
in interface Maintainable
Maintainable.processAfterRetrieve()
public void setupNewFromExisting(MaintenanceDocument document, Map<String,String[]> parameters)
Maintainable
setupNewFromExisting
in interface Maintainable
document
- - maintenance document instance this maintainable belong toparameters
- - map of request parameters sent for the requestsetupNewFromExisting(org.kuali.rice.krad.maintenance.MaintenanceDocument, java.util.Map<java.lang.String, java.lang.String[]>)
public void processAfterCopy(MaintenanceDocument document, Map<String,String[]> requestParameters)
Maintainable
processAfterCopy
in interface Maintainable
document
- - maintenance document instance this maintainable belong torequestParameters
- - map of request parameters sent for the copy requestMaintainable.processAfterCopy(org.kuali.rice.krad.maintenance.MaintenanceDocument, java.util.Map<java.lang.String, java.lang.String[]>)
public void processAfterEdit(MaintenanceDocument document, Map<String,String[]> requestParameters)
Maintainable
processAfterEdit
in interface Maintainable
document
- - maintenance document instance this maintainable belong torequestParameters
- - map of request parameters sent for the copy requestMaintainable.processAfterEdit(org.kuali.rice.krad.maintenance.MaintenanceDocument, java.util.Map<java.lang.String, java.lang.String[]>)
public void processAfterNew(MaintenanceDocument document, Map<String,String[]> requestParameters)
Maintainable
processAfterNew
in interface Maintainable
document
- - maintenance document instance this maintainable belong torequestParameters
- - map of request parameters sent for the copy requestMaintainable.processAfterNew(org.kuali.rice.krad.maintenance.MaintenanceDocument, java.util.Map<java.lang.String, java.lang.String[]>)
public void processAfterPost(MaintenanceDocument document, Map<String,String[]> requestParameters)
Maintainable
processAfterPost
in interface Maintainable
document
- - maintenance document instance this maintainable belong torequestParameters
- - map of request parameters from the postMaintainable.processAfterPost(org.kuali.rice.krad.maintenance.MaintenanceDocument, java.util.Map<java.lang.String, java.lang.String[]>)
public void processAfterAddLine(ViewModel viewModel, Object addLine, String collectionId, String collectionPath, boolean isValidLine)
processAfterAddLine
in interface ViewHelperService
processAfterAddLine
in class ViewHelperServiceImpl
viewModel
- object instance that contain's the views dataaddLine
- the new line that was addedcollectionId
- the id of the collection being added tocollectionPath
- the path to the collection being modifiedisValidLine
- indicates if the line is validpublic void processAfterDeleteLine(ViewModel model, String collectionId, String collectionPath, int lineIndex)
processAfterDeleteLine
in interface ViewHelperService
processAfterDeleteLine
in class ViewHelperServiceImpl
model
- object instance that contains the views datacollectionId
- the id of the collection being added tocollectionPath
- the path to the collection being modifiedlineIndex
- index of the line that was deletedViewHelperServiceImpl.processAfterDeleteLine(org.kuali.rice.krad.uif.view.ViewModel, String, String, int)
protected boolean performAddLineValidation(ViewModel viewModel, Object newLine, String collectionId, String collectionPath)
ViewHelperServiceImpl
performAddLineValidation
in class ViewHelperServiceImpl
viewModel
- object instance that contain's the view's datanewLine
- the new line instance to be processedcollectionId
- the id of the collection being added tocollectionPath
- the path to the collection being modifiedprotected String getDocumentNumber()
public void performCustomApplyModel(LifecycleElement element, Object model)
performCustomApplyModel
in interface ViewHelperService
performCustomApplyModel
in class ViewHelperServiceImpl
element
- element instance to apply model tomodel
- Top level object containing the data (could be the model or a top level business
object, dto)public void performCustomFinalize(LifecycleElement element, Object model, LifecycleElement parent)
performCustomFinalize
in interface ViewHelperService
performCustomFinalize
in class ViewHelperServiceImpl
element
- component instance to updatemodel
- Top level object containing the dataparent
- Parent component for the component being finalizedpublic void performCustomViewFinalize(Object model)
performCustomViewFinalize
in interface ViewHelperService
performCustomViewFinalize
in class ViewHelperServiceImpl
model
- Top level object containing the data@Deprecated protected LegacyDataAdapter getLegacyDataAdapter()
ViewHelperServiceImpl
getLegacyDataAdapter
in class ViewHelperServiceImpl
@Deprecated public void setLegacyDataAdapter(LegacyDataAdapter legacyDataAdapter)
ViewHelperServiceImpl
setLegacyDataAdapter
in class ViewHelperServiceImpl
legacyDataAdapter
- The legacy data adapter.protected DataObjectAuthorizationService getDataObjectAuthorizationService()
public void setDataObjectAuthorizationService(DataObjectAuthorizationService dataObjectAuthorizationService)
public DocumentDictionaryService getDocumentDictionaryService()
public void setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService)
protected EncryptionService getEncryptionService()
public void setEncryptionService(EncryptionService encryptionService)
protected DataObjectService getDataObjectService()
getDataObjectService
in class ViewHelperServiceImpl
protected MaintenanceDocumentService getMaintenanceDocumentService()
public void setMaintenanceDocumentService(MaintenanceDocumentService maintenanceDocumentService)
public KualiRuleService getKualiRuleService()
public void setKualiRuleService(KualiRuleService kualiRuleService)
public Object getPersistableBusinessObject()
Maintainable
getPersistableBusinessObject
in interface Maintainable
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.