org.kuali.kfs.module.external.kc.service.impl
Class ContractsAndGrantsModuleServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.external.kc.service.impl.ContractsAndGrantsModuleServiceImpl
All Implemented Interfaces:
ContractsAndGrantsModuleService

public class ContractsAndGrantsModuleServiceImpl
extends Object
implements ContractsAndGrantsModuleService


Constructor Summary
ContractsAndGrantsModuleServiceImpl()
           
 
Method Summary
protected  AwardAccount determineAwardAccountForFederalAgency(List<AwardAccount> awardAccounts)
          Looks for the newest award account object, otherwise returns null.
protected  AwardAccount determineAwardAccountForProjectDirector(List<AwardAccount> awardAccounts)
          Looks for first non-blank project director id within a list of award accounts sorted newest first and returns the award account object, otherwise returns null.
 List<Integer> getAllAccountReponsiblityIds()
          get all possible account responsibility ids on contracts & grants Accounts
protected  List<AwardAccount> getAwardAccounts(String chartCode, String accountNumber)
           
protected  InstitutionalUnitService getInstitutionalUnitWebService()
           
protected  int getMaxiumAccountResponsibilityId()
          retieve the maxium account responsiblity id from system parameter
 org.kuali.rice.kns.service.ParameterService getParameterService()
          Returns an implementation of the parameterService
 List<String> getParentUnits(String unitNumber)
           
 org.kuali.rice.kim.bo.Person getProjectDirectorForAccount(Account account)
           
 org.kuali.rice.kim.bo.Person getProjectDirectorForAccount(String chartOfAccountsCode, String accountNumber)
           
 String getProposalNumberForAccountAndProjectDirector(String chartOfAccountsCode, String accountNumber, String projectDirectorId)
          Returns the proposal number for an award associated with an account and project director
 boolean hasValidAccountReponsiblityIdIfNotNull(Account account)
          determine whether the given account has a valid responsibility id if its responsibility id is not null
 boolean isAwardedByFederalAgency(String chartOfAccountsCode, String accountNumber, List<String> federalAgencyTypeCodes)
          determine if the given account is awarded by a federal agency
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContractsAndGrantsModuleServiceImpl

public ContractsAndGrantsModuleServiceImpl()
Method Detail

getAwardAccounts

protected List<AwardAccount> getAwardAccounts(String chartCode,
                                              String accountNumber)

getInstitutionalUnitWebService

protected InstitutionalUnitService getInstitutionalUnitWebService()

getParentUnits

public List<String> getParentUnits(String unitNumber)
Specified by:
getParentUnits in interface ContractsAndGrantsModuleService

getProjectDirectorForAccount

public org.kuali.rice.kim.bo.Person getProjectDirectorForAccount(String chartOfAccountsCode,
                                                                 String accountNumber)
Specified by:
getProjectDirectorForAccount in interface ContractsAndGrantsModuleService
See Also:
ContractsAndGrantsModuleService.getProjectDirectorForAccount(java.lang.String, java.lang.String)

determineAwardAccountForProjectDirector

protected AwardAccount determineAwardAccountForProjectDirector(List<AwardAccount> awardAccounts)
Looks for first non-blank project director id within a list of award accounts sorted newest first and returns the award account object, otherwise returns null.

Parameters:
awardAccountDTOs -
Returns:

getProjectDirectorForAccount

public org.kuali.rice.kim.bo.Person getProjectDirectorForAccount(Account account)
Specified by:
getProjectDirectorForAccount in interface ContractsAndGrantsModuleService
See Also:
org.kuali.kfs.integration.service.ContractsAndGrantsModuleService#getProjectDirectorForAccount(org.kuali.kfs.coa.businessobject.Account)

isAwardedByFederalAgency

public boolean isAwardedByFederalAgency(String chartOfAccountsCode,
                                        String accountNumber,
                                        List<String> federalAgencyTypeCodes)
Description copied from interface: ContractsAndGrantsModuleService
determine if the given account is awarded by a federal agency

Specified by:
isAwardedByFederalAgency in interface ContractsAndGrantsModuleService
Parameters:
chartOfAccountsCode - the given account's chart of accounts code
accountNumber - the given account's account number
federalAgencyTypeCodes - the given federal agency type code
Returns:
true if the given account is funded by a federal agency or associated with federal pass through indicator; otherwise, false
See Also:
org.kuali.kfs.integration.service.ContractsAndGrantsModuleService#isAwardedByFederalAgency(java.lang.String, java.lang.String, java.util.List)

determineAwardAccountForFederalAgency

protected AwardAccount determineAwardAccountForFederalAgency(List<AwardAccount> awardAccounts)
Looks for the newest award account object, otherwise returns null.

Parameters:
awardAccounts -
Returns:

getAllAccountReponsiblityIds

public List<Integer> getAllAccountReponsiblityIds()
Description copied from interface: ContractsAndGrantsModuleService
get all possible account responsibility ids on contracts & grants Accounts

Specified by:
getAllAccountReponsiblityIds in interface ContractsAndGrantsModuleService
Returns:
all possible account responsibility ids on contracts & grants Accounts
See Also:
ContractsAndGrantsModuleService.getAllAccountReponsiblityIds()

hasValidAccountReponsiblityIdIfNotNull

public boolean hasValidAccountReponsiblityIdIfNotNull(Account account)
Description copied from interface: ContractsAndGrantsModuleService
determine whether the given account has a valid responsibility id if its responsibility id is not null

Specified by:
hasValidAccountReponsiblityIdIfNotNull in interface ContractsAndGrantsModuleService
Parameters:
account - the given account
Returns:
true if the given account is a contracts & grants account with a valid responsibility id; otherwise, return false
See Also:
org.kuali.kfs.integration.cg.ContractsAndGrantsModuleService#hasValidAccountReponsiblityIdIfExists(org.kuali.kfs.coa.businessobject.Account)

getProposalNumberForAccountAndProjectDirector

public String getProposalNumberForAccountAndProjectDirector(String chartOfAccountsCode,
                                                            String accountNumber,
                                                            String projectDirectorId)
Description copied from interface: ContractsAndGrantsModuleService
Returns the proposal number for an award associated with an account and project director

Specified by:
getProposalNumberForAccountAndProjectDirector in interface ContractsAndGrantsModuleService
Returns:

getMaxiumAccountResponsibilityId

protected int getMaxiumAccountResponsibilityId()
retieve the maxium account responsiblity id from system parameter

Returns:
the maxium account responsiblity id from system parameter

getParameterService

public org.kuali.rice.kns.service.ParameterService getParameterService()
Returns an implementation of the parameterService

Returns:
an implementation of the parameterService

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.