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.coa.service;
17
18 import java.util.Collection;
19
20 import org.kuali.ole.coa.businessobject.SubFundGroup;
21
22 /**
23 * This service interface defines methods necessary for retrieving fully populated SubFundGroup business objects from the
24 * database that are necessary for transaction processing in the application.
25 */
26 public interface SubFundGroupService {
27
28 /**
29 * Retrieves a SubFundGroupCode by it's primary key - the sub fund group code.
30 *
31 * @param subFundGroupCode
32 * @return the sub fund group specfied by its code
33 */
34 public SubFundGroup getByPrimaryId(String subFundGroupCode);
35
36 /**
37 * Retrieves the SubFundGroupCode for the Account with the given chart and account codes.
38 *
39 * @param chartCode
40 * @param accountNumber
41 * @return the sub fund group specified by a chart and and account number
42 */
43 public SubFundGroup getByChartAndAccount(String chartCode, String accountNumber);
44
45 /**
46 *
47 * This checks to see if a particular SubFundGroup is related to Contracts and Grants through its Account
48 * @param subFundGroup
49 * @return true if it is for contracts and grants
50 */
51 public boolean isForContractsAndGrants(SubFundGroup subFundGroup);
52
53 /**
54 *
55 * This retrieves the attribute label for Contracts and Grants
56 * @return string representation of Contracts and Grants label
57 */
58 public String getContractsAndGrantsDenotingAttributeLabel();
59
60 /**
61 * Extracts the appropriate value from the sub fund group for the C&G method selected.
62 *
63 * @param subFundGroup
64 * @return string representation of either Fund Group code or SubFund Group code
65 */
66 public String getContractsAndGrantsDenotingValue(SubFundGroup subFundGroup);
67
68 /**
69 *
70 * This check is the specified code is related to Contracts and Grants
71 * @return string representation of the Contracts and Grants value
72 */
73 public Collection<String> getContractsAndGrantsDenotingValues();
74
75 /**
76 * This retrieves the SubFundGroupCodes of Contracts and Grants
77 * @return string representation of Contracts and Grants value formatted for messages
78 * This method...
79 * @return
80 */
81 public String getContractsAndGrantsDenotingValueForMessage();
82 }