001 /*
002 * Copyright 2011 The Kuali Foundation.
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.kfs.coa.service;
017
018 import java.util.List;
019
020 import org.kuali.kfs.coa.businessobject.SubFundGroup;
021
022 /**
023 * This service interface defines methods necessary for retrieving fully populated SubFundGroup business objects from the
024 * database that are necessary for transaction processing in the application.
025 */
026 public interface SubFundGroupService {
027
028 /**
029 * Retrieves a SubFundGroupCode by it's primary key - the sub fund group code.
030 *
031 * @param subFundGroupCode
032 * @return the sub fund group specfied by its code
033 */
034 public SubFundGroup getByPrimaryId(String subFundGroupCode);
035
036 /**
037 * Retrieves the SubFundGroupCode for the Account with the given chart and account codes.
038 *
039 * @param chartCode
040 * @param accountNumber
041 * @return the sub fund group specified by a chart and and account number
042 */
043 public SubFundGroup getByChartAndAccount(String chartCode, String accountNumber);
044
045 /**
046 *
047 * This checks to see if a particular SubFundGroup is related to Contracts and Grants through its Account
048 * @param subFundGroup
049 * @return true if it is for contracts and grants
050 */
051 public boolean isForContractsAndGrants(SubFundGroup subFundGroup);
052
053 /**
054 *
055 * This retrieves the attribute label for Contracts and Grants
056 * @return string representation of Contracts and Grants label
057 */
058 public String getContractsAndGrantsDenotingAttributeLabel();
059
060 /**
061 * Extracts the appropriate value from the sub fund group for the C&G method selected.
062 *
063 * @param subFundGroup
064 * @return string representation of either Fund Group code or SubFund Group code
065 */
066 public String getContractsAndGrantsDenotingValue(SubFundGroup subFundGroup);
067
068 /**
069 *
070 * This check is the specified code is related to Contracts and Grants
071 * @return string representation of the Contracts and Grants value
072 */
073 public List<String> getContractsAndGrantsDenotingValues();
074
075 /**
076 * This retrieves the SubFundGroupCodes of Contracts and Grants
077 * @return string representation of Contracts and Grants value formatted for messages
078 * This method...
079 * @return
080 */
081 public String getContractsAndGrantsDenotingValueForMessage();
082 }