public class MaintenanceDocumentServiceImpl extends Object implements MaintenanceDocumentService
| Modifier and Type | Field and Description |
|---|---|
protected DataObjectAuthorizationService |
dataObjectAuthorizationService |
protected org.kuali.rice.krad.data.DataObjectService |
dataObjectService |
protected DocumentDictionaryService |
documentDictionaryService |
protected DocumentService |
documentService |
protected LegacyDataAdapter |
legacyDataAdapter |
| 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 |
clearValuesForPropertyNames(Object maintenanceObject,
Class<?> dataObjectClass)
Clears the value of the particular fields on the maintenance object
|
void |
deleteLocks(String documentNumber) |
protected DataObjectAuthorizationService |
getDataObjectAuthorizationService() |
DocumentDictionaryService |
getDocumentDictionaryService() |
protected DocumentService |
getDocumentService() |
String |
getLockingDocumentId(Maintainable maintainable,
String documentNumber) |
String |
getLockingDocumentId(MaintenanceDocument document) |
protected String |
getLockingDocumentNumber(String lockingRepresentation,
String documentNumber) |
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 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 |
setDataObjectService(org.kuali.rice.krad.data.DataObjectService dataObjectService) |
void |
setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService) |
void |
setDocumentService(DocumentService documentService) |
void |
setLegacyDataAdapter(LegacyDataAdapter legacyDataAdapter) |
void |
setupMaintenanceObject(MaintenanceDocument document,
String maintenanceAction,
Map<String,String[]> requestParameters) |
MaintenanceDocument |
setupNewMaintenanceDocument(String objectClassName,
String documentTypeName,
String maintenanceAction) |
void |
storeLocks(List<MaintenanceLock> maintenanceLocks) |
protected LegacyDataAdapter legacyDataAdapter
protected org.kuali.rice.krad.data.DataObjectService dataObjectService
protected DataObjectAuthorizationService dataObjectAuthorizationService
protected DocumentService documentService
protected DocumentDictionaryService documentDictionaryService
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 clearPrimaryKeyFields(Object maintenanceObject, Class<?> dataObjectClass)
maintenanceObject - - document to clear the pk fields ondataObjectClass - - class to use for retrieving primary key metadataprotected void clearValuesForPropertyNames(Object maintenanceObject, Class<?> dataObjectClass)
maintenanceObject - - document to clear the fields ondataObjectClass - - class to use for retrieving list of fields to clearprotected 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)
protected String getLockingDocumentNumber(String lockingRepresentation, String documentNumber)
public void deleteLocks(String documentNumber)
deleteLocks in interface MaintenanceDocumentServiceMaintenanceDocumentService.deleteLocks(String)public void storeLocks(List<MaintenanceLock> maintenanceLocks)
storeLocks in interface MaintenanceDocumentServiceMaintenanceDocumentService.storeLocks(java.util.List)protected DataObjectAuthorizationService getDataObjectAuthorizationService()
public void setDataObjectAuthorizationService(DataObjectAuthorizationService dataObjectAuthorizationService)
protected DocumentService getDocumentService()
public void setDocumentService(DocumentService documentService)
public DocumentDictionaryService getDocumentDictionaryService()
public void setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService)
public void setDataObjectService(org.kuali.rice.krad.data.DataObjectService dataObjectService)
public void setLegacyDataAdapter(LegacyDataAdapter legacyDataAdapter)
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.