Package de.hybris.platform.servicelayer
Class StubLocaleProvider
- java.lang.Object
-
- de.hybris.platform.servicelayer.StubLocaleProvider
-
- All Implemented Interfaces:
LocaleProvider,java.io.Serializable
public class StubLocaleProvider extends java.lang.Object implements LocaleProvider
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StubLocaleProvider(java.util.Locale locale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.LocalegetCurrentDataLocale()Returns current (session) data locale to be used to read or store localized attribute data.java.util.List<java.util.Locale>getFallbacks(java.util.Locale requestedLocale)Returns aListwith fallbackLocales for the given Locale.booleanisFallbackEnabled()Returnstrueif for the current session theLocalefallback is enabled.java.util.LocaletoDataLocale(java.util.Locale external)Converts a arbitrary locale instance into one which is allowed to read and write data with.
-
-
-
Method Detail
-
getCurrentDataLocale
public java.util.Locale getCurrentDataLocale()
Description copied from interface:LocaleProviderReturns current (session) data locale to be used to read or store localized attribute data. May be other thanI18NService.getCurrentLocale()!- Specified by:
getCurrentDataLocalein interfaceLocaleProvider
-
getFallbacks
public java.util.List<java.util.Locale> getFallbacks(java.util.Locale requestedLocale)
Description copied from interface:LocaleProviderReturns aListwith fallbackLocales for the given Locale.- Specified by:
getFallbacksin interfaceLocaleProvider- Parameters:
requestedLocale- the Locale for which all fallback Locales are requested.- Returns:
nullif the locale fallback is not enabled (seeLocaleProvider.isFallbackEnabled()).
-
isFallbackEnabled
public boolean isFallbackEnabled()
Description copied from interface:LocaleProviderReturnstrueif for the current session theLocalefallback is enabled.- Specified by:
isFallbackEnabledin interfaceLocaleProvider- Returns:
falseotherwise.
-
toDataLocale
public java.util.Locale toDataLocale(java.util.Locale external)
Description copied from interface:LocaleProviderConverts a arbitrary locale instance into one which is allowed to read and write data with.- Specified by:
toDataLocalein interfaceLocaleProvider- Parameters:
external- the locale
-
-