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, setViewDictionaryServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCustomContainerComponents, 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, setViewContextpublic MaintainableImpl()
public Object retrieveObjectForEditOrCopy(MaintenanceDocument document, Map<String,String> dataObjectKeys)
MaintainableretrieveObjectForEditOrCopy in interface Maintainabledocument - document instance for the maintenance objectdataObjectKeys - Map of keys for the requested objectMaintainable.retrieveObjectForEditOrCopy(MaintenanceDocument, java.util.Map)public void setDocumentNumber(String documentNumber)
MaintainableMaintenanceDocumentsetDocumentNumber in interface MaintainabledocumentNumber - - document number for the containing maintenance documentMaintainable.setDocumentNumber(java.lang.String)public String getDocumentTitle(MaintenanceDocument document)
MaintainablegetDocumentTitle in interface Maintainabledocument - - maintenance document instance to build title forMaintainable.getDocumentTitle(org.kuali.rice.krad.maintenance.MaintenanceDocument)public Object getDataObject()
MaintainablegetDataObject in interface MaintainableMaintainable.getDataObject()public void setDataObject(Object object)
MaintainablesetDataObject in interface Maintainableobject - - data object instanceMaintainable.setDataObject(java.lang.Object)public Class<?> getDataObjectClass()
MaintainablegetDataObjectClass in interface MaintainableMaintainable.getDataObjectClass()public void setDataObjectClass(Class<?> dataObjectClass)
MaintainablesetDataObjectClass in interface MaintainabledataObjectClass - - class for maintenance data objectMaintainable.setDataObjectClass(java.lang.Class<?>)@Deprecated public boolean isLockable()
isLockable in interface Maintainablepublic String getMaintenanceAction()
MaintainablegetMaintenanceAction in interface MaintainableMaintainable.getMaintenanceAction()public void setMaintenanceAction(String maintenanceAction)
MaintainablesetMaintenanceAction in interface MaintainablemaintenanceAction - - string identifying the action typeMaintainable.setMaintenanceAction(java.lang.String)public List<MaintenanceLock> generateMaintenanceLocks()
generateMaintenanceLocks in interface MaintainableMaintainable.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()
MaintainableCalled after the maintenance document has become final indicating the changes should be applied
saveDataObject in interface MaintainableMaintainable.saveDataObject()public void deleteDataObject()
MaintainableCalled after the maintenance document has become final indicating the changes should be applied
deleteDataObject in interface MaintainableMaintainable.deleteDataObject()public void doRouteStatusChange(DocumentHeader documentHeader)
MaintainableUsually 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 MaintainabledocumentHeader - - 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()
MaintainablegetLockingDocumentId in interface MaintainableMaintainable.getLockingDocumentId()public List<String> getWorkflowEngineDocumentIdsToLock()
MaintainablegetWorkflowEngineDocumentIdsToLock in interface MaintainableMaintainable.getWorkflowEngineDocumentIdsToLock()public boolean useCustomLockDescriptors()
useCustomLockDescriptors in interface MaintainableMaintainable.useCustomLockDescriptors()public String getCustomLockDescriptor(Person user)
getCustomLockDescriptor in interface Maintainableuser - - 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 MaintainableMaintainable.isNotesEnabled()public boolean isExternalBusinessObject()
MaintainableExternalizableBusinessObject
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 MaintainableisExternalBusinessObject()@Deprecated public void prepareExternalBusinessObject(BusinessObject businessObject)
MaintainableBusinessObject instance that is externalprepareExternalBusinessObject in interface MaintainablebusinessObject - - new business object instance to prepareprepareExternalBusinessObject(org.kuali.rice.krad.bo.BusinessObject)public boolean isOldDataObjectInDocument()
isOldDataObjectInDocument in interface MaintainableisOldDataObjectInDocument()public void prepareForSave()
MaintainableprepareForSave in interface MaintainableMaintainable.prepareForSave()public void processAfterRetrieve()
MaintainableprocessAfterRetrieve in interface MaintainableMaintainable.processAfterRetrieve()public void setupNewFromExisting(MaintenanceDocument document, Map<String,String[]> parameters)
MaintainablesetupNewFromExisting in interface Maintainabledocument - - 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)
MaintainableprocessAfterCopy in interface Maintainabledocument - - 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)
MaintainableprocessAfterEdit in interface Maintainabledocument - - 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)
MaintainableprocessAfterNew in interface Maintainabledocument - - 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)
MaintainableprocessAfterPost in interface Maintainabledocument - - 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 ViewHelperServiceprocessAfterAddLine in class ViewHelperServiceImplviewModel - 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 ViewHelperServiceprocessAfterDeleteLine in class ViewHelperServiceImplmodel - 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)
ViewHelperServiceImplperformAddLineValidation in class ViewHelperServiceImplviewModel - 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 ViewHelperServiceperformCustomApplyModel in class ViewHelperServiceImplelement - 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 ViewHelperServiceperformCustomFinalize in class ViewHelperServiceImplelement - component instance to updatemodel - Top level object containing the dataparent - Parent component for the component being finalizedpublic void performCustomViewFinalize(Object model)
performCustomViewFinalize in interface ViewHelperServiceperformCustomViewFinalize in class ViewHelperServiceImplmodel - Top level object containing the data@Deprecated protected LegacyDataAdapter getLegacyDataAdapter()
ViewHelperServiceImplgetLegacyDataAdapter in class ViewHelperServiceImpl@Deprecated public void setLegacyDataAdapter(LegacyDataAdapter legacyDataAdapter)
ViewHelperServiceImplsetLegacyDataAdapter in class ViewHelperServiceImpllegacyDataAdapter - 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 ViewHelperServiceImplprotected MaintenanceDocumentService getMaintenanceDocumentService()
public void setMaintenanceDocumentService(MaintenanceDocumentService maintenanceDocumentService)
public KualiRuleService getKualiRuleService()
public void setKualiRuleService(KualiRuleService kualiRuleService)
public Object getPersistableBusinessObject()
MaintainablegetPersistableBusinessObject in interface MaintainableCopyright © 2005–2014 The Kuali Foundation. All rights reserved.