View Javadoc
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   * This OleGloballyProtectedFieldServiceImpl is the implementation for the Service OleGloballyProtectedFieldService
13   */
14  public class OleGloballyProtectedFieldServiceImpl extends MaintenanceDocumentServiceImpl implements OleGloballyProtectedFieldService {
15  
16  
17      /**
18       * @see org.kuali.rice.krad.service.impl.MaintenanceDocumentServiceImpl#setupMaintenanceObject
19       */
20      /**
21       * This method creates maintenance object for delete operation using maintenanceAction.
22       * @param document
23       * @param maintenanceAction
24       * @param requestParameters
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  }