1 package org.kuali.ole.service.impl;
2
3 import org.kuali.ole.service.OleGloballyProtectedFieldService;
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 public class OleGloballyProtectedFieldServiceImpl extends MaintenanceDocumentServiceImpl implements OleGloballyProtectedFieldService {
15
16
17
18
19
20
21
22
23
24
25
26 public void setupMaintenanceObjectForDelete(MaintenanceDocument document, String maintenanceAction,
27 Map<String, String[]> requestParameters) {
28 document.getNewMaintainableObject().setMaintenanceAction(maintenanceAction);
29 document.getOldMaintainableObject().setMaintenanceAction(maintenanceAction);
30
31 Object oldDataObject = retrieveObjectForMaintenance(document, requestParameters);
32 Object newDataObject = ObjectUtils.deepCopy((Serializable) oldDataObject);
33
34 document.getOldMaintainableObject().setDataObject(oldDataObject);
35 document.getNewMaintainableObject().setDataObject(newDataObject);
36 }
37
38
39
40 }