1 /* 2 * Copyright 2007-2008 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.integration.cg; 17 18 import java.util.Collection; 19 import java.util.List; 20 21 import org.kuali.ole.coa.businessobject.Account; 22 import org.kuali.rice.kim.api.identity.Person; 23 24 public interface ContractsAndGrantsModuleService { 25 26 public Person getProjectDirectorForAccount(String chartOfAccountsCode, String accountNumber); 27 28 public Person getProjectDirectorForAccount(Account account); 29 30 /** 31 * determine if the given account is awarded by a federal agency 32 * 33 * @param chartOfAccountsCode the given account's chart of accounts code 34 * @param accountNumber the given account's account number 35 * @param federalAgencyTypeCodes the given federal agency type code 36 * @return true if the given account is funded by a federal agency or associated with federal pass through indicator; otherwise, 37 * false 38 */ 39 public boolean isAwardedByFederalAgency(String chartOfAccountsCode, String accountNumber, Collection<String> federalAgencyTypeCodes); 40 41 /** 42 * get all possible account responsibility ids on contracts & grants Accounts 43 * 44 * @return all possible account responsibility ids on contracts & grants Accounts 45 */ 46 public List<Integer> getAllAccountReponsiblityIds(); 47 48 /** 49 * determine whether the given account has a valid responsibility id if its responsibility id is not null 50 * 51 * @param account the given account 52 * @return true if the given account is a contracts & grants account with a valid responsibility id; otherwise, return false 53 */ 54 public boolean hasValidAccountReponsiblityIdIfNotNull(Account account); 55 56 public List<String> getParentUnits(String unitNumber); 57 58 /** 59 * Returns the proposal number for an award associated with an account and project director 60 * 61 * @param chartOfAccountsCode 62 * @param accountNumber 63 * @return 64 */ 65 public String getProposalNumberForAccountAndProjectDirector(String chartOfAccountsCode, String accountNumber, String projectDirectorId); 66 } 67