01: /*
02: * Copyright 2006-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.module.gl.service;
17:
18: import java.util.List;
19:
20: import org.kuali.kfs.document.GeneralLedgerPostingDocument;
21: import org.kuali.module.chart.bo.ObjectCode;
22: import org.kuali.module.gl.bo.Transaction;
23: import org.kuali.module.gl.util.SufficientFundsItem;
24:
25: /**
26: * Service used for manipulating disbursement voucher cover sheets.
27: */
28: public interface SufficientFundsService {
29:
30: /**
31: * Checks for sufficient funds on a single document
32: *
33: * @param document document to check
34: * @return Empty List if has sufficient funds for all accounts, List of SufficientFundsItem if not
35: */
36: public List<SufficientFundsItem> checkSufficientFunds(
37: 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(
46: List<? extends Transaction> transactions);
47:
48: /**
49: * This operation derives the acct_sf_finobj_cd which is used to populate the General Ledger Pending entry table, so that later
50: * we can do Suff Fund checking against that entry
51: *
52: * @param financialObject the object code being checked against
53: * @param accountSufficientFundsCode the kind of sufficient funds checking turned on in this system
54: * @return the object code that should be used for the sufficient funds inquiry, or a blank String
55: */
56: public String getSufficientFundsObjectCode(
57: ObjectCode financialObject,
58: String accountSufficientFundsCode);
59:
60: /**
61: * Purge the sufficient funds balance table by year/chart
62: *
63: * @param chart chart of sufficient fund balances to purge
64: * @param year fiscal year of sufficent fund balances to purge
65: */
66: public void purgeYearByChart(String chart, int year);
67: }
|