001    /*
002     * Copyright 2011 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     */
016    package org.kuali.kfs.module.endow.batch.service;
017    
018    import java.util.Collection;
019    
020    import org.kuali.kfs.module.endow.businessobject.FeeMethod;
021    import org.kuali.kfs.module.endow.businessobject.KemidFee;
022    
023    public interface KemidFeeService {
024    
025        /**
026         * updates Waiver Fee Year-To-Date totals.
027         * @return true if the amounts updated else return false
028         */
029        public boolean updateWaiverFeeYearToDateTotals();
030        
031        /**
032         * Gets all the KemidFee records as a collection
033         * @return collection <KemidFee> records
034         */
035        public Collection<KemidFee> getAllKemIdFee() ;
036    
037        /**
038         * Saves the kemidFee record to the table END_KEMID_FEE_T
039         * @param kemidFee
040         * @return true if saved else false...
041         */
042        public boolean saveKemidFee(KemidFee kemidFee);
043        
044        /**
045         * Retrieves all KemidFee records for the given feeMethodCode.
046         */
047        public Collection<KemidFee> getAllKemidForFeeMethodCode(String feeMethodCode);
048    
049        /**
050         * Determines if the fee to be charged or not to the kemid based on the contions:
051         * FEE_IMPL_DT is equal to or less than the current date and
052         * FEE_TERM_DT is null or greater than the current date.
053         *IF there is a value greater than zero in END_KEMID_FEE_T: FEE_CORPUS_PCT_TLRNC and a record exists for the KEMID in END_KEMID_CORPUS_VAL_T and CURR_CORPUSPRIN_MVAL divided by CURR_CORPUS_VAL is less than END_KEMID_FEE_T: FEE_CORPUS_PCT_TLRNC, then skip the KEMID as no fee will be charged.
054         *@param feeMethod feeMethod record, kemidFee kemidFee record
055         *@return true if fee to be charged to the kemid else return false
056         */
057        public boolean chargeFeeToKemid(FeeMethod feeMethod, KemidFee kemidFee);
058    }