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