1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.tklm.leave.accrual.service;
17
18 import java.math.BigDecimal;
19 import java.util.List;
20 import java.util.Map;
21
22 import org.joda.time.DateTime;
23 import org.joda.time.LocalDate;
24 import org.kuali.kpme.core.accrualcategory.AccrualCategory;
25 import org.kuali.kpme.core.calendar.entry.CalendarEntry;
26 import org.kuali.kpme.tklm.leave.accrual.RateRangeAggregate;
27
28 public interface AccrualService {
29 public void runAccrual(String principalId);
30
31
32
33
34
35 public void runAccrual(String principalId, DateTime startDate, DateTime endDate, boolean recordRanData);
36 public void runAccrual(String principalId, DateTime startDate, DateTime endDate, boolean recordRanData, String runAsPrincipalId);
37 public void runAccrual(List<String> principalIds);
38
39
40
41
42
43
44
45
46 public boolean isDateAtEarnInterval(LocalDate aDate, String earnInterval);
47
48
49
50
51
52
53
54
55 public RateRangeAggregate buildRateRangeAggregate(String principalId, DateTime startDate, DateTime endDate);
56
57
58
59
60
61
62
63
64 public boolean isEmpoyeementFutureStatusChanged(String principalId, DateTime startDate, DateTime endDate);
65
66
67
68
69
70
71
72
73 public void calculateFutureAccrualUsingPlanningMonth(String principalId, LocalDate asOfDate, String string);
74
75
76
77
78
79
80
81 public DateTime getPreviousAccrualIntervalDate(String earnInterval, DateTime aDate);
82
83
84
85
86
87
88
89 public DateTime getNextAccrualIntervalDate(String earnInterval, DateTime aDate);
90
91
92
93
94
95
96
97 public int getWorkDaysInAccrualInterval(String earnInterval, DateTime aDate);
98
99 public boolean statusChangedSinceLastRun(String principalId);
100
101
102
103
104
105
106
107
108
109 public BigDecimal getAccruedBalanceForPrincipal(String principalId, AccrualCategory accrualCategory, LocalDate asOfDate);
110
111 public BigDecimal getApprovedBalanceForPrincipal(String principalId, AccrualCategory accrualCategory, LocalDate asOfDate);
112
113 DateTime getNextIntervalDate(DateTime aDate, String earnInterval, String payCalName, Map<String, List<CalendarEntry>> aMap);
114 }