01: /*
02: * Copyright 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.kfs.document;
17:
18: import java.util.List;
19:
20: import org.kuali.kfs.bo.GeneralLedgerPendingEntry;
21: import org.kuali.module.gl.util.SufficientFundsItem;
22:
23: /**
24: * Defines methods that must be implements for a general ledger posting document.
25: */
26: public interface GeneralLedgerPostingDocument extends
27: LedgerPostingDocument {
28: /**
29: * This method retrieves the list of GLPEs for the document.
30: *
31: * @return A list of pending entries.
32: */
33: List<GeneralLedgerPendingEntry> getGeneralLedgerPendingEntries();
34:
35: /**
36: * This method retrieves a particular pending entry instance, automatically instantiating any missing intervening instances.
37: * This behavior is coupled tightly with some underlying issues that the Struts PojoProcessor plugin has with how objects get
38: * instantiated within lists. This behavior is required because otherwise when the PojoProcessor tries to automatically inject
39: * values into the list, it will get an index out of bounds error if the instance at an index is being called and prior
40: * instances at indices before that one are not being instantiated.
41: *
42: * @param index
43: * @return The GLPE instance at the passed in index.
44: */
45: GeneralLedgerPendingEntry getGeneralLedgerPendingEntry(int index);
46:
47: /**
48: * This method sets the list of pending entries for this document.
49: *
50: * @param generalLedgerPendingEntries
51: */
52: void setGeneralLedgerPendingEntries(
53: List<GeneralLedgerPendingEntry> generalLedgerPendingEntries);
54:
55: /**
56: * Returns whether the system has enabled flexible bank offsets. The CashManagementDocument displays the GLPE tag conditionally
57: * based on this.
58: *
59: * @return whether the system has enabled flexible bank offsets
60: */
61: boolean isBankCashOffsetEnabled();
62:
63: /**
64: * This method will check sufficient funds for the document
65: *
66: * @return a list of sufficientfundsitems that do not have sufficient funds. It returns an empty list if there is sufficient
67: * funds for the entire document
68: */
69: public List<SufficientFundsItem> checkSufficientFunds();
70:
71: /**
72: * This method will return only PLEs that should be checked for SF. Normally this will be all PLEs, but some docs (such as BA)
73: * have additional requirements.
74: *
75: * @return a list of sufficientfundsitems that do not have sufficient funds. It returns an empty list if there is sufficient
76: * funds for the entire document
77: */
78: public List<GeneralLedgerPendingEntry> getPendingLedgerEntriesForSufficientFundsChecking();
79: }
|