|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl
org.kuali.rice.krad.maintenance.MaintainableImpl
public class MaintainableImpl
Default implementation of the Maintainable interface
| Constructor Summary | |
|---|---|
MaintainableImpl()
|
|
| Method Summary | |
|---|---|
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 |
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 DataObjectMetaDataService |
getDataObjectMetaDataService()
|
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()
|
String |
getLockingDocumentId()
Retrieves the locking document id for the maintainable which is used to create the maintenance lock string |
protected LookupService |
getLookupService()
|
String |
getMaintenanceAction()
Returns the type of maintenance action this maintainable has been configured with |
protected MaintenanceDocumentService |
getMaintenanceDocumentService()
|
PersistableBusinessObject |
getPersistableBusinessObject()
Returns the data object if its persistable, null otherwise |
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()
Persistable business objects are lockable |
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 |
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 |
protected void |
processAfterAddLine(View view,
CollectionGroup collectionGroup,
Object model,
Object addLine,
boolean isValidLine)
In the case of edit maintenance adds a new blank line to the old side TODO: should this write some sort of missing message on the old side instead? |
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 |
protected void |
processAfterDeleteLine(View view,
CollectionGroup collectionGroup,
Object model,
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 |
setDataObjectMetaDataService(DataObjectMetaDataService dataObjectMetaDataService)
|
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 |
setLookupService(LookupService lookupService)
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MaintainableImpl()
| Method Detail |
|---|
public Object retrieveObjectForEditOrCopy(MaintenanceDocument document,
Map<String,String> dataObjectKeys)
Maintainable
retrieveObjectForEditOrCopy in interface Maintainabledocument - document instance for the maintenance objectdataObjectKeys - Map of keys for the requested object
Maintainable.retrieveObjectForEditOrCopy(MaintenanceDocument, java.util.Map)public void setDocumentNumber(String documentNumber)
MaintainableMaintenanceDocument
setDocumentNumber in interface MaintainabledocumentNumber - - document number for the containing maintenance documentMaintainable.setDocumentNumber(java.lang.String)public String getDocumentTitle(MaintenanceDocument document)
Maintainable
getDocumentTitle in interface Maintainabledocument - - maintenance document instance to build title for
Maintainable.getDocumentTitle(org.kuali.rice.krad.maintenance.MaintenanceDocument)public Object getDataObject()
Maintainable
getDataObject in interface MaintainableMaintainable.getDataObject()public void setDataObject(Object object)
Maintainable
setDataObject in interface Maintainableobject - - data object instanceMaintainable.setDataObject(java.lang.Object)public Class getDataObjectClass()
Maintainable
getDataObjectClass in interface MaintainableMaintainable.getDataObjectClass()public void setDataObjectClass(Class dataObjectClass)
Maintainable
setDataObjectClass in interface MaintainabledataObjectClass - - class for maintenance data objectMaintainable.setDataObjectClass(java.lang.Class)public boolean isLockable()
isLockable in interface MaintainableMaintainable.isLockable()public PersistableBusinessObject getPersistableBusinessObject()
getPersistableBusinessObject in interface MaintainableMaintainable.getPersistableBusinessObject()public String getMaintenanceAction()
Maintainable
getMaintenanceAction in interface MaintainableMaintainable.getMaintenanceAction()public void setMaintenanceAction(String maintenanceAction)
Maintainable
setMaintenanceAction in interface MaintainablemaintenanceAction - - string identifying the action typeMaintainable.setMaintenanceAction(java.lang.String)public List<MaintenanceLock> generateMaintenanceLocks()
generateMaintenanceLocks in interface MaintainableMaintainable.generateMaintenanceLocks()protected 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()
Maintainable
getLockingDocumentId in interface MaintainableMaintainable.getLockingDocumentId()public List<String> getWorkflowEngineDocumentIdsToLock()
Maintainable
getWorkflowEngineDocumentIdsToLock 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 lock
Maintainable.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()public void prepareExternalBusinessObject(BusinessObject businessObject)
MaintainableBusinessObject instance that is external
prepareExternalBusinessObject 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()
Maintainable
prepareForSave in interface MaintainableMaintainable.prepareForSave()public void processAfterRetrieve()
Maintainable
processAfterRetrieve in interface MaintainableMaintainable.processAfterRetrieve()
public void setupNewFromExisting(MaintenanceDocument document,
Map<String,String[]> parameters)
Maintainable
setupNewFromExisting 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)
public void processAfterCopy(MaintenanceDocument document,
Map<String,String[]> requestParameters)
Maintainable
processAfterCopy 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)
public void processAfterEdit(MaintenanceDocument document,
Map<String,String[]> requestParameters)
Maintainable
processAfterEdit 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)
public void processAfterNew(MaintenanceDocument document,
Map<String,String[]> requestParameters)
Maintainable
processAfterNew 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)
public void processAfterPost(MaintenanceDocument document,
Map<String,String[]> requestParameters)
Maintainable
processAfterPost 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)
protected void processAfterAddLine(View view,
CollectionGroup collectionGroup,
Object model,
Object addLine,
boolean isValidLine)
processAfterAddLine in class ViewHelperServiceImplview - view instance that is being presented (the action was taken on)collectionGroup - collection group component for the collection the line that was addedmodel - object instance that contain's the views dataaddLine - the new line that was addedisValidLine - indicates if the line is validorg.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl#processAfterAddLine(org.kuali.rice.krad.uif.view.View,
org.kuali.rice.krad.uif.container.CollectionGroup, java.lang.Object,
java.lang.Object)
protected void processAfterDeleteLine(View view,
CollectionGroup collectionGroup,
Object model,
int lineIndex)
processAfterDeleteLine in class ViewHelperServiceImplview - view instance that is being presented (the action was taken on)collectionGroup - collection group component for the collection the line that was addedmodel - object instance that contains the views datalineIndex - index of the line that was deletedViewHelperServiceImpl.processAfterDeleteLine(View,
org.kuali.rice.krad.uif.container.CollectionGroup, java.lang.Object, int)protected String getDocumentNumber()
protected LookupService getLookupService()
public void setLookupService(LookupService lookupService)
protected DataObjectAuthorizationService getDataObjectAuthorizationService()
public void setDataObjectAuthorizationService(DataObjectAuthorizationService dataObjectAuthorizationService)
protected DataObjectMetaDataService getDataObjectMetaDataService()
public void setDataObjectMetaDataService(DataObjectMetaDataService dataObjectMetaDataService)
public DocumentDictionaryService getDocumentDictionaryService()
public void setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService)
protected EncryptionService getEncryptionService()
public void setEncryptionService(EncryptionService encryptionService)
protected MaintenanceDocumentService getMaintenanceDocumentService()
public void setMaintenanceDocumentService(MaintenanceDocumentService maintenanceDocumentService)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||