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