|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kns.maintenance.KualiMaintainableImpl
public class KualiMaintainableImpl
Base Maintainable class to hold things common to all maintainables.
Constructor Summary | |
---|---|
KualiMaintainableImpl()
Default empty constructor |
|
KualiMaintainableImpl(PersistableBusinessObject businessObject)
Constructor which initializes the business object to be maintained. |
Method Summary | |
---|---|
void |
addMultipleValueLookupResults(MaintenanceDocument document,
String collectionName,
Collection<PersistableBusinessObject> rawValues,
boolean needsBlank,
PersistableBusinessObject bo)
|
void |
addNewLineToCollection(String collectionName)
Adds the new line for the given collection to the business object's collection. |
void |
clearBusinessObjectOfRestrictedValues(MaintenanceDocumentRestrictions maintenanceDocumentRestrictions)
Blanks out or sets the default of any value specified as restricted within the MaintenanceDocumentRestrictions instance. |
protected void |
clearCollectionRestrictedValues(String fieldNamePrefix,
BusinessObject businessObject,
MaintainableCollectionDefinition collectionDefinition,
MaintenanceDocumentRestrictions maintenanceDocumentRestrictions)
|
protected void |
clearFieldRestrictedValues(String fieldNamePrefix,
BusinessObject businessObject,
MaintainableFieldDefinition fieldDefinition,
MaintenanceDocumentRestrictions maintenanceDocumentRestrictions)
|
protected Map<String,String> |
decryptEncryptedData(Map<String,String> fieldValues,
MaintenanceDocument maintenanceDocument,
String methodToCall)
Special hidden parameters are set on the maintenance jsp starting with a prefix that tells us which fields have been encrypted. |
void |
deleteBusinessObject()
|
void |
doRouteStatusChange(DocumentHeader documentHeader)
method to integrate with workflow, where we will actually handle the transitions of status for documents |
protected Collection<String> |
generateAllAffectedReferences(Class boClass,
Map<String,String> fkToPkMappings,
String nestedBOPrefix,
String collectionPrefix)
|
List<MaintenanceLock> |
generateMaintenanceLocks()
Note: as currently implemented, every key field for a given BusinessObject subclass must have a visible getter. |
Collection<String> |
getAffectedReferencesFromLookup(BusinessObject baseBO,
String attributeName,
String collectionPrefix)
Returns a list of references that must be refreshed after a lookup performed on an attribute is performed. |
protected Collection<String> |
getAllRefreshableReferences(Class boClass)
|
Class |
getBoClass()
|
PersistableBusinessObject |
getBusinessObject()
Returns instance of the business object that is being maintained. |
static BusinessObjectAuthorizationService |
getBusinessObjectAuthorizationService()
|
static BusinessObjectDictionaryService |
getBusinessObjectDictionaryService()
|
static BusinessObjectMetaDataService |
getBusinessObjectMetaDataService()
|
static BusinessObjectService |
getBusinessObjectService()
|
List<Section> |
getCoreSections(MaintenanceDocument document,
Maintainable oldMaintainable)
Gets list of maintenance sections built from the data dictionary. |
String |
getCustomLockDescriptor(Person user)
This default implementation just throws a PessimisticLockingException. |
static DataDictionaryService |
getDataDictionaryService()
|
static DocumentHelperService |
getDocumentHelperService()
|
String |
getDocumentTitle(MaintenanceDocument document)
This is a hook to allow the document to override the generic document title. |
protected String |
getDocumentTypeName()
Retrieves the document type name from the data dictionary based on business object class |
List<String> |
getDuplicateIdentifierFieldsFromDataDictionary(String docTypeName,
String collectionName)
This method is to retrieve a List of fields which are specified in the maintenance document data dictionary as the duplicateIdentificationFields. |
static EncryptionService |
getEncryptionService()
|
Map<String,Boolean> |
getInactiveRecordDisplay()
Returns the Map used to control the state of inactive record collection display. |
String |
getLockingDocumentId()
Searches for any relevant locking documents. |
String |
getMaintainableTitle()
Retrieves title for maintenance document from data dictionary |
String |
getMaintenanceAction()
Returns the maintenance action - new, edit, or copy |
static MaintenanceDocumentDictionaryService |
getMaintenanceDocumentDictionaryService()
|
static MaintenanceDocumentService |
getMaintenanceDocumentService()
|
List<String> |
getMultiValueIdentifierList(Collection maintCollection,
List<String> duplicateIdentifierFields)
|
PersistableBusinessObject |
getNewCollectionLine(String collectionName)
Gets the holder for the "add line" for a collection on the business object |
static PersistenceStructureService |
getPersistenceStructureService()
|
static PersonService |
getPersonService()
|
List |
getSections(MaintenanceDocument document,
Maintainable oldMaintainable)
Calls method to get all the core sections for the business object defined in the data dictionary. |
boolean |
getShowInactiveRecords(String collectionName)
Indicates whether inactive records for the given collection should be display. |
List<Long> |
getWorkflowEngineDocumentIdsToLock()
Return an array of document ids to lock prior to processing this document in the workflow engine. |
boolean |
hasBusinessObjectExisted(BusinessObject bo,
List<String> existingIdentifierList,
List<String> duplicateIdentifierFields)
|
PersistableBusinessObject |
initNewCollectionLine(String collectionName)
|
boolean |
isBoNotesEnabled()
Retrieves the status of the boNotesEnabled |
boolean |
isExternalBusinessObject()
By default a maintainable is not external |
boolean |
isOldBusinessObjectInDocument()
|
protected boolean |
isRelationshipRefreshable(Class boClass,
String relationshipName)
|
protected void |
performCollectionForceUpperCase(String fieldNamePrefix,
BusinessObject bo,
MaintainableCollectionDefinition collectionDefinition,
Map fieldValues)
|
protected void |
performFieldForceUpperCase(BusinessObject bo,
Map fieldValues)
|
protected void |
performFieldForceUpperCase(String fieldNamePrefix,
BusinessObject bo,
MaintainableFieldDefinition fieldDefinition,
Map fieldValues)
|
protected void |
performForceUpperCase(Map fieldValues)
|
Map |
populateBusinessObject(Map<String,String> fieldValues,
MaintenanceDocument maintenanceDocument,
String methodToCall)
This method populates the business object based on key/value pairs. |
Map<String,String> |
populateNewCollectionLines(Map<String,String> fieldValues,
MaintenanceDocument maintenanceDocument,
String methodToCall)
Populates the new collection lines based on key/value pairs. |
protected Map |
populateNewSubCollectionLines(MaintainableCollectionDefinition parentCollection,
Map fieldValues)
|
void |
prepareBusinessObject(BusinessObject businessObject)
Gives chance to a maintainable object to prepare and return a maintainable object which might be external to the system |
void |
prepareBusinessObjectForAdditionFromMultipleValueLookup(String collectionName,
BusinessObject bo)
|
void |
prepareForSave()
This method is a hook to do any necessary pre-save processing. |
void |
processAfterAddLine(String colName,
Class colClass)
Deprecated. |
void |
processAfterCopy(MaintenanceDocument document,
Map<String,String[]> parameters)
Set the new collection records back to true so they can be deleted (copy should act like new) |
void |
processAfterEdit(MaintenanceDocument document,
Map<String,String[]> parameters)
This method is a hook to do any necessary post-edit processing, which is to say that it is called when a document is about to be edited; this is therefore a hook to write any code to modify the business object before it is displayed to the end user to edit. |
void |
processAfterNew(MaintenanceDocument document,
Map<String,String[]> parameters)
This method is a hook to do any necessary post-copy processing. |
void |
processAfterPost(MaintenanceDocument document,
Map<String,String[]> parameters)
This method is a hook to do any necessary post-post processing. |
void |
processAfterRetrieve()
This method is a hook to do any necessary post-load processing. |
void |
processBeforeAddLine(String colName,
Class colClass,
BusinessObject addBO)
KULRICE-4264 - a hook to change the state of the business object, which is the "new line" of a collection, before it is validated |
void |
refresh(String refreshCaller,
Map fieldValues,
MaintenanceDocument document)
Called from a lookup return by the maintenance action. |
protected void |
refreshReferences(String referencesToRefresh)
|
void |
saveBusinessObject()
This method will cause the Maintainable implementation to save/store the relevant business object(s). |
void |
setBoClass(Class boClass)
|
void |
setBusinessObject(PersistableBusinessObject businessObject)
Sets an instance of a business object to be maintained. |
void |
setDocumentNumber(String documentNumber)
Sets the documentNumber attribute value. |
void |
setGenerateBlankRequiredValues(String docTypeName)
Set default values for blank required fields. |
void |
setGenerateDefaultValues(String docTypeName)
Set default values. |
void |
setMaintenanceAction(String maintenanceAction)
Sets the maintenance action - new, edit, or copy |
protected void |
setNewCollectionLineDefaultValues(String collectionName,
PersistableBusinessObject addLine)
|
void |
setShowInactiveRecords(String collectionName,
boolean showInactive)
Indicates to maintainble whether or not inactive records should be displayed for the given collection name. |
void |
setupNewFromExisting(MaintenanceDocument document,
Map<String,String[]> parameters)
This methods will do the setting of some attributes that might be necessary if we're creating a new business object using on an existing business object. |
protected boolean |
shouldFieldBeEncrypted(MaintenanceDocument maintenanceDocument,
String fieldName,
MaintenanceDocumentRestrictions auths,
String methodToCall)
Determines whether the field in a request should be encrypted. |
boolean |
useCustomLockDescriptors()
This default implementation simply returns false to indicate that custom lock descriptors are not supported by KualiMaintainableImpl. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private static final org.apache.log4j.Logger LOG
protected String documentNumber
protected PersistableBusinessObject businessObject
protected Class boClass
protected String maintenanceAction
protected Map<String,PersistableBusinessObject> newCollectionLines
protected Map<String,Boolean> inactiveRecordDisplay
protected String docTypeName
protected static PersistenceStructureService persistenceStructureService
protected static MaintenanceDocumentDictionaryService maintenanceDocumentDictionaryService
protected static DataDictionaryService dataDictionaryService
protected static BusinessObjectService businessObjectService
protected static BusinessObjectDictionaryService businessObjectDictionaryService
protected static EncryptionService encryptionService
protected static PersonService personService
protected static BusinessObjectMetaDataService businessObjectMetaDataService
protected static BusinessObjectAuthorizationService businessObjectAuthorizationService
protected static MaintenanceDocumentService maintenanceDocumentService
protected static DocumentHelperService documentHelperService
Constructor Detail |
---|
public KualiMaintainableImpl()
public KualiMaintainableImpl(PersistableBusinessObject businessObject)
businessObject
- Method Detail |
---|
public void setupNewFromExisting(MaintenanceDocument document, Map<String,String[]> parameters)
Maintainable
setupNewFromExisting
in interface Maintainable
public void processAfterPost(MaintenanceDocument document, Map<String,String[]> parameters)
Maintainable
processAfterPost
in interface Maintainable
public String getDocumentTitle(MaintenanceDocument document)
getDocumentTitle
in interface Maintainable
public List<MaintenanceLock> generateMaintenanceLocks()
generateMaintenanceLocks
in interface Maintainable
public Map populateBusinessObject(Map<String,String> fieldValues, MaintenanceDocument maintenanceDocument, String methodToCall)
Maintainable
populateBusinessObject
in interface Maintainable
Maintainable.populateBusinessObject(java.util.Map, org.kuali.rice.kns.document.MaintenanceDocument, String)
protected Map<String,String> decryptEncryptedData(Map<String,String> fieldValues, MaintenanceDocument maintenanceDocument, String methodToCall)
fieldValues
- - possibly with encrypted values
protected boolean shouldFieldBeEncrypted(MaintenanceDocument maintenanceDocument, String fieldName, MaintenanceDocumentRestrictions auths, String methodToCall)
maintenanceDocument
- fieldName
- auths
- methodToCall
-
public List getSections(MaintenanceDocument document, Maintainable oldMaintainable)
getSections
in interface Maintainable
oldMaintainable
- - If this is the new maintainable, the old is passed in for reference. If it is the old maintainable, then null will be passed in
public List<Section> getCoreSections(MaintenanceDocument document, Maintainable oldMaintainable)
public void saveBusinessObject()
Maintainable
saveBusinessObject
in interface Maintainable
Maintainable.saveBusinessObject()
public String getMaintainableTitle()
getMaintainableTitle
in interface Maintainable
public boolean isBoNotesEnabled()
isBoNotesEnabled
in interface Maintainable
public void refresh(String refreshCaller, Map fieldValues, MaintenanceDocument document)
Maintainable
refresh
in interface Maintainable
Impls will be needed if custom action
is needed on refresh.
protected void refreshReferences(String referencesToRefresh)
public void addMultipleValueLookupResults(MaintenanceDocument document, String collectionName, Collection<PersistableBusinessObject> rawValues, boolean needsBlank, PersistableBusinessObject bo)
addMultipleValueLookupResults
in interface Maintainable
public List<String> getDuplicateIdentifierFieldsFromDataDictionary(String docTypeName, String collectionName)
getDuplicateIdentifierFieldsFromDataDictionary
in interface Maintainable
docTypeName
- collectionName
- public List<String> getMultiValueIdentifierList(Collection maintCollection, List<String> duplicateIdentifierFields)
getMultiValueIdentifierList
in interface Maintainable
public boolean hasBusinessObjectExisted(BusinessObject bo, List<String> existingIdentifierList, List<String> duplicateIdentifierFields)
hasBusinessObjectExisted
in interface Maintainable
public void prepareBusinessObjectForAdditionFromMultipleValueLookup(String collectionName, BusinessObject bo)
public void prepareForSave()
Maintainable
prepareForSave
in interface Maintainable
Maintainable.prepareForSave()
public void processAfterRetrieve()
Maintainable
processAfterRetrieve
in interface Maintainable
Maintainable.processAfterRetrieve()
public void processAfterCopy(MaintenanceDocument document, Map<String,String[]> parameters)
processAfterCopy
in interface Maintainable
org.kuali.rice.kns.maintenance.KualiMaintainableImpl#processAfterCopy()
public void processAfterEdit(MaintenanceDocument document, Map<String,String[]> parameters)
Maintainable
processAfterEdit
in interface Maintainable
org.kuali.rice.kns.maintenance.Maintainable#processAfterEdit()
public void processAfterNew(MaintenanceDocument document, Map<String,String[]> parameters)
Maintainable
processAfterNew
in interface Maintainable
org.kuali.rice.kns.maintenance.Maintainable#processAfterNew()
protected String getDocumentTypeName()
public PersistableBusinessObject getBusinessObject()
Maintainable
getBusinessObject
in interface Maintainable
public void setBusinessObject(PersistableBusinessObject businessObject)
Maintainable
setBusinessObject
in interface Maintainable
businessObject
- Sets the instance of a business object that will be maintained.public Class getBoClass()
getBoClass
in interface Maintainable
public void setBoClass(Class boClass)
setBoClass
in interface Maintainable
boClass
- The boClass to set.public String getMaintenanceAction()
Maintainable
getMaintenanceAction
in interface Maintainable
public void setMaintenanceAction(String maintenanceAction)
Maintainable
setMaintenanceAction
in interface Maintainable
maintenanceAction
- The maintenanceAction to set.public void setGenerateDefaultValues(String docTypeName)
Maintainable
setGenerateDefaultValues
in interface Maintainable
org.kuali.rice.kns.maintenance.Maintainable#setGenerateDefaultValues()
public void setGenerateBlankRequiredValues(String docTypeName)
Maintainable
setGenerateBlankRequiredValues
in interface Maintainable
org.kuali.rice.kns.maintenance.Maintainable#setGenerateBlankRequiredValues()
public final void setDocumentNumber(String documentNumber)
setDocumentNumber
in interface Maintainable
documentNumber
- The documentNumber to set.@Deprecated public void processAfterAddLine(String colName, Class colClass)
public void processBeforeAddLine(String colName, Class colClass, BusinessObject addBO)
Maintainable
processBeforeAddLine
in interface Maintainable
Maintainable.processBeforeAddLine(java.lang.String, java.lang.Class, org.kuali.rice.kns.bo.BusinessObject)
public boolean getShowInactiveRecords(String collectionName)
Maintainable
getShowInactiveRecords
in interface Maintainable
collectionName
- - name of the collection (or sub-collection) to check inactive record display setting
Maintainable.getShowInactiveRecords(java.lang.String)
public void setShowInactiveRecords(String collectionName, boolean showInactive)
Maintainable
setShowInactiveRecords
in interface Maintainable
collectionName
- - name of the collection (or sub-collection) to set inactive record display settingshowInactive
- - true to display inactive, false to not display inactive recordsMaintainable.setShowInactiveRecords(java.lang.String, boolean)
public Map<String,Boolean> getInactiveRecordDisplay()
Maintainable
getInactiveRecordDisplay
in interface Maintainable
public void addNewLineToCollection(String collectionName)
Maintainable
addNewLineToCollection
in interface Maintainable
public PersistableBusinessObject getNewCollectionLine(String collectionName)
Maintainable
getNewCollectionLine
in interface Maintainable
public PersistableBusinessObject initNewCollectionLine(String collectionName)
public Map<String,String> populateNewCollectionLines(Map<String,String> fieldValues, MaintenanceDocument maintenanceDocument, String methodToCall)
Maintainable
populateNewCollectionLines
in interface Maintainable
org.kuali.rice.kns.maintenance.Maintainable#populateNewCollectionLines(java.util.Map)
protected Map populateNewSubCollectionLines(MaintainableCollectionDefinition parentCollection, Map fieldValues)
public Collection<String> getAffectedReferencesFromLookup(BusinessObject baseBO, String attributeName, String collectionPrefix)
SelectiveReferenceRefresher
getAffectedReferencesFromLookup
in interface SelectiveReferenceRefresher
attributeName
- the name of the attribute with a quickfinder of the maintained BO.
protected boolean isRelationshipRefreshable(Class boClass, String relationshipName)
protected Collection<String> generateAllAffectedReferences(Class boClass, Map<String,String> fkToPkMappings, String nestedBOPrefix, String collectionPrefix)
protected Collection<String> getAllRefreshableReferences(Class boClass)
protected void setNewCollectionLineDefaultValues(String collectionName, PersistableBusinessObject addLine)
public void doRouteStatusChange(DocumentHeader documentHeader)
Maintainable
doRouteStatusChange
in interface Maintainable
public List<Long> getWorkflowEngineDocumentIdsToLock()
Maintainable
getWorkflowEngineDocumentIdsToLock
in interface Maintainable
public static PersistenceStructureService getPersistenceStructureService()
public static MaintenanceDocumentDictionaryService getMaintenanceDocumentDictionaryService()
public static DataDictionaryService getDataDictionaryService()
public static BusinessObjectService getBusinessObjectService()
public static BusinessObjectDictionaryService getBusinessObjectDictionaryService()
public static EncryptionService getEncryptionService()
public static PersonService getPersonService()
public static BusinessObjectMetaDataService getBusinessObjectMetaDataService()
public static BusinessObjectAuthorizationService getBusinessObjectAuthorizationService()
public static MaintenanceDocumentService getMaintenanceDocumentService()
public static DocumentHelperService getDocumentHelperService()
public void clearBusinessObjectOfRestrictedValues(MaintenanceDocumentRestrictions maintenanceDocumentRestrictions)
Maintainable
MaintenanceDocumentRestrictions
instance.
This method should only be called if this maintainable represents the new maintainable of the maintenance document.
clearBusinessObjectOfRestrictedValues
in interface Maintainable
Maintainable.clearBusinessObjectOfRestrictedValues(org.kuali.rice.kns.document.authorization.MaintenanceDocumentRestrictions)
protected void clearCollectionRestrictedValues(String fieldNamePrefix, BusinessObject businessObject, MaintainableCollectionDefinition collectionDefinition, MaintenanceDocumentRestrictions maintenanceDocumentRestrictions)
protected void clearFieldRestrictedValues(String fieldNamePrefix, BusinessObject businessObject, MaintainableFieldDefinition fieldDefinition, MaintenanceDocumentRestrictions maintenanceDocumentRestrictions)
protected void performForceUpperCase(Map fieldValues)
protected void performFieldForceUpperCase(String fieldNamePrefix, BusinessObject bo, MaintainableFieldDefinition fieldDefinition, Map fieldValues)
protected void performCollectionForceUpperCase(String fieldNamePrefix, BusinessObject bo, MaintainableCollectionDefinition collectionDefinition, Map fieldValues)
protected void performFieldForceUpperCase(BusinessObject bo, Map fieldValues)
public boolean isExternalBusinessObject()
isExternalBusinessObject
in interface Maintainable
Maintainable.isExternalBusinessObject()
public void prepareBusinessObject(BusinessObject businessObject)
Maintainable
prepareBusinessObject
in interface Maintainable
org.kuali.rice.kns.maintenance.Maintainable#getExternalBusinessObject()
public String getLockingDocumentId()
Maintainable
getLockingDocumentId
in interface Maintainable
Maintainable.getLockingDocumentId()
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 lock.
Maintainable.getCustomLockDescriptor(org.kuali.rice.kim.bo.Person)
public void deleteBusinessObject()
deleteBusinessObject
in interface Maintainable
public boolean isOldBusinessObjectInDocument()
isOldBusinessObjectInDocument
in interface Maintainable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |