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