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.leave.approval.service; 017 018 import java.math.BigDecimal; 019 import java.util.Date; 020 import java.util.List; 021 import java.util.Map; 022 023 import org.kuali.hr.lm.leaveblock.LeaveBlock; 024 import org.kuali.hr.lm.workflow.LeaveCalendarDocumentHeader; 025 import org.kuali.hr.time.approval.web.ApprovalLeaveSummaryRow; 026 import org.kuali.hr.time.calendar.CalendarEntries; 027 import org.kuali.rice.kew.api.note.Note; 028 029 public interface LeaveApprovalService { 030 public List<ApprovalLeaveSummaryRow> getLeaveApprovalSummaryRows(List<String> principalIds, CalendarEntries payCalendarEntries, List<Date> leaveSummaryDates); 031 032 public Map<Date, Map<String, BigDecimal>> getEarnCodeLeaveHours(List<LeaveBlock> leaveBlocks, List<Date> leaveSummaryDates); 033 034 public List<Map<String, Object>> getLeaveApprovalDetailSections(LeaveCalendarDocumentHeader lcdh); 035 036 public Map<Date, Map<String, BigDecimal>> getAccrualCategoryLeaveHours(List<LeaveBlock> leaveBlocks, List<Date> leaveSummaryDates); 037 038 /** 039 * Used to determine if there are notes on a document 040 * @param documentNumber 041 * @return list of note objects 042 */ 043 public List<Note> getNotesForDocument(String documentNumber); 044 045 public List<String> getUniqueLeavePayGroupsForPrincipalIds(List<String> principalIds); 046 047 /* 048 * returns all calendar entries with LeaveCalendarDocument created and can be approved by given principalId 049 */ 050 public List<CalendarEntries> getAllLeavePayCalendarEntriesForApprover(String principalId, Date currentDate); 051 052 /* 053 * remove the employees with no jobs that are eligible for leave from the given list of principal ids 054 * 055 * @param principalIds 056 * 057 */ 058 public void removeNonLeaveEmployees(List<String> principalIds); 059 060 /** 061 * Method to create a map that contains the principal's id and corresponding leave calendar document header. 062 * 063 *@param principalIds 064 * @param payBeginDate 065 * @param payEndDate 066 * @return A PrincipalId to LeaveCalendarDocumentHeader mapping. 067 */ 068 public Map<String, LeaveCalendarDocumentHeader> getPrincipalDocumentHeader(List<String> principalIds, Date payBeginDate, Date payEndDate); 069 070 /** 071 * 072 * @param principalId 073 * @param flsaStatus 074 * @param chkForLeaveEligible 075 * @return 076 */ 077 public boolean isActiveAssignmentFoundOnJobFlsaStatus(String principalId, String flsaStatus, boolean chkForLeaveEligible); 078 079 /** 080 * Method to get a lit of principal ids based on work area list, calendarGroup and dates 081 * @param workAreaList 082 * @param calendarGroup 083 * @param effdt 084 * @param beginDate 085 * @param endDate 086 * @return 087 */ 088 public List<String> getLeavePrincipalIdsWithSearchCriteria( 089 List<String> workAreaList, String calendarGroup, java.sql.Date effdt, java.sql.Date beginDate, java.sql.Date endDate); 090 }