01: /*
02: * Copyright 2006 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.Iterator;
19: import java.util.Map;
20:
21: import org.kuali.module.gl.bo.Encumbrance;
22:
23: /**
24: * An interface declaring services dealing with encumbrances
25: */
26: public interface EncumbranceService {
27: /**
28: * Save an Encumbrance entry
29: *
30: * @param enc an encumbrance entry
31: */
32: public void save(Encumbrance enc);
33:
34: /**
35: * Purge an entire fiscal year for a single chart.
36: *
37: * @param chartOfAccountsCode the chart of encumbrances to purge
38: * @param year the year of encumbrances to purage
39: */
40: public void purgeYearByChart(String chartOfAccountsCode, int year);
41:
42: /**
43: * Fetch all encumbrance records from GL open encumbrance table. Based on test data, there's only
44: * about a third as many encumbrances as there are, say, balances, so unless your institution is huge,
45: * it's probably safe to call this method.
46: * @return an Iterator of encumbrances
47: */
48: public Iterator getAllEncumbrances();
49:
50: /**
51: * group all encumbrances with/without the given document type code by fiscal year, chart, account, sub-account, object code,
52: * sub object code, and balance type code, and summarize the encumbrance amount and the encumbrance close amount.
53: *
54: * @param documentTypeCode the given document type code
55: * @param included indicate if all encumbrances with the given document type are included in the results or not
56: */
57: public Iterator getSummarizedEncumbrances(String documentTypeCode,
58: boolean included);
59:
60: /**
61: * This method finds the open encumbrances according to input fields and values
62: *
63: * @param fieldValues the input fields and values
64: * @return a collection of open encumbrances
65: */
66: public Iterator findOpenEncumbrance(Map fieldValues);
67:
68: /**
69: * This method gets the number of the open encumbrances according to input fields and values
70: *
71: * @param fieldValues the input fields and values
72: * @return the number of the open encumbrances
73: */
74: public Integer getOpenEncumbranceRecordCount(Map fieldValues);
75: }
|