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.hr.lm.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.kuali.hr.lm.leaveblock.LeaveBlock;
24  import org.kuali.hr.lm.workflow.LeaveCalendarDocumentHeader;
25  import org.kuali.hr.time.approval.web.ApprovalLeaveSummaryRow;
26  import org.kuali.hr.time.calendar.CalendarEntries;
27  import org.kuali.hr.time.person.TKPerson;
28  import org.kuali.rice.kew.api.note.Note;
29  
30  public interface LeaveApprovalService {
31  	public List<ApprovalLeaveSummaryRow> getLeaveApprovalSummaryRows(List<TKPerson> persons, CalendarEntries payCalendarEntries, List<Date> leaveSummaryDates);
32  	
33  	public Map<Date, Map<String, BigDecimal>> getEarnCodeLeaveHours(List<LeaveBlock> leaveBlocks, List<Date> leaveSummaryDates);
34  	
35  	public List<Map<String, Object>> getLeaveApprovalDetailSections(LeaveCalendarDocumentHeader lcdh);
36  	
37  	public Map<Date, Map<String, BigDecimal>> getAccrualCategoryLeaveHours(List<LeaveBlock> leaveBlocks, List<Date> 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      public List<String> getUniqueLeavePayGroupsForPrincipalIds(List<String> principalIds);
47  	
48      /*
49       * returns all calendar entries with LeaveCalendarDocument created and can be approved by given principalId
50       */
51      public List<CalendarEntries> getAllLeavePayCalendarEntriesForApprover(String principalId, Date currentDate);
52  
53      /*
54       * remove the employees with no jobs that are eligible for leave fromt the given list of principal ids
55       * 
56       * @param principalIds
57       * 
58       */
59     public void removeNonLeaveEmployees(List<String> principalIds);
60  
61     /**
62      * Method to create a map that contains the principal's id and corresponding leave calendar document header.
63      *
64      *@param persons
65      * @param payBeginDate
66      * @param payEndDate
67      * @return A PrincipalId to LeaveCalendarDocumentHeader mapping.
68      */
69     public Map<String, LeaveCalendarDocumentHeader> getPrincipalDocumehtHeader(List<TKPerson> persons, Date payBeginDate, Date payEndDate);
70     
71     /**
72      * 
73      * @param principalId
74      * @param flsaStatus
75      * @param chkForLeaveEligible
76      * @return
77      */
78     public boolean isActiveAssignmentFoundOnJobFlsaStatus(String principalId, String flsaStatus, boolean chkForLeaveEligible);
79   
80     /**
81      * Method to get a lit of principal ids based on work area list, calendarGroup and dates
82      * @param workAreaList
83      * @param calendarGroup
84      * @param effdt
85      * @param beginDate
86      * @param endDate
87      * @return
88      */		   
89     public List<String> getLeavePrincipalIdsWithSearchCriteria(
90  			List<String> workAreaList, String calendarGroup, java.sql.Date effdt, java.sql.Date beginDate, java.sql.Date endDate);
91  }