001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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.service;
017:
018: import java.util.Collection;
019: import java.util.Iterator;
020: import java.util.List;
021: import java.util.Map;
022:
023: import org.kuali.core.util.KualiDecimal;
024: import org.kuali.kfs.bo.GeneralLedgerPendingEntry;
025: import org.kuali.kfs.document.GeneralLedgerPostingDocument;
026: import org.kuali.module.chart.bo.Account;
027: import org.kuali.module.gl.bo.Balance;
028: import org.kuali.module.gl.bo.Encumbrance;
029:
030: /**
031: * This interface defines methods that a GeneralLedgerPendingEntry Service must provide
032: */
033: public interface GeneralLedgerPendingEntryService {
034:
035: /**
036: * This method...
037: *
038: * @param universityFiscalYears
039: * @param chartOfAccountsCode
040: * @param accountNumber
041: * @param isDebit
042: * @return
043: */
044: public KualiDecimal getCashSummary(List universityFiscalYears,
045: String chartOfAccountsCode, String accountNumber,
046: boolean isDebit);
047:
048: /**
049: * This method...
050: *
051: * @param universityFiscalYears
052: * @param chartOfAccountsCode
053: * @param accountNumber
054: * @param isDebit
055: * @return
056: */
057: public KualiDecimal getActualSummary(List universityFiscalYears,
058: String chartOfAccountsCode, String accountNumber,
059: boolean isDebit);
060:
061: /**
062: * This method...
063: *
064: * @param universityFiscalYear
065: * @param chartOfAccountsCode
066: * @param accountNumber
067: * @param sufficientFundsObjectCode
068: * @param isDebit
069: * @param isYearEnd
070: * @return
071: */
072: public KualiDecimal getExpenseSummary(Integer universityFiscalYear,
073: String chartOfAccountsCode, String accountNumber,
074: String sufficientFundsObjectCode, boolean isDebit,
075: boolean isYearEnd);
076:
077: /**
078: * This method...
079: *
080: * @param universityFiscalYear
081: * @param chartOfAccountsCode
082: * @param accountNumber
083: * @param sufficientFundsObjectCode
084: * @param isDebit
085: * @param isYearEnd
086: * @return
087: */
088: public KualiDecimal getEncumbranceSummary(
089: Integer universityFiscalYear, String chartOfAccountsCode,
090: String accountNumber, String sufficientFundsObjectCode,
091: boolean isDebit, boolean isYearEnd);
092:
093: /**
094: * This method...
095: *
096: * @param universityFiscalYear
097: * @param chartOfAccountsCode
098: * @param accountNumber
099: * @param sufficientFundsObjectCode
100: * @param isYearEnd
101: * @return
102: */
103: public KualiDecimal getBudgetSummary(Integer universityFiscalYear,
104: String chartOfAccountsCode, String accountNumber,
105: String sufficientFundsObjectCode, boolean isYearEnd);
106:
107: /**
108: * @param transactionEntrySequenceId
109: * @param documentHeaderId
110: */
111: public GeneralLedgerPendingEntry getByPrimaryId(
112: Integer transactionEntrySequenceId, String documentHeaderId);
113:
114: /**
115: * Invokes generateGeneralLedgerPendingEntries method on the transactional document.
116: *
117: * @param document - document whose pending entries need generated
118: * @return whether the business rules succeeded
119: */
120: public boolean generateGeneralLedgerPendingEntries(
121: GeneralLedgerPostingDocument document);
122:
123: /**
124: * The fiscal year and period is null in quite a few glpe's. This will put in a sensible default.
125: *
126: * @param glpe
127: */
128: public void fillInFiscalPeriodYear(GeneralLedgerPendingEntry glpe);
129:
130: /**
131: * @param generalLedgerPendingEntry
132: */
133: public void save(GeneralLedgerPendingEntry generalLedgerPendingEntry);
134:
135: /**
136: * @param documentHeaderId
137: */
138: public void delete(String documentHeaderId);
139:
140: /**
141: * Delete all pending entries for a specific document approved code
142: *
143: * @param financialDocumentApprovedCode
144: */
145: public void deleteByFinancialDocumentApprovedCode(
146: String financialDocumentApprovedCode);
147:
148: /**
149: * Does the given account have any general ledger entries? It is necessary to check this before closing an account.
150: *
151: * @param account
152: * @return
153: */
154: public boolean hasPendingGeneralLedgerEntry(Account account);
155:
156: /**
157: * The method finds all pending ledger entries
158: *
159: * @return all pending ledger entries
160: */
161: public Iterator findApprovedPendingLedgerEntries();
162:
163: /**
164: * This method retrieves all pending ledger entries for the given encumbrance
165: *
166: * @param encumbrance the encumbrance entry
167: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
168: * @return all pending ledger entries of the given encumbrance
169: */
170: public Iterator findPendingLedgerEntries(Encumbrance encumbrance,
171: boolean isApproved);
172:
173: /**
174: * This method retrieves all pending ledger entries for the given encumbrance
175: *
176: * @param balance the balance entry
177: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
178: * @param isConsolidated determine whether the search results are consolidated
179: * @return all pending ledger entries of the given encumbrance
180: */
181: public Iterator findPendingLedgerEntries(Balance balance,
182: boolean isApproved, boolean isConsolidated);
183:
184: /**
185: * This method retrieves all pending ledger entries matching the given entry criteria
186: *
187: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
188: * @param fieldValues the input fields and values
189: * @return all pending ledger entries matching the given balance criteria
190: */
191: public Iterator findPendingLedgerEntriesForEntry(Map fieldValues,
192: boolean isApproved);
193:
194: /**
195: * This method retrieves all pending ledger entries matching the given balance criteria
196: *
197: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
198: * @param fieldValues the input fields and values
199: * @return all pending ledger entries matching the given balance criteria
200: */
201: public Iterator findPendingLedgerEntriesForBalance(Map fieldValues,
202: boolean isApproved);
203:
204: /**
205: * This method retrieves all pending ledger entries that may belong to cash balance in the future
206: *
207: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
208: * @return all pending ledger entries that may belong to cash balance
209: */
210: public Iterator findPendingLedgerEntriesForCashBalance(
211: Map fieldValues, boolean isApproved);
212:
213: /**
214: * This method retrieves all pending ledger entries that may belong to encumbrance table in the future
215: *
216: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
217: * @return all pending ledger entries that may belong to encumbrance table
218: */
219: public Iterator findPendingLedgerEntriesForEncumbrance(
220: Map fieldValues, boolean isApproved);
221:
222: /**
223: * This method retrieves all pending ledger entries that may belong to the given account balance record in the future
224: *
225: * @param fieldValues
226: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
227: * @return all pending ledger entries that may belong to encumbrance table
228: */
229: public Iterator findPendingLedgerEntrySummaryForAccountBalance(
230: Map fieldValues, boolean isApproved);
231:
232: /**
233: * This method retrieves all pending ledger entries that may belong to the given account balance record in the future
234: *
235: * @param fieldValues
236: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
237: * @return all pending ledger entries that may belong to encumbrance table
238: */
239: public Iterator findPendingLedgerEntriesForAccountBalance(
240: Map fieldValues, boolean isApproved);
241:
242: /**
243: * @param fieldValues
244: * @return
245: */
246: public Collection findPendingEntries(Map fieldValues,
247: boolean isApproved);
248: }
|