Interface I18NFacade
-
- All Known Implementing Classes:
DefaultI18NFacade
public interface I18NFacadeThe Internationalization Facade supports retrieving Country and Region (States/Counties/Prefectures/etc) information. ISO Codes MUST adhere to ISO 3166-1 alpha-2 for Countries and ISO 3166-2 for Regions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CountryDatagetCountryForIsocode(java.lang.String isocode)Returns the country with the matching isocode parameter.RegionDatagetRegion(java.lang.String countryIso, java.lang.String regionIso)Get the region data for a county and region ISO codejava.util.Map<java.lang.String,java.util.List<RegionData>>getRegionsForAllCountries()Get map of country iso code to list of sorted region datas for all known countries.java.util.Map<java.lang.String,java.util.List<RegionData>>getRegionsForCountries(java.util.Collection<java.lang.String> countryIsoCodes)Get map of country iso code to list of sorted region datas for specified countries.java.util.List<RegionData>getRegionsForCountryIso(java.lang.String countryIso)Get the list of regions for a country.
-
-
-
Method Detail
-
getCountryForIsocode
CountryData getCountryForIsocode(java.lang.String isocode)
Returns the country with the matching isocode parameter.- Parameters:
isocode- the isocode of the country we want to return.- Returns:
- the country whose isocode matches the input parameter.
-
getRegion
RegionData getRegion(java.lang.String countryIso, java.lang.String regionIso)
Get the region data for a county and region ISO code- Parameters:
countryIso- the country iso coderegionIso- the region iso code- Returns:
- the region data
- Throws:
UnknownIdentifierException- in case no country or region can be found
-
getRegionsForCountryIso
java.util.List<RegionData> getRegionsForCountryIso(java.lang.String countryIso)
Get the list of regions for a country. The list is sorted by region name.- Parameters:
countryIso- the country iso code- Returns:
- the list of region datas
-
getRegionsForAllCountries
java.util.Map<java.lang.String,java.util.List<RegionData>> getRegionsForAllCountries()
Get map of country iso code to list of sorted region datas for all known countries.- Returns:
- map of country iso code to list of sorted region datas
-
getRegionsForCountries
java.util.Map<java.lang.String,java.util.List<RegionData>> getRegionsForCountries(java.util.Collection<java.lang.String> countryIsoCodes)
Get map of country iso code to list of sorted region datas for specified countries.- Parameters:
countryIsoCodes- list of country codes- Returns:
- map of country iso code to list of sorted region datas
-
-