예제 #1
0
  @Override
  public Map<String, Country> getCountriesMap(Language language) throws ServiceException {

    List<Country> countries = this.getCountries(language);

    Map<String, Country> returnMap = new LinkedHashMap<String, Country>();

    for (Country country : countries) {
      returnMap.put(country.getIsoCode(), country);
    }

    return returnMap;
  }
예제 #2
0
 @Override
 public List<Country> getCountries(final List<String> isoCodes, final Language language)
     throws ServiceException {
   List<Country> countryList = getCountries(language);
   List<Country> requestedCountryList = new ArrayList<Country>();
   if (!CollectionUtils.isEmpty(countryList)) {
     for (Country c : countryList) {
       if (isoCodes.contains(c.getIsoCode())) {
         requestedCountryList.add(c);
       }
     }
   }
   return requestedCountryList;
 }