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