View Javadoc
1   /**
2    * Copyright 2004-2014 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.kpme.tklm.api.leave.approval;
17  
18  import org.joda.time.DateTime;
19  import org.joda.time.LocalDate;
20  import org.joda.time.LocalDateTime;
21  import org.kuali.kpme.core.api.calendar.entry.CalendarEntry;
22  import org.kuali.kpme.tklm.api.leave.block.LeaveBlock;
23  import org.kuali.kpme.tklm.api.leave.workflow.LeaveCalendarDocumentHeaderContract;
24  import org.kuali.rice.kew.api.note.Note;
25  
26  import java.math.BigDecimal;
27  import java.util.List;
28  import java.util.Map;
29  
30  public interface LeaveApprovalService {
31  	public List<ApprovalLeaveSummaryRowContract> getLeaveApprovalSummaryRows(List<String> principalIds, CalendarEntry payCalendarEntry, List<LocalDateTime> leaveSummaryDates, String docIdSearchTerm);
32  	
33  	public Map<LocalDateTime, Map<String, BigDecimal>> getEarnCodeLeaveHours(List<LeaveBlock> leaveBlocks, List<LocalDateTime> leaveSummaryDates);
34  	
35  	public List<Map<String, Object>> getLeaveApprovalDetailSections(LeaveCalendarDocumentHeaderContract lcdh);
36  	
37  	public Map<LocalDateTime, Map<String, BigDecimal>> getAccrualCategoryLeaveHours(List<LeaveBlock> leaveBlocks, List<LocalDateTime> leaveSummaryDates);
38  
39      /**
40       * Used to determine if there are notes on a document
41       * @param documentNumber
42       * @return list of note objects
43       */
44      public List<Note> getNotesForDocument(String documentNumber);
45  
46      /*
47       * remove the employees with no jobs that are eligible for leave from the given list of principal ids
48       * 
49       * @param principalIds
50       * 
51       */
52     public void removeNonLeaveEmployees(List<String> principalIds);
53  
54     /**
55      * Method to create a map that contains the principal's id and corresponding leave calendar document header.
56      *
57      *@param principalIds
58      * @param payBeginDate
59      * @param payEndDate
60      * @return A PrincipalId to LeaveCalendarDocumentHeader mapping.
61      */
62     public Map<String, LeaveCalendarDocumentHeaderContract> getPrincipalDocumentHeader(List<String> principalIds, DateTime payBeginDate, DateTime payEndDate);
63     
64     /**
65      * 
66      * @param principalId
67      * @param flsaStatus
68      * @param chkForLeaveEligible
69      * @return
70      */
71     public boolean isActiveAssignmentFoundOnJobFlsaStatus(String principalId, String flsaStatus, boolean chkForLeaveEligible);
72   
73     /**
74      * Method to get a lit of principal ids based on work area list, calendarGroup and dates
75      * @param workAreaList
76      * @param calendarGroup
77      * @param effdt
78      * @param beginDate
79      * @param endDate
80      * @return
81      */		   
82     public List<String> getLeavePrincipalIdsWithSearchCriteria(
83             List<String> workAreaList, String calendarGroup, LocalDate effdt, LocalDate beginDate, LocalDate endDate);
84  }