View Javadoc

1   /**
2    * Copyright 2004-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.hr.lm.leaveplan.service;
17  
18  import java.sql.Date;
19  import java.util.List;
20  
21  import org.joda.time.DateTime;
22  import org.kuali.hr.lm.leaveplan.LeavePlan;
23  import org.kuali.hr.time.calendar.CalendarEntries;
24  import org.springframework.cache.annotation.Cacheable;
25  
26  public interface LeavePlanService {
27      
28      /**
29       * Fetch LeavePlan by id
30       * @param lmLeavePlanId
31       * @return
32       */
33      @Cacheable(value= LeavePlan.CACHE_NAME, key="'lmLeavePlanId=' + #p0")
34      public LeavePlan getLeavePlan(String lmLeavePlanId);
35  
36      @Cacheable(value= LeavePlan.CACHE_NAME, key="'leavePlan=' + #p0 + '|' + 'asOfDate=' + #p1")
37      public LeavePlan getLeavePlan(String leavePlan, Date asOfDate);
38      
39      public boolean isValidLeavePlan(String leavePlan);
40      
41      public List<LeavePlan> getAllActiveLeavePlan(String leavePlan, Date asOfDate);
42      
43      public List<LeavePlan> getAllInActiveLeavePlan(String leavePlan, Date asOfDate);
44  
45      List<LeavePlan> getLeavePlans(String leavePlan, String calendarYearStart, String descr, String planningMonths,
46                                    Date fromEffdt, Date toEffdt, String active, String showHistory);
47      
48      boolean isFirstCalendarPeriodOfLeavePlan(CalendarEntries calendarEntry, String leavePlan, Date asOfDate);
49      
50      boolean isLastCalendarPeriodOfLeavePlan(CalendarEntries calendarEntry, String leavePlan, Date asOfDate);
51      
52      public List<LeavePlan> getLeavePlansNeedsCarryOverScheduled(int thresholdDays, Date asOfDate);
53  
54      public DateTime getFirstDayOfLeavePlan(String leavePlan, java.util.Date date);
55      public DateTime getRolloverDayOfLeavePlan(String leavePlan, java.util.Date asOfDate);
56  }