1 package org.kuali.ole.service.impl;
2
3 import org.kuali.rice.krad.maintenance.MaintenanceDocument;
4 import org.kuali.rice.krad.service.DocumentService;
5 import org.kuali.rice.krad.service.impl.MaintenanceDocumentServiceImpl;
6 import org.kuali.rice.krad.util.KRADConstants;
7 import org.kuali.rice.krad.util.ObjectUtils;
8
9 import java.io.Serializable;
10 import java.util.Map;
11
12
13
14
15
16
17
18
19 public class OlePatronBillMaintenanceDocumentServiceImpl extends MaintenanceDocumentServiceImpl {
20
21 private DocumentService documentService;
22
23
24
25
26
27 protected DocumentService getDocumentService() {
28 return this.documentService;
29 }
30
31
32
33
34 public void setDocumentService(DocumentService documentService) {
35 this.documentService = documentService;
36 }
37
38
39 public void setupMaintenanceObjectForDelete(MaintenanceDocument document, String maintenanceAction,
40 Map<String, String[]> requestParameters) {
41 document.getNewMaintainableObject().setMaintenanceAction(maintenanceAction);
42 document.getOldMaintainableObject().setMaintenanceAction(maintenanceAction);
43
44 Object oldDataObject = retrieveObjectForMaintenance(document, requestParameters);
45 Object newDataObject = ObjectUtils.deepCopy((Serializable) oldDataObject);
46
47 document.getOldMaintainableObject().setDataObject(oldDataObject);
48 document.getNewMaintainableObject().setDataObject(newDataObject);
49 }
50
51
52 }