use of org.kuali.kfs.integration.cg.ContractsAndGrantsCfda in project cu-kfs by CU-CommunityApps.
the class AccountGlobalRule method checkCfda.
private boolean checkCfda(String accountCfdaNumber) {
boolean success = true;
ContractsAndGrantsCfda cfda = null;
if (!StringUtils.isEmpty(accountCfdaNumber)) {
ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(ContractsAndGrantsCfda.class);
if (moduleService != null) {
Map<String, Object> keys = new HashMap<String, Object>(1);
keys.put(KFSPropertyConstants.CFDA_NUMBER, accountCfdaNumber);
cfda = moduleService.getExternalizableBusinessObject(ContractsAndGrantsCfda.class, keys);
} else {
throw new RuntimeException("CONFIGURATION ERROR: No responsible module found for EBO class. Unable to proceed.");
}
success = (ObjectUtils.isNull(cfda)) ? false : true;
if (!success) {
putFieldError(KFSPropertyConstants.CATALOG_OF_DOMESTIC_ASSISTANCE_NUMBER, KFSKeyConstants.ERROR_DOCUMENT_GLOBAL_ACCOUNT_CFDA_NUMBER_INVALID);
}
}
return success;
}
Aggregations