load worldbank data from "SE,NO,DK,FI,GB,US" as default.
import javax.jms.Destination;
import javax.jms.JMSException;
+import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -67,13 +68,13 @@ public WorldBankDataWorkGeneratorImpl() {
public void generateWorkOrders() {
try {
- final ApplicationConfiguration importDataForCountries = applicationConfigurationService.checkValueOrLoadDefault("Countries to import data from worldbank (isocode) alt comma separated list", "Load worldbank data for countries", ConfigurationGroup.AGENT, WorldBankCountryWorkGeneratorImpl.class.getSimpleName(), "Worldbank country data loading", "Responsible import worldlbank country data", "agent.worldbank.country.data.loadCountries", "SE");
+ final ApplicationConfiguration importDataForCountries = applicationConfigurationService.checkValueOrLoadDefault("Countries to import data from worldbank (isocode) alt comma separated list", "Load worldbank data for countries", ConfigurationGroup.AGENT, WorldBankCountryWorkGeneratorImpl.class.getSimpleName(), "Worldbank country data loading", "Responsible import worldlbank country data", "agent.worldbank.country.data.loadCountries", "SE,NO,DK,FI,GB,US");
final List<IndicatorElement> indicatorlist = getImportService().getAllIndicators();
final Map<String, String> currentSaved = getImportService().getWorldBankDataMap();
for (final String country : getImportService().getWorldBankCountryMap().keySet()) {
- if (importDataForCountries.getPropertyValue().equalsIgnoreCase(country)) {
+ if (StringUtils.containsIgnoreCase(importDataForCountries.getPropertyValue(),country)) {
for (final IndicatorElement indicator : indicatorlist) {
sendCountryIndicatorWorkOrder(currentSaved, indicator, country);
}
