1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.core.api.leaveplan;
17
18 import org.joda.time.DateTime;
19 import org.joda.time.LocalDate;
20 import org.kuali.kpme.core.api.calendar.entry.CalendarEntry;
21 import org.springframework.cache.annotation.Cacheable;
22
23 import java.util.List;
24
25 public interface LeavePlanService {
26
27
28
29
30
31
32 @Cacheable(value= LeavePlanContract.CACHE_NAME, key="'lmLeavePlanId=' + #p0")
33 public LeavePlan getLeavePlan(String lmLeavePlanId);
34
35 @Cacheable(value= LeavePlanContract.CACHE_NAME, key="'leavePlan=' + #p0 + '|' + 'asOfDate=' + #p1")
36 public LeavePlan getLeavePlan(String leavePlan, LocalDate asOfDate);
37
38 @Cacheable(value= LeavePlanContract.CACHE_NAME, key="'leavePlans=' + T(org.kuali.rice.core.api.cache.CacheKeyUtils).key(#p0) + '|' + 'asOfDate=' + #p1")
39 public List<LeavePlan> getLeavePlans(List<String> leavePlan, LocalDate asOfDate);
40
41 public boolean isValidLeavePlan(String leavePlan);
42
43 public List<LeavePlan> getAllActiveLeavePlan(String leavePlan, LocalDate asOfDate);
44
45 public List<LeavePlan> getAllInActiveLeavePlan(String leavePlan, LocalDate asOfDate);
46
47 List<LeavePlan> getLeavePlans(String leavePlan, String calendarYearStart, String descr, String planningMonths,
48 LocalDate fromEffdt, LocalDate toEffdt, String active, String showHistory);
49
50 boolean isFirstCalendarPeriodOfLeavePlan(CalendarEntry calendarEntry, String leavePlan, LocalDate asOfDate);
51
52 boolean isLastCalendarPeriodOfLeavePlan(CalendarEntry calendarEntry, String leavePlan, LocalDate asOfDate);
53
54 public List<LeavePlan> getLeavePlansNeedsCarryOverScheduled(int thresholdDays, LocalDate asOfDate);
55
56 @Cacheable(value= LeavePlanContract.CACHE_NAME, key="'{getFirstDayOfLeavePlan}' + 'leavePlan=' + #p0 + '|' + 'date=' + #p1")
57 public DateTime getFirstDayOfLeavePlan(String leavePlan, LocalDate date);
58
59 @Cacheable(value= LeavePlanContract.CACHE_NAME, key="'{getRolloverDayOfLeavePlan}' + 'leavePlan=' + #p0 + '|' + 'date=' + #p1")
60 public DateTime getRolloverDayOfLeavePlan(String leavePlan, LocalDate asOfDate);
61 }