Class DefaultI18NFacade
- java.lang.Object
-
- de.hybris.platform.commercefacades.i18n.impl.DefaultI18NFacade
-
- All Implemented Interfaces:
I18NFacade
public class DefaultI18NFacade extends java.lang.Object implements I18NFacade
Facade for handling Region and Country Data.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classDefaultI18NFacade.RegionNameComparator
-
Constructor Summary
Constructors Constructor Description DefaultI18NFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CommonI18NServicegetCommonI18NService()protected Converter<CountryModel,CountryData>getCountryConverter()CountryDatagetCountryForIsocode(java.lang.String countryIso)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 codeprotected Converter<RegionModel,RegionData>getRegionConverter()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.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.voidsetCommonI18NService(CommonI18NService commonI18NService)voidsetCountryConverter(Converter<CountryModel,CountryData> countryConverter)voidsetRegionConverter(Converter<RegionModel,RegionData> regionConverter)
-
-
-
Method Detail
-
getRegion
public RegionData getRegion(java.lang.String countryIso, java.lang.String regionIso)
Description copied from interface:I18NFacadeGet the region data for a county and region ISO code- Specified by:
getRegionin interfaceI18NFacade- Parameters:
countryIso- the country iso coderegionIso- the region iso code- Returns:
- the region data
-
getRegionsForCountryIso
public java.util.List<RegionData> getRegionsForCountryIso(java.lang.String countryIso)
Description copied from interface:I18NFacadeGet the list of regions for a country. The list is sorted by region name.- Specified by:
getRegionsForCountryIsoin interfaceI18NFacade- 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:I18NFacadeGet map of country iso code to list of sorted region datas for all known countries.- Specified by:
getRegionsForAllCountriesin interfaceI18NFacade- 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:I18NFacadeGet map of country iso code to list of sorted region datas for specified countries.- Specified by:
getRegionsForCountriesin interfaceI18NFacade- 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:I18NFacadeReturns the country with the matching isocode parameter.- Specified by:
getCountryForIsocodein interfaceI18NFacade- Parameters:
countryIso- the isocode of the country we want to return.- Returns:
- the country whose isocode matches the input parameter.
-
getCommonI18NService
protected CommonI18NService getCommonI18NService()
-
setCommonI18NService
public void setCommonI18NService(CommonI18NService commonI18NService)
-
getRegionConverter
protected Converter<RegionModel,RegionData> getRegionConverter()
-
setRegionConverter
public void setRegionConverter(Converter<RegionModel,RegionData> regionConverter)
-
getCountryConverter
protected Converter<CountryModel,CountryData> getCountryConverter()
-
setCountryConverter
public void setCountryConverter(Converter<CountryModel,CountryData> countryConverter)
-
-