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.timeoff.service;
17  
18  import java.math.BigDecimal;
19  import java.util.Date;
20  import java.util.List;
21  
22  import org.kuali.hr.job.Job;
23  import org.kuali.hr.lm.timeoff.SystemScheduledTimeOff;
24  import org.kuali.hr.time.assignment.Assignment;
25  import org.kuali.hr.time.timesheet.TimesheetDocument;
26  import org.springframework.cache.annotation.Cacheable;
27  
28  public interface SystemScheduledTimeOffService {
29      
30      /**
31       * Fetch SystemScheduledTimeOff by id
32       * @param lmSystemScheduledTimeOffId
33       * @return
34       */
35      @Cacheable(value= SystemScheduledTimeOff.CACHE_NAME, key="'lmSystemScheduledTimeOffId=' + #p0")
36      public SystemScheduledTimeOff getSystemScheduledTimeOff(String lmSystemScheduledTimeOffId);
37      
38      public List<SystemScheduledTimeOff> getSystemScheduledTimeOffForPayPeriod(
39  			String leavePlan, Date startDate, Date endDate);
40  
41  	public SystemScheduledTimeOff getSystemScheduledTimeOffByDate(String leavePlan, Date startDate);
42  
43  	Assignment getAssignmentToApplyHolidays(
44  			TimesheetDocument timesheetDocument, java.sql.Date payEndDate);
45  
46  	/**
47  	 * Calculate System Scheduled Time Off hours based on given hours and fte of job
48  	 * @param job
49  	 * @param sstoHours
50  	 * @return
51  	 */
52      public BigDecimal calculateSysSchTimeOffHours(Job job, BigDecimal sstoHours);
53  
54      List<SystemScheduledTimeOff> getSystemScheduledTimeOffs(Date fromEffdt, Date toEffdt, String earnCode, Date fromAccruedDate, Date toAccruedDate, 
55      														Date fromSchTimeOffDate, Date toSchTimeOffDate, String active, String showHist);
56      /**
57       * Get the list of all active system scheduled time off for the given leave plan and dates
58       * @param fromEffdt
59       * @param toEffdt
60       * @param fromAccruedDate
61       * @param toAccruedDate
62       * @param leavePlan
63       * @return
64       */
65      public List<SystemScheduledTimeOff> getSystemScheduledTimeOffsForLeavePlan(Date fromAccruedDate,Date toAccruedDate, String leavePlan);
66  }