1 /* 2 * The Kuali Financial System, a comprehensive financial management system for higher education. 3 * 4 * Copyright 2005-2014 The Kuali Foundation 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU Affero General Public License as 8 * published by the Free Software Foundation, either version 3 of the 9 * License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU Affero General Public License for more details. 15 * 16 * You should have received a copy of the GNU Affero General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 package org.kuali.kfs.integration.cg; 20 21 import java.util.Collection; 22 import java.util.List; 23 24 import org.kuali.kfs.coa.businessobject.Account; 25 import org.kuali.rice.kim.api.identity.Person; 26 27 public interface ContractsAndGrantsModuleService { 28 29 /** 30 * This method returns the Project Director for an account given a chart code and account number. 31 * 32 * @param chartOfAccountsCode chart code used to determine the Project Director 33 * @param accountNumber account number used to determine the Project Director 34 * @return project director for the account 35 */ 36 public Person getProjectDirectorForAccount(String chartOfAccountsCode, String accountNumber); 37 38 /** 39 * This method returns the Project Director for an account. 40 * 41 * @param account account used to determine the Project Director 42 * @return project director for the account 43 */ 44 public Person getProjectDirectorForAccount(Account account); 45 46 /** 47 * determine if the given account is awarded by a federal agency 48 * 49 * @param chartOfAccountsCode the given account's chart of accounts code 50 * @param accountNumber the given account's account number 51 * @param federalAgencyTypeCodes the given federal agency type code 52 * @return true if the given account is funded by a federal agency or associated with federal pass through indicator; otherwise, 53 * false 54 */ 55 public boolean isAwardedByFederalAgency(String chartOfAccountsCode, String accountNumber, Collection<String> federalAgencyTypeCodes); 56 57 /** 58 * get all possible account responsibility ids on contracts & grants Accounts 59 * 60 * @return all possible account responsibility ids on contracts & grants Accounts 61 */ 62 public List<Integer> getAllAccountReponsiblityIds(); 63 64 /** 65 * determine whether the given account has a valid responsibility id if its responsibility id is not null 66 * 67 * @param account the given account 68 * @return true if the given account is a contracts & grants account with a valid responsibility id; otherwise, return false 69 */ 70 public boolean hasValidAccountReponsiblityIdIfNotNull(Account account); 71 72 /** 73 * This method returns the parent units corresponding to a particular unit. Currently only used for KC integration. 74 * 75 * @param unitNumber used to find parent units 76 * @return List of parent units for the given unit 77 */ 78 public List<String> getParentUnits(String unitNumber); 79 80 /** 81 * Returns the proposal number for an award associated with an account and project director 82 * 83 * @param chartOfAccountsCode 84 * @param accountNumber 85 * @return 86 */ 87 public String getProposalNumberForAccountAndProjectDirector(String chartOfAccountsCode, String accountNumber, String projectDirectorId); 88 } 89