use of org.kuali.rice.location.framework.country.CountryEbo in project cu-kfs by CU-CommunityApps.
the class PurchasingAccountsPayableDocumentBase method getVendorCountry.
@Override
public CountryEbo getVendorCountry() {
if (StringUtils.isBlank(vendorCountryCode)) {
vendorCountry = null;
} else {
if (vendorCountry == null || !StringUtils.equals(vendorCountry.getCode(), vendorCountryCode)) {
ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(CountryEbo.class);
if (moduleService != null) {
Map<String, Object> keys = new HashMap<String, Object>(1);
keys.put(LocationConstants.PrimaryKeyConstants.CODE, vendorCountryCode);
vendorCountry = moduleService.getExternalizableBusinessObject(CountryEbo.class, keys);
} else {
throw new RuntimeException("CONFIGURATION ERROR: No responsible module found for EBO class. Unable to proceed.");
}
}
}
return vendorCountry;
}
Aggregations