public class MaintenanceDocumentServiceImpl extends Object implements MaintenanceDocumentService
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.log4j.Logger |
LOG |
| Constructor and Description |
|---|
MaintenanceDocumentServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,String> |
buildKeyMapFromRequest(Map<String,String[]> requestParameters,
Class<?> dataObjectClass)
Based on the maintenance object class retrieves the key field names from
the
BusinessObjectMetaDataService (or alternatively from the
request parameters), then retrieves any matching key value pairs from the
request parameters |
protected void |
checkMaintenanceActionAuthorization(MaintenanceDocument document,
Object oldBusinessObject,
String maintenanceAction,
Map<String,String[]> requestParameters)
For the edit and delete maintenance actions checks with the
BusinessObjectAuthorizationService to check whether the
action is allowed for the record data. |
protected void |
clearPrimaryKeyFields(Object maintenanceObject,
Class<?> dataObjectClass)
Clears the value of the primary key fields on the maintenance object
|
protected void |
clearUnauthorizedNewFields(MaintenanceDocument document)
Used as part of the Copy functionality, to clear any field values that
the user making the copy does not have permissions to modify.
|
void |
deleteLocks(String documentNumber) |
protected DataObjectAuthorizationService |
getDataObjectAuthorizationService() |
protected DataObjectMetaDataService |
getDataObjectMetaDataService() |
DocumentDictionaryService |
getDocumentDictionaryService() |
protected DocumentService |
getDocumentService() |
String |
getLockingDocumentId(Maintainable maintainable,
String documentNumber) |
String |
getLockingDocumentId(MaintenanceDocument document) |
MaintenanceDocumentDao |
getMaintenanceDocumentDao() |
protected void |
populateMaintenanceObjectWithCopyKeyValues(Map<String,String> parameters,
Object oldBusinessObject,
Maintainable oldMaintainableObject)
Looks for a special request parameters giving the names of the keys that
should be retrieved from the request parameters and copied to the
maintenance object
|
protected void |
processMaintenanceObjectForCopy(MaintenanceDocument document,
Object maintenanceObject,
Map<String,String[]> requestParameters)
For the copy action clears out primary key values for the old record and
does authorization checks on the remaining fields.
|
protected Object |
retrieveObjectForMaintenance(MaintenanceDocument document,
Map<String,String[]> requestParameters)
For the edit or copy actions retrieves the record that is to be
maintained
|
void |
setDataObjectAuthorizationService(DataObjectAuthorizationService dataObjectAuthorizationService) |
void |
setDataObjectMetaDataService(DataObjectMetaDataService dataObjectMetaDataService) |
void |
setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService) |
void |
setDocumentService(DocumentService documentService) |
void |
setMaintenanceDocumentDao(MaintenanceDocumentDao maintenanceDocumentDao) |
void |
setupMaintenanceObject(MaintenanceDocument document,
String maintenanceAction,
Map<String,String[]> requestParameters) |
MaintenanceDocument |
setupNewMaintenanceDocument(String objectClassName,
String documentTypeName,
String maintenanceAction) |
void |
storeLocks(List<MaintenanceLock> maintenanceLocks) |
protected static final org.apache.log4j.Logger LOG
public MaintenanceDocumentServiceImpl()
public MaintenanceDocument setupNewMaintenanceDocument(String objectClassName, String documentTypeName, String maintenanceAction)
public void setupMaintenanceObject(MaintenanceDocument document, String maintenanceAction, Map<String,String[]> requestParameters)
protected void checkMaintenanceActionAuthorization(MaintenanceDocument document, Object oldBusinessObject, String maintenanceAction, Map<String,String[]> requestParameters)
BusinessObjectAuthorizationService to check whether the
action is allowed for the record data. In action is allowed invokes the
custom processing hook on the Maintainble.document - - document instance for the maintenance objectoldBusinessObject - - the old maintenance recordmaintenanceAction - - type of maintenance action requestedrequestParameters - - map of parameters from the requestprotected Object retrieveObjectForMaintenance(MaintenanceDocument document, Map<String,String[]> requestParameters)
Based on the persistence metadata for the maintenance object class
retrieves the primary key values from the given request parameters map
(if the class is persistable). With those key values attempts to find the
record using the LookupService.
document - - document instance for the maintenance objectrequestParameters - - Map of parameters from the requestprotected void processMaintenanceObjectForCopy(MaintenanceDocument document, Object maintenanceObject, Map<String,String[]> requestParameters)
Maintainbledocument - - document instance for the maintenance objectmaintenanceObject - - the object instance being maintainedrequestParameters - - map of parameters from the requestprotected void clearPrimaryKeyFields(Object maintenanceObject, Class<?> dataObjectClass)
document - - document to clear the pk fields ondataObjectClass - - class to use for retrieving primary key metadataprotected void clearUnauthorizedNewFields(MaintenanceDocument document)
document - - document to be adjustedprotected Map<String,String> buildKeyMapFromRequest(Map<String,String[]> requestParameters, Class<?> dataObjectClass)
BusinessObjectMetaDataService (or alternatively from the
request parameters), then retrieves any matching key value pairs from the
request parametersrequestParameters - - map of parameters from the requestdataObjectClass - - class to use for checking security parameter restrictionsprotected void populateMaintenanceObjectWithCopyKeyValues(Map<String,String> parameters, Object oldBusinessObject, Maintainable oldMaintainableObject)
parameters - - map of parameters from the requestoldBusinessObject - - the old maintenance objectoldMaintainableObject - - the old maintainble object (used to get object class for
security checks)public String getLockingDocumentId(MaintenanceDocument document)
getLockingDocumentId in interface MaintenanceDocumentServiceMaintenanceDocumentService.getLockingDocumentId(org.kuali.rice.krad.maintenance.MaintenanceDocument)public String getLockingDocumentId(Maintainable maintainable, String documentNumber)
public void deleteLocks(String documentNumber)
deleteLocks in interface MaintenanceDocumentServiceMaintenanceDocumentService.deleteLocks(String)public void storeLocks(List<MaintenanceLock> maintenanceLocks)
storeLocks in interface MaintenanceDocumentServiceorg.kuali.rice.krad.service.MaintenanceDocumentService#saveLocks(List)public MaintenanceDocumentDao getMaintenanceDocumentDao()
public void setMaintenanceDocumentDao(MaintenanceDocumentDao maintenanceDocumentDao)
protected DataObjectAuthorizationService getDataObjectAuthorizationService()
public void setDataObjectAuthorizationService(DataObjectAuthorizationService dataObjectAuthorizationService)
protected DocumentService getDocumentService()
public void setDocumentService(DocumentService documentService)
protected DataObjectMetaDataService getDataObjectMetaDataService()
public void setDataObjectMetaDataService(DataObjectMetaDataService dataObjectMetaDataService)
public DocumentDictionaryService getDocumentDictionaryService()
public void setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService)
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.