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.bc.document.service;
017    
018    import java.io.IOException;
019    
020    /**
021     * distribute the request amount for a set of budget construction general ledger rows evenly among twelve monthly periods in a
022     * budget construction monthly budget row with the same key. if the amount to be spread is not divisible by 12, the adjustment will
023     * be added or subtracted from the amount in the first monthly period.
024     */
025    
026    public interface BudgetConstructionMonthlyBudgetsCreateDeleteService {
027    
028        /**
029         * remove the existing revenue monthly budgets for this key
030         * 
031         * @param documentNumber the budget construction document number
032         * @param fiscalYear the fiscal year for which the budget is being built. this and the fields below are the key to a budget
033         *        construction document
034         * @param chartCode
035         * @param accountNumber
036         * @param subAccountNumber
037         * @return FAILED if the SQL could not be built, BENEFITS if benefits need to be recalculated, NO_BENEFITS otherwise
038         */
039        public void deleteBudgetConstructionMonthlyBudgetsRevenue(String documentNumber, Integer fiscalYear, String chartCode, String accountNumber, String subAccountNumber) throws IOException, NoSuchFieldException;
040    
041        /**
042         * remove the existing expenditure monthly budgets for this key
043         * 
044         * @param documentNumber the budget construction document number
045         * @param fiscalYear the fiscal year for which the budget is being built. this and the fields below are the key to a budget
046         *        construction document
047         * @param chartCode
048         * @param accountNumber
049         * @param subAccountNumber
050         * @return FAILED if the SQL could not be built, BENEFITS if benefits need to be recalculated, NO_BENEFITS otherwise
051         */
052        public void deleteBudgetConstructionMonthlyBudgetsExpenditure(String documentNumber, Integer fiscalYear, String chartCode, String accountNumber, String subAccountNumber) throws IOException, NoSuchFieldException;
053    
054        /**
055         * spread the revenue for this key evenly over 12 months, with any remainder mod 12 added to the first month
056         * 
057         * @param documentNumber the budget construction document number
058         * @param fiscalYear the fiscal year for which the budget is being built. this and the fields below are the key to a budget
059         *        construction document
060         * @param chartCode
061         * @param accountNumber
062         * @param subAccountNumber
063         * @return FAILED if the SQL could not be built, BENEFITS if benefits need to be recalculated, NO_BENEFITS otherwise
064         */
065        public void spreadBudgetConstructionMonthlyBudgetsRevenue(String documentNumber, Integer fiscalYear, String chartCode, String accountNumber, String subAccountNumber) throws IOException, NoSuchFieldException;
066    
067        /**
068         * spread the expenditures for this key evenly over 12 months, with any reaminder mod 12 added to the first month
069         * 
070         * @param documentNumber the budget construction document number
071         * @param fiscalYear the fiscal year for which the budget is being built. this and the fields below are the key to a budget
072         *        construction document
073         * @param chartCode
074         * @param accountNumber
075         * @param subAccountNumber
076         * @return FAILED if the SQL could not be built, BENEFITS if benefits need to be recalculated, NO_BENEFITS otherwise
077         */
078        public boolean spreadBudgetConstructionMonthlyBudgetsExpenditure(String documentNumber, Integer fiscalYear, String chartCode, String accountNumber, String subAccountNumber) throws IOException, NoSuchFieldException;
079    
080    }