001/**
002 * Copyright 2004-2014 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.kpme.tklm.api.leave.accrual;
017
018import org.joda.time.DateTime;
019import org.kuali.kpme.core.api.calendar.entry.CalendarEntry;
020
021import java.util.List;
022import java.util.Map;
023
024/**
025 * <p>RateRangeAggregateContract interface</p>
026 *
027 */
028public interface RateRangeAggregateContract {
029
030        /**
031         * The current RateRange of the RateRangeAggregate
032         * 
033         * <p>
034         * currentRate of a RateRangeAggregate
035         * <p>
036         * 
037         * @return rateRanges(0) if currentRate is null, else currentRate
038         */
039        public RateRangeContract getRate(DateTime date);
040        
041        /**
042         * The list of RateRange objects associated with the RateRangeAggregate
043         * 
044         * <p>
045         * rateRanges of a RateRangeAggregate
046         * <p>
047         * 
048         * @return rateRanges for RateRangeAggregate
049         */
050        public List<? extends RateRangeContract> getRateRanges();
051
052        /**
053         * The current RateRange of the RateRangeAggregate
054         * 
055         * <p>
056         * currentRate of a RateRangeAggregate
057         * <p>
058         * 
059         * @return currentRate for RateRangeAggregate
060         */
061        public RateRangeContract getCurrentRate();
062        
063        /**
064         * The rateRangeChanged flag of the RateRangeAggregate
065         * 
066         * <p>
067         * rateRangeChanged flag of a RateRangeAggregate
068         * <p>
069         * 
070         * @return Y if the rate range has changed, N if not
071         */
072        public boolean isRateRangeChanged();
073        
074        /**
075         * The RateRange of the RateRangeAggregate on a given date
076         * 
077         * <p>
078         * RateRange of a RateRangeAggregate
079         * <p>
080         * 
081         * @param DateTime object instance to retrieve RateRange for
082         * @return RateRange for RateRangeAggregate on a given date
083         */
084        public RateRangeContract getRateOnDate(DateTime date); 
085
086        /**
087         * The map of CalendarEntry objects associated with the RateRangeAggregate
088         * 
089         * <p>
090         * calEntryMap of a RateRange
091         * <p>
092         * 
093         * @return calEntryMap for RateRangeAggregate
094         */
095        public Map<String, List<CalendarEntry>> getCalEntryMap();
096
097}