1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.shiftdiff.rule.service;
17
18 import java.util.Map;
19
20 import org.kuali.hr.time.HrBusinessObject;
21 import org.kuali.hr.time.service.base.TkServiceLocator;
22 import org.kuali.hr.time.shiftdiff.rule.ShiftDifferentialRule;
23 import org.kuali.hr.time.util.HrBusinessObjectMaintainableImpl;
24 import org.kuali.rice.kns.document.MaintenanceDocument;
25 import org.kuali.rice.krad.util.GlobalVariables;
26
27 public class ShiftDifferentialRuleMaintenableImpl extends HrBusinessObjectMaintainableImpl {
28
29
30
31 private static final long serialVersionUID = 1L;
32
33 @Override
34 public void processAfterNew(MaintenanceDocument document,
35 Map<String, String[]> parameters) {
36 super.processAfterNew(document, parameters);
37 }
38
39 @Override
40 public void processAfterPost(MaintenanceDocument document,
41 Map<String, String[]> parameters) {
42 ShiftDifferentialRule shiftDifferentialRule = (ShiftDifferentialRule) document
43 .getNewMaintainableObject().getBusinessObject();
44 shiftDifferentialRule.setUserPrincipalId(GlobalVariables
45 .getUserSession().getPrincipalId());
46 super.processAfterPost(document, parameters);
47 }
48
49 @Override
50 public void processAfterEdit(MaintenanceDocument document,
51 Map<String, String[]> parameters) {
52 ShiftDifferentialRule shiftDifferentialRule = (ShiftDifferentialRule) document
53 .getNewMaintainableObject().getBusinessObject();
54 shiftDifferentialRule.setUserPrincipalId(GlobalVariables
55 .getUserSession().getPrincipalId());
56 super.processAfterEdit(document, parameters);
57 }
58
59
60 @Override
61 public HrBusinessObject getObjectById(String id) {
62 return TkServiceLocator.getShiftDifferentialRuleService().getShiftDifferentialRule(id);
63 }
64
65 }