01: /*
02: * Copyright 2005-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.module.chart.service;
17:
18: import java.util.List;
19:
20: import org.kuali.module.chart.bo.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,
34: String chartOfAccountsCode, String financialObjectCode);
35:
36: /**
37: * This method returns an financial object code for the current fiscal year.
38: *
39: * @param chartOfAccountsCode chart of accounts code for object code
40: * @param financialObjectCode financial object code
41: * @return the object code specified
42: */
43: public ObjectCode getByPrimaryIdForCurrentYear(
44: String chartOfAccountsCode, String financialObjectCode);
45:
46: /**
47: * @param chartOfAccountsCode - Chart of Accounts Code
48: * @param financialObjectCode - Financial Object Code
49: * @return a list containing integer years, given object code. The list may be empty, but will not be null.
50: */
51: public List getYearList(String chartOfAccountsCode,
52: String financialObjectCode);
53:
54: /**
55: * This method, written for use with DWR, returns a joined string representation of all of the names of the distinct object
56: * codes associated with each of the chart codes given. In the best of all possible worlds, this will only ever return *one*
57: * object code name, as object codes will be shared across charts.
58: *
59: * @param universityFiscalYear the fiscal year of the financial object code to check.
60: * @param chartOfAccountCodes array of Chart of Accounts codes to
61: * @param financialObjectCode financial object code to look up
62: * @return a String representation of the distinct names of the object codes
63: */
64: public String getObjectCodeNamesByCharts(
65: Integer universityFiscalYear, String[] chartOfAccountCodes,
66: String financialObjectCode);
67: }
|