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.Iterator; 19 import java.util.Map; 20 21 import org.kuali.ole.gl.businessobject.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, boolean included); 58 59 /** 60 * This method finds the open encumbrances according to input fields and values 61 * 62 * @param fieldValues the input fields and values 63 * @param includeZeroEncumbrances should the query include encumbrances which have zeroed out? 64 * @return a collection of open encumbrances 65 */ 66 public Iterator findOpenEncumbrance(Map fieldValues, boolean includeZeroEncumbrances); 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 * @param includeZeroEncumbrances should the query include encumbrances which have zeroed out? 73 * @return the number of the open encumbrances 74 */ 75 public Integer getOpenEncumbranceRecordCount(Map fieldValues, boolean includeZeroEncumbrances); 76 }