001/* 002 * Copyright 2007-2008 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 */ 016package org.kuali.ole.integration.cg; 017 018import java.util.Collection; 019import java.util.List; 020 021import org.kuali.ole.coa.businessobject.Account; 022import org.kuali.rice.kim.api.identity.Person; 023 024public interface ContractsAndGrantsModuleService { 025 026 public Person getProjectDirectorForAccount(String chartOfAccountsCode, String accountNumber); 027 028 public Person getProjectDirectorForAccount(Account account); 029 030 /** 031 * determine if the given account is awarded by a federal agency 032 * 033 * @param chartOfAccountsCode the given account's chart of accounts code 034 * @param accountNumber the given account's account number 035 * @param federalAgencyTypeCodes the given federal agency type code 036 * @return true if the given account is funded by a federal agency or associated with federal pass through indicator; otherwise, 037 * false 038 */ 039 public boolean isAwardedByFederalAgency(String chartOfAccountsCode, String accountNumber, Collection<String> federalAgencyTypeCodes); 040 041 /** 042 * get all possible account responsibility ids on contracts & grants Accounts 043 * 044 * @return all possible account responsibility ids on contracts & grants Accounts 045 */ 046 public List<Integer> getAllAccountReponsiblityIds(); 047 048 /** 049 * determine whether the given account has a valid responsibility id if its responsibility id is not null 050 * 051 * @param account the given account 052 * @return true if the given account is a contracts & grants account with a valid responsibility id; otherwise, return false 053 */ 054 public boolean hasValidAccountReponsiblityIdIfNotNull(Account account); 055 056 public List<String> getParentUnits(String unitNumber); 057 058 /** 059 * Returns the proposal number for an award associated with an account and project director 060 * 061 * @param chartOfAccountsCode 062 * @param accountNumber 063 * @return 064 */ 065 public String getProposalNumberForAccountAndProjectDirector(String chartOfAccountsCode, String accountNumber, String projectDirectorId); 066} 067