1 /* 2 * Copyright 2005 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.coa.service; 17 18 import java.util.List; 19 20 import org.kuali.ole.coa.businessobject.ObjectCode; 21 22 /** 23 * This interface defines methods that an ObjectCode Service must provide. 24 */ 25 public interface ObjectCodeService { 26 27 /** 28 * @param universityFiscalYear - University Fiscal Year 29 * @param chartOfAccountsCode - Chart of Accounts Code 30 * @param financialObjectCode - Financial Object Code 31 * @return ObjectCode Retrieves an ObjectCode object based on primary key. 32 */ 33 public ObjectCode getByPrimaryId(Integer universityFiscalYear, String chartOfAccountsCode, String financialObjectCode); 34 35 /** 36 * @param universityFiscalYear - University Fiscal Year 37 * @param chartOfAccountsCode - Chart of Accounts Code 38 * @param financialObjectCode - Financial Object Code 39 * @return ObjectCode Retrieves an ObjectCode object based on primary key. 40 */ 41 public ObjectCode getByPrimaryIdWithCaching(Integer universityFiscalYear, String chartOfAccountsCode, String financialObjectCode); 42 43 /** 44 * This method returns an financial object code for the current fiscal year. 45 * 46 * @param chartOfAccountsCode chart of accounts code for object code 47 * @param financialObjectCode financial object code 48 * @return the object code specified 49 */ 50 public ObjectCode getByPrimaryIdForCurrentYear(String chartOfAccountsCode, String financialObjectCode); 51 52 /** 53 * @param chartOfAccountsCode - Chart of Accounts Code 54 * @param financialObjectCode - Financial Object Code 55 * @return a list containing integer years, given object code. The list may be empty, but will not be null. 56 */ 57 public List getYearList(String chartOfAccountsCode, String financialObjectCode); 58 59 /** 60 * This method, written for use with DWR, returns a joined string representation of all of the names of the distinct object 61 * codes associated with each of the chart codes given. In the best of all possible worlds, this will only ever return *one* 62 * object code name, as object codes will be shared across charts. 63 * 64 * @param universityFiscalYear the fiscal year of the financial object code to check. 65 * @param chartOfAccountCodes array of Chart of Accounts codes to 66 * @param financialObjectCode financial object code to look up 67 * @return a String representation of the distinct names of the object codes 68 */ 69 public String getObjectCodeNamesByCharts(Integer universityFiscalYear, String[] chartOfAccountCodes, String financialObjectCode); 70 }