001 /**
002 * Copyright 2004-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.hr.lm.timeoff.service;
017
018 import java.math.BigDecimal;
019 import java.util.Date;
020 import java.util.List;
021
022 import org.kuali.hr.job.Job;
023 import org.kuali.hr.lm.timeoff.SystemScheduledTimeOff;
024 import org.kuali.hr.time.assignment.Assignment;
025 import org.kuali.hr.time.timesheet.TimesheetDocument;
026 import org.springframework.cache.annotation.Cacheable;
027
028 public interface SystemScheduledTimeOffService {
029
030 /**
031 * Fetch SystemScheduledTimeOff by id
032 * @param lmSystemScheduledTimeOffId
033 * @return
034 */
035 @Cacheable(value= SystemScheduledTimeOff.CACHE_NAME, key="'lmSystemScheduledTimeOffId=' + #p0")
036 public SystemScheduledTimeOff getSystemScheduledTimeOff(String lmSystemScheduledTimeOffId);
037
038 public List<SystemScheduledTimeOff> getSystemScheduledTimeOffForPayPeriod(
039 String leavePlan, Date startDate, Date endDate);
040
041 public SystemScheduledTimeOff getSystemScheduledTimeOffByDate(String leavePlan, Date startDate);
042
043 Assignment getAssignmentToApplyHolidays(
044 TimesheetDocument timesheetDocument, java.sql.Date payEndDate);
045
046 /**
047 * Calculate System Scheduled Time Off hours based on given hours and fte of job
048 * @param job
049 * @param sstoHours
050 * @return
051 */
052 public BigDecimal calculateSysSchTimeOffHours(Job job, BigDecimal sstoHours);
053
054 List<SystemScheduledTimeOff> getSystemScheduledTimeOffs(Date fromEffdt, Date toEffdt, String earnCode, Date fromAccruedDate, Date toAccruedDate,
055 Date fromSchTimeOffDate, Date toSchTimeOffDate, String active, String showHist);
056 /**
057 * Get the list of all active system scheduled time off for the given leave plan and dates
058 * @param fromEffdt
059 * @param toEffdt
060 * @param fromAccruedDate
061 * @param toAccruedDate
062 * @param leavePlan
063 * @return
064 */
065 public List<SystemScheduledTimeOff> getSystemScheduledTimeOffsForLeavePlan(Date fromAccruedDate,Date toAccruedDate, String leavePlan);
066 }