Class DefaultI18NFacade

  • All Implemented Interfaces:
    I18NFacade

    public class DefaultI18NFacade
    extends java.lang.Object
    implements I18NFacade
    Facade for handling Region and Country Data.
    • Constructor Detail

      • DefaultI18NFacade

        public DefaultI18NFacade()
    • Method Detail

      • getRegion

        public RegionData getRegion​(java.lang.String countryIso,
                                    java.lang.String regionIso)
        Description copied from interface: I18NFacade
        Get the region data for a county and region ISO code
        Specified by:
        getRegion in interface I18NFacade
        Parameters:
        countryIso - the country iso code
        regionIso - the region iso code
        Returns:
        the region data
      • getRegionsForCountryIso

        public java.util.List<RegionData> getRegionsForCountryIso​(java.lang.String countryIso)
        Description copied from interface: I18NFacade
        Get the list of regions for a country. The list is sorted by region name.
        Specified by:
        getRegionsForCountryIso in interface I18NFacade
        Parameters:
        countryIso - the country iso code
        Returns:
        the list of region datas
      • getRegionsForAllCountries

        public java.util.Map<java.lang.String,​java.util.List<RegionData>> getRegionsForAllCountries()
        Description copied from interface: I18NFacade
        Get map of country iso code to list of sorted region datas for all known countries.
        Specified by:
        getRegionsForAllCountries in interface I18NFacade
        Returns:
        map of country iso code to list of sorted region datas
      • getRegionsForCountries

        public java.util.Map<java.lang.String,​java.util.List<RegionData>> getRegionsForCountries​(java.util.Collection<java.lang.String> countryIsoCodes)
        Description copied from interface: I18NFacade
        Get map of country iso code to list of sorted region datas for specified countries.
        Specified by:
        getRegionsForCountries in interface I18NFacade
        Parameters:
        countryIsoCodes - list of country codes
        Returns:
        map of country iso code to list of sorted region datas
      • getCountryForIsocode

        public CountryData getCountryForIsocode​(java.lang.String countryIso)
        Description copied from interface: I18NFacade
        Returns the country with the matching isocode parameter.
        Specified by:
        getCountryForIsocode in interface I18NFacade
        Parameters:
        countryIso - the isocode of the country we want to return.
        Returns:
        the country whose isocode matches the input parameter.
      • setCommonI18NService

        public void setCommonI18NService​(CommonI18NService commonI18NService)