1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.tklm.api.leave.accrual;
17
18 import org.joda.time.DateTime;
19 import org.joda.time.LocalDate;
20 import org.kuali.kpme.core.api.accrualcategory.AccrualCategoryContract;
21 import org.kuali.kpme.core.api.calendar.entry.CalendarEntry;
22 import org.kuali.kpme.core.api.leaveplan.LeavePlanContract;
23
24 import java.math.BigDecimal;
25 import java.util.List;
26 import java.util.Map;
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 public void runAccrualForLeavePlan(LeavePlanContract aLeavePlan, DateTime startDate, DateTime endDate, boolean recordRanData);
44
45
46
47
48
49
50
51
52 public boolean isDateAtEarnInterval(LocalDate aDate, String earnInterval);
53
54
55
56
57
58
59
60
61 public RateRangeAggregateContract buildRateRangeAggregate(String principalId, DateTime startDate, DateTime endDate);
62
63
64
65
66
67
68
69
70 public boolean isEmpoyeementFutureStatusChanged(String principalId, DateTime startDate, DateTime endDate);
71
72
73
74
75
76
77
78
79 public void calculateFutureAccrualUsingPlanningMonth(String principalId, LocalDate asOfDate, String string);
80
81
82
83
84
85
86
87 public DateTime getPreviousAccrualIntervalDate(String earnInterval, DateTime aDate);
88
89
90
91
92
93
94
95 public DateTime getNextAccrualIntervalDate(String earnInterval, DateTime aDate);
96
97
98
99
100
101
102
103 public int getWorkDaysInAccrualInterval(String earnInterval, DateTime aDate);
104
105 public boolean statusChangedSinceLastRun(String principalId);
106
107
108
109
110
111
112
113
114
115 public BigDecimal getAccruedBalanceForPrincipal(String principalId, AccrualCategoryContract accrualCategory, LocalDate asOfDate);
116
117 public BigDecimal getApprovedBalanceForPrincipal(String principalId, AccrualCategoryContract accrualCategory, LocalDate asOfDate);
118
119 DateTime getNextIntervalDate(DateTime aDate, String earnInterval, String payCalName, Map<String, List<CalendarEntry>> aMap);
120 }