|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.service.impl.MaintenanceDocumentServiceImpl
public class MaintenanceDocumentServiceImpl
Service implementation for the MaintenanceDocument structure. This is the default implementation, that is delivered with Kuali
Field Summary | |
---|---|
protected DataObjectAuthorizationService |
dataObjectAuthorizationService
|
protected DataObjectService |
dataObjectService
|
protected DocumentDictionaryService |
documentDictionaryService
|
protected DocumentService |
documentService
|
protected LegacyDataAdapter |
legacyDataAdapter
|
Constructor Summary | |
---|---|
MaintenanceDocumentServiceImpl()
|
Method Summary | |
---|---|
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 |
void |
deleteLocks(String documentNumber)
Call the same-named method in the Dao, since the service has access to the Dao, but the caller doesn't. |
protected DataObjectAuthorizationService |
getDataObjectAuthorizationService()
|
DocumentDictionaryService |
getDocumentDictionaryService()
|
protected DocumentService |
getDocumentService()
|
String |
getLockingDocumentId(Maintainable maintainable,
String documentNumber)
Attempts to find any other active documents that are pending on the same maintenance record. |
String |
getLockingDocumentId(MaintenanceDocument document)
Attempts to find any other active documents that are pending on the same maintenance record. |
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(DataObjectService dataObjectService)
|
void |
setDocumentDictionaryService(DocumentDictionaryService documentDictionaryService)
|
void |
setDocumentService(DocumentService documentService)
|
void |
setLegacyDataAdapter(LegacyDataAdapter legacyDataAdapter)
|
void |
setupMaintenanceObject(MaintenanceDocument document,
String maintenanceAction,
Map<String,String[]> requestParameters)
Called to setup the object being maintained |
MaintenanceDocument |
setupNewMaintenanceDocument(String objectClassName,
String documentTypeName,
String maintenanceAction)
Prepares the MaintenanceDocument on initial request |
void |
storeLocks(List<MaintenanceLock> maintenanceLocks)
Call the same-named method in the Dao, since the service has access to the Dao, but the caller doesn't. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LegacyDataAdapter legacyDataAdapter
protected DataObjectService dataObjectService
protected DataObjectAuthorizationService dataObjectAuthorizationService
protected DocumentService documentService
protected DocumentDictionaryService documentDictionaryService
Constructor Detail |
---|
public MaintenanceDocumentServiceImpl()
Method Detail |
---|
public MaintenanceDocument setupNewMaintenanceDocument(String objectClassName, String documentTypeName, String maintenanceAction)
MaintenanceDocumentService
MaintenanceDocument
on initial request
This includes retrieving the data object for edit or copy, clearing fields
setupNewMaintenanceDocument
in interface MaintenanceDocumentService
objectClassName
- - class name for the object being maintaineddocumentTypeName
- - workflow doc type for the maintenance document requestedmaintenanceAction
- - indicates whether this is a new, copy, or edit maintenance
action
MaintenanceDocumentService.setupNewMaintenanceDocument(java.lang.String,
java.lang.String, java.lang.String)
public void setupMaintenanceObject(MaintenanceDocument document, String maintenanceAction, Map<String,String[]> requestParameters)
MaintenanceDocumentService
For edit and copy actions, the old record is retrieved and prepared for
editing (in the case of a copy some fields are cleared). In addition some
authorization checks are performed and hooks for custom
Maintainble
implementations are invoked.
setupMaintenanceObject
in interface MaintenanceDocumentService
document
- - document instance for the maintenance objectmaintenanceAction
- - the requested maintenance action (new, new with existing,
copy, edit)requestParameters
- - Map of parameters from the requestsetupMaintenanceObject(org.kuali.rice.krad.maintenance.MaintenanceDocument, java.lang.String, java.util.Map)
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 request
protected void clearPrimaryKeyFields(Object maintenanceObject, Class<?> dataObjectClass)
maintenanceObject
- - document to clear the pk fields ondataObjectClass
- - class to use for retrieving primary key metadataprotected 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 parameters
requestParameters
- - map of parameters from the requestdataObjectClass
- - class to use for checking security parameter restrictions
protected 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)
MaintenanceDocumentService
getLockingDocumentId
in interface MaintenanceDocumentService
document
- - document to test
MaintenanceDocumentService.getLockingDocumentId(org.kuali.rice.krad.maintenance.MaintenanceDocument)
public String getLockingDocumentId(Maintainable maintainable, String documentNumber)
MaintenanceDocumentService
getLockingDocumentId
in interface MaintenanceDocumentService
maintainable
- - maintainable representing the document to testdocumentNumber
- - the documentNumber/docHeaderId of the document to test
MaintenanceDocumentService.getLockingDocumentId(org.kuali.rice.krad.maintenance.Maintainable,
java.lang.String)
protected String getLockingDocumentNumber(String lockingRepresentation, String documentNumber)
public void deleteLocks(String documentNumber)
MaintenanceDocumentService
deleteLocks
in interface MaintenanceDocumentService
documentNumber
- - document number whose locks should be deletedMaintenanceDocumentService.deleteLocks(String)
public void storeLocks(List<MaintenanceLock> maintenanceLocks)
MaintenanceDocumentService
storeLocks
in interface MaintenanceDocumentService
maintenanceLocks
- - the list of maintenance locks to be storedMaintenanceDocumentService.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(DataObjectService dataObjectService)
public void setLegacyDataAdapter(LegacyDataAdapter legacyDataAdapter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |