Interface MaintenanceDocumentService
MaintenanceDocument.- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteLocks(String documentNumber) Call the same-named method in the Dao, since the service has access to the Dao, but the caller doesn't.getLockingDocumentId(Maintainable maintainable, String documentNumber) Attempts to find any other active documents that are pending on the same maintenance record.getLockingDocumentId(MaintenanceDocument document) Attempts to find any other active documents that are pending on the same maintenance record.voidsetupMaintenanceObject(MaintenanceDocument document, String maintenanceAction, Map<String, String[]> requestParameters) Called to setup the object being maintained.setupNewMaintenanceDocument(String objectClassName, String docTypeName, String maintenanceAction) Prepares theMaintenanceDocumenton initial request.voidstoreLocks(List<org.kuali.rice.krad.maintenance.MaintenanceLock> maintenanceLocks) Call the same-named method in the Dao, since the service has access to the Dao, but the caller doesn't.
-
Method Details
-
setupNewMaintenanceDocument
MaintenanceDocument setupNewMaintenanceDocument(String objectClassName, String docTypeName, String maintenanceAction) Prepares theMaintenanceDocumenton initial request.This includes retrieving the data object for edit or copy, clearing fields
- Parameters:
objectClassName- class name for the object being maintaineddocTypeName- workflow doc type for the maintenance document requestedmaintenanceAction- indicates whether this is a new, copy, or edit maintenance action- Returns:
- MaintenanceDocument prepared document instance
-
setupMaintenanceObject
void setupMaintenanceObject(MaintenanceDocument document, String maintenanceAction, Map<String, String[]> requestParameters) Called to setup the object being maintained.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
Maintainbleimplementations are invoked.- Parameters:
document- document instance for the maintenance objectmaintenanceAction- the requested maintenance action (new, new with existing, copy, edit)requestParameters- Map of parameters from the request
-
getLockingDocumentId
Attempts to find any other active documents that are pending on the same maintenance record.If any are pending and locked, thereby blocking this document, then the docHeaderId/documentNumber of the blocking locked document is returned. Otherwise, if nothing is blocking, then null is returned.
- Parameters:
document- document to test- Returns:
- A String representing the docHeaderId of any blocking document, or null if none are blocking
-
getLockingDocumentId
Attempts to find any other active documents that are pending on the same maintenance record.If any are pending and locked, thereby blocking this document, then the docHeaderId/documentNumber of the blocking locked document is returned. * Otherwise, if nothing is blocking, then null is returned.
- Parameters:
maintainable- maintainable representing the document to testdocumentNumber- the documentNumber/docHeaderId of the document to test- Returns:
- A String representing the docHeaderId of any blocking document, or null if none are blocking
-
deleteLocks
Call the same-named method in the Dao, since the service has access to the Dao, but the caller doesn't.This method deletes the locks for the given document number. It is called when the document is final, thus it can be unlocked, or when the locks need to be regenerated (thus they get cleared first).
- Parameters:
documentNumber- document number whose locks should be deleted
-
storeLocks
Call the same-named method in the Dao, since the service has access to the Dao, but the caller doesn't.This method stores the given list of maintenance locks. Typically these will all be for the same document.
- Parameters:
maintenanceLocks- the list of maintenance locks to be stored
-