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.time.earncodegroup.service; 17 18 import org.kuali.hr.time.earncodegroup.EarnCodeGroup; 19 import org.kuali.hr.time.timeblock.TimeBlock; 20 import org.kuali.hr.time.timesheet.TimesheetDocument; 21 22 import java.sql.Date; 23 import java.util.List; 24 import java.util.Set; 25 26 public interface EarnCodeGroupService { 27 /** 28 * Fetch earn group for a particular date 29 * @param earnCodeGroup 30 * @param asOfDate 31 * @return 32 */ 33 public EarnCodeGroup getEarnCodeGroup(String earnCodeGroup, Date asOfDate); 34 /** 35 * Fetch earn group for an earn code as of a particular date 36 * @param earnCode 37 * @param asOfDate 38 * @return 39 */ 40 public EarnCodeGroup getEarnCodeGroupForEarnCode(String earnCode, Date asOfDate); 41 /** 42 * Fetch Set of earn codes for earn group 43 * @param earnGroup 44 * @param asOfDate 45 * @return 46 */ 47 public Set<String> getEarnCodeListForEarnCodeGroup(String earnCodeGroup, Date asOfDate); 48 /** 49 * Used to get earn group that this earn code belongs on in context to the summary 50 * CAUTION this is used only for the timesheet summary 51 */ 52 public EarnCodeGroup getEarnCodeGroupSummaryForEarnCode(String earnCode, Date asOfDate); 53 54 public EarnCodeGroup getEarnCodeGroup(String hrEarnCodeGroupId); 55 56 /** 57 * Returns list of warning text from earn group that is used by time blocks of the timesheetDocument 58 * @param timesheetDocument 59 * @return 60 */ 61 public List<String> warningTextFromEarnCodeGroupsOfDocument(TimesheetDocument timesheetDocument); 62 63 /** 64 * Returns list of warning text from earn group that is used by time blocks of the timesheetDocument 65 * @param timeBlockList 66 * @return 67 */ 68 public List<String> warningTextFromEarnCodeGroupsOfTimeblocks(List<TimeBlock> timeBlockList); 69 /** 70 * get the count of earn groups by given earnGroup 71 * @param earnGroup 72 * @return int 73 */ 74 public int getEarnCodeGroupCount(String earnGroup); 75 /** 76 * get the count of newer version of earn groups by given earnGroup and date 77 * @param earnGroup 78 * @param effdt 79 * @return int 80 */ 81 public int getNewerEarnCodeGroupCount(String earnGroup, Date effdt); 82 }