1 /* 2 * Copyright 2006 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.kuali.ole.gl.service; 17 18 import java.util.List; 19 20 import org.kuali.ole.coa.businessobject.ObjectCode; 21 import org.kuali.ole.gl.businessobject.Transaction; 22 import org.kuali.ole.sys.businessobject.SufficientFundsItem; 23 import org.kuali.ole.sys.document.GeneralLedgerPostingDocument; 24 25 26 /** 27 * Service used for manipulating disbursement voucher cover sheets. 28 */ 29 public interface SufficientFundsService { 30 31 /** 32 * Checks for sufficient funds on a single document 33 * 34 * @param document document to check 35 * @return Empty List if has sufficient funds for all accounts, List of SufficientFundsItem if not 36 */ 37 public List<SufficientFundsItem> checkSufficientFunds(GeneralLedgerPostingDocument document); 38 39 /** 40 * Checks for sufficient funds on a list of transactions 41 * 42 * @param transactions list of transactions 43 * @return Empty List if has sufficient funds for all accounts, List of SufficientFundsItem if not 44 */ 45 public List<SufficientFundsItem> checkSufficientFunds(List<? extends Transaction> transactions); 46 47 public List<SufficientFundsItem> checkSufficientFundsForPREQ(List<? extends Transaction> transactions); 48 49 public List<SufficientFundsItem> checkSufficientFundsForInvoice(List<? extends Transaction> transactions); 50 51 /** 52 * This operation derives the acct_sf_finobj_cd which is used to populate the General Ledger Pending entry table, so that later 53 * we can do Suff Fund checking against that entry 54 * 55 * @param financialObject the object code being checked against 56 * @param accountSufficientFundsCode the kind of sufficient funds checking turned on in this system 57 * @return the object code that should be used for the sufficient funds inquiry, or a blank String 58 */ 59 public String getSufficientFundsObjectCode(ObjectCode financialObject, String accountSufficientFundsCode); 60 61 /** 62 * Purge the sufficient funds balance table by year/chart 63 * 64 * @param chart chart of sufficient fund balances to purge 65 * @param year fiscal year of sufficent fund balances to purge 66 */ 67 public void purgeYearByChart(String chart, int year); 68 } 69