1 package org.kuali.ole.describe.service.impl;
2
3 import org.kuali.ole.describe.service.ExternalDSConfigMaintenanceDocumentService;
4 import org.kuali.rice.krad.maintenance.MaintenanceDocument;
5 import org.kuali.rice.krad.service.impl.MaintenanceDocumentServiceImpl;
6 import org.kuali.rice.krad.util.ObjectUtils;
7
8 import java.io.Serializable;
9 import java.util.Map;
10
11
12
13
14
15
16
17
18 public class ExternalDSConfigMaintenanceDocumentServiceImpl
19 extends MaintenanceDocumentServiceImpl
20 implements ExternalDSConfigMaintenanceDocumentService {
21
22
23
24
25
26
27
28
29
30
31
32 public void setupMaintenanceObjectForDelete(MaintenanceDocument document, String maintenanceAction,
33 Map<String, String[]> requestParameters) {
34 document.getNewMaintainableObject().setMaintenanceAction(maintenanceAction);
35 document.getOldMaintainableObject().setMaintenanceAction(maintenanceAction);
36
37 Object oldDataObject = retrieveObjectForMaintenance(document, requestParameters);
38 Object newDataObject = ObjectUtils.deepCopy((Serializable) oldDataObject);
39
40 document.getOldMaintainableObject().setDataObject(oldDataObject);
41 document.getNewMaintainableObject().setDataObject(newDataObject);
42 }
43 }