001/*
002 * Copyright 2006 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.ole.gl.batch.service;
017
018import java.util.Map;
019
020import org.kuali.ole.gl.batch.BalanceForwardRuleHelper;
021
022
023/**
024 * An interface declaring the methods that steps running year end services would need to use to close out activity of an ending
025 * fiscal year (though, note: OrganizationReversion, the other year end job, is not defined here).
026 */
027public interface YearEndService {
028
029
030    /**
031     * The method responsible for creating origin entries that will forward qualifying encumbrances into the next fiscal year.
032     * 
033     * @param originEntryGroup the origin entry group where generated origin entries should be saved
034     * @param jobParameters the parameters necessary to run this job: the fiscal year to close and the university date the job was
035     *        run
036     * @param forwardEncumbrancesCounts the statistical counts generated by this job
037     */
038    public void forwardEncumbrances(String encumbranceForwardFileName, Map jobParameters, Map<String, Integer> counts);
039    
040    /**
041     * Implementations of this method are responsible for generating origin entries to forward the balances of qualifying balances
042     * from the previous fiscal year
043     * 
044     * @param balanceForwardsUnclosedPriorYearAccountGroup the origin entry group to save balance forwarding origin entries with
045     *        open accounts
046     * @param balanceForwardsClosedPriorYearAccountGroup the origin entry group to save balance forwarding origin entries with
047     *        closed accounts
048     * @param balanceForwardRuleHelper the BalanceForwardRuleHelper which holds the important state - the job parameters and
049     *        statistics - for the job to run
050     */
051    public void forwardBalances(String balanceForwardsUnclosedFileName, String balanceForwardsclosedFileName, BalanceForwardRuleHelper balanceForwardRuleHelper);
052    
053    /**
054     * This method is considered responsible for generating all of the origin entries that will close out nominal activity for a
055     * given fiscal year.
056     * 
057     * @param nominalClosingOriginEntryGroup the origin entry group that nominal activity closing origin entries
058     * @param nominalClosingJobParameters the parameters needed by the job to run correctly: the current university date and the
059     *        fiscal year to close
060     * @param nominalClosingCounts counts the Map of statistical counts generated by the process
061     */
062    public void closeNominalActivity(String nominalClosingFileName, Map nominalClosingJobParameters);
063    
064    /**
065     * Logs all of the missing prior year accounts that balances and encumbrances processed by year end jobs would attempt to call
066     * on
067     * 
068     * @param balanceFiscalYear the fiscal year to find balances encumbrances for
069     */
070    public void logAllMissingPriorYearAccounts(Integer fiscalYear);
071
072    /**
073     * Logs all of the missing sub fund groups that balances and encumbrances processed by the year end job would attempt to call on
074     * 
075     * @param balanceFiscalYear the fiscal year to find balances and encumbrances for
076     */
077    public void logAllMissingSubFundGroups(Integer fiscalYear);
078}