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.accrual; 17 18 import java.util.List; 19 import java.util.Map; 20 21 import org.joda.time.DateTime; 22 import org.kuali.kpme.core.api.calendar.entry.CalendarEntryContract; 23 24 /** 25 * <p>RateRangeAggregateContract interface</p> 26 * 27 */ 28 public interface RateRangeAggregateContract { 29 30 /** 31 * The current RateRange of the RateRangeAggregate 32 * 33 * <p> 34 * currentRate of a RateRangeAggregate 35 * <p> 36 * 37 * @return rateRanges(0) if currentRate is null, else currentRate 38 */ 39 public RateRangeContract getRate(DateTime date); 40 41 /** 42 * The list of RateRange objects associated with the RateRangeAggregate 43 * 44 * <p> 45 * rateRanges of a RateRangeAggregate 46 * <p> 47 * 48 * @return rateRanges for RateRangeAggregate 49 */ 50 public List<? extends RateRangeContract> getRateRanges(); 51 52 /** 53 * The current RateRange of the RateRangeAggregate 54 * 55 * <p> 56 * currentRate of a RateRangeAggregate 57 * <p> 58 * 59 * @return currentRate for RateRangeAggregate 60 */ 61 public RateRangeContract getCurrentRate(); 62 63 /** 64 * The rateRangeChanged flag of the RateRangeAggregate 65 * 66 * <p> 67 * rateRangeChanged flag of a RateRangeAggregate 68 * <p> 69 * 70 * @return Y if the rate range has changed, N if not 71 */ 72 public boolean isRateRangeChanged(); 73 74 /** 75 * The RateRange of the RateRangeAggregate on a given date 76 * 77 * <p> 78 * RateRange of a RateRangeAggregate 79 * <p> 80 * 81 * @param DateTime object instance to retrieve RateRange for 82 * @return RateRange for RateRangeAggregate on a given date 83 */ 84 public RateRangeContract getRateOnDate(DateTime date); 85 86 /** 87 * The map of CalendarEntry objects associated with the RateRangeAggregate 88 * 89 * <p> 90 * calEntryMap of a RateRange 91 * <p> 92 * 93 * @return calEntryMap for RateRangeAggregate 94 */ 95 public Map<String, ? extends List<? extends CalendarEntryContract>> getCalEntryMap(); 96 97 }