Class DefaultLocalizationService
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.i18n.impl.DefaultLocalizationService
- All Implemented Interfaces:
InvalidationListener,LocalizationService,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
@Deprecated(since="ages",
forRemoval=true)
public class DefaultLocalizationService
extends AbstractService
implements LocalizationService, InvalidationListener
Deprecated, for removal: This API element is subject to removal in a future version.
since ages
Default implementation of the localization service.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classNested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO -
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenantFields inherited from interface de.hybris.platform.servicelayer.internal.i18n.LocalizationService
BEAN -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.Invoked by a BeanFactory after it has set all bean properties supplied.Locale[]getAllLocales(Locale loc) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.getDataLanguageIsoCode(Locale locale) Deprecated, for removal: This API element is subject to removal in a future version.getDataLocale(Locale loc) Deprecated, for removal: This API element is subject to removal in a future version.Locale[]getFallbackLocales(Locale loc) Deprecated, for removal: This API element is subject to removal in a future version.protected LocalegetLocaleByLanguage(Language lang) Deprecated, for removal: This API element is subject to removal in a future version.getLocaleByString(String isoCodes) Deprecated, for removal: This API element is subject to removal in a future version.protected Locale[]getLocaleMatchKey(Locale requested) Deprecated, for removal: This API element is subject to removal in a future version.getMatchingPkForDataLocale(Locale locale) Deprecated, for removal: This API element is subject to removal in a future version.Returns proper language PK for matching locale.Deprecated, for removal: This API element is subject to removal in a future version.protected Map<Locale,DefaultLocalizationService.DataLocale> Deprecated, for removal: This API element is subject to removal in a future version.Each hybrisLanguageis encapsulates into aDefaultLocalizationService.DataLocaleand is put with the correspondingLocaleinto the map.booleanDeprecated, for removal: This API element is subject to removal in a future version.voidkeyInvalidated(Object[] key, int invalidationType, InvalidationTarget target, RemoteInvalidationSource remoteSrc) Deprecated, for removal: This API element is subject to removal in a future version.protected DefaultLocalizationService.DataLocalematchDataLocale(Locale loc, boolean throwError) Deprecated, for removal: This API element is subject to removal in a future version.voidsetCurrentLocale(Locale loc) Deprecated, for removal: This API element is subject to removal in a future version.voidsetLocalizationFallbackEnabled(boolean enabled) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Constructor Details
-
DefaultLocalizationService
public DefaultLocalizationService()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getLocaleByString
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getLocaleByStringin interfaceLocalizationService
-
getLocaleByLanguage
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
lang- the language- Returns:
- the Locale
-
getCurrentLocale
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getCurrentLocalein interfaceLocalizationService- Returns:
- from the current
JaloSessionthe attachedLocale.
-
setCurrentLocale
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setCurrentLocalein interfaceLocalizationService- Parameters:
loc- the new session locale
-
getCurrentDataLocale
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getCurrentDataLocalein interfaceLocalizationService
-
getDataLocale
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getDataLocalein interfaceLocalizationService- Parameters:
loc- the locale to match
-
getDataLanguageIsoCode
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getDataLanguageIsoCodein interfaceLocalizationService- Parameters:
locale- the locale to get data language code for
-
getAllLocales
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getAllLocalesin interfaceLocalizationService
-
getFallbackLocales
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getFallbackLocalesin interfaceLocalizationService
-
getLocaleMatchKey
Deprecated, for removal: This API element is subject to removal in a future version. -
getMatchingPkForDataLocale
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:LocalizationServiceReturns proper language PK for matching locale.- Specified by:
getMatchingPkForDataLocalein interfaceLocalizationService- Parameters:
locale- the locale to get data language code for- Returns:
- language pk
-
matchDataLocale
Deprecated, for removal: This API element is subject to removal in a future version. -
getSupportedDataLocales
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getSupportedDataLocalesin interfaceLocalizationService- Returns:
- a Set of
Locales for the current system.
-
getSupportedLocales
Deprecated, for removal: This API element is subject to removal in a future version.Each hybrisLanguageis encapsulates into aDefaultLocalizationService.DataLocaleand is put with the correspondingLocaleinto the map. Additionally each of those items are cached.We added to
JaloTypeCacheUnitunit additional unique value for a current user, nevertheless changes of the supported locales list for a one user in scope of different tenants , still might cause problems (see HOR-893). Note also the memory impact - for a every user there will be separate cache of supported locales created.- Returns:
- a map where
Localeare mapped toDefaultLocalizationService.DataLocale
-
isLocalizationFallbackEnabled
public boolean isLocalizationFallbackEnabled()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
isLocalizationFallbackEnabledin interfaceLocalizationService- Returns:
trueif in the current JaloSession the localization fallback is enabled.
-
setLocalizationFallbackEnabled
public void setLocalizationFallbackEnabled(boolean enabled) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setLocalizationFallbackEnabledin interfaceLocalizationService- Parameters:
enabled- iftruethe localization fallback will be enabled.
-
afterPropertiesSet
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractServiceInvoked by a BeanFactory after it has set all bean properties supplied. Overwrite this method for adding/implementing additional code into the service. Important note: Please call alwayssuper.afterPropertiesSet()before or the java serialization won't work.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classAbstractService- Throws:
Exception- See Also:
-
InitializingBean.afterPropertiesSet()
-
keyInvalidated
public void keyInvalidated(Object[] key, int invalidationType, InvalidationTarget target, RemoteInvalidationSource remoteSrc) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
keyInvalidatedin interfaceInvalidationListener
-