@Deprecated public class DefaultLocalizationService extends AbstractService implements LocalizationService, InvalidationListener
| Modifier and Type | Class and Description |
|---|---|
protected class |
DefaultLocalizationService.DataLocale
Deprecated.
DataLocale encapsulates a
Locale mapped to a hybris Language item. |
AbstractService.SerializableDTOtenantBEAN| Constructor and Description |
|---|
DefaultLocalizationService()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Deprecated.
Invoked by a BeanFactory after it has set all bean properties supplied.
|
java.util.Locale[] |
getAllLocales(java.util.Locale loc)
Deprecated.
|
java.util.Locale |
getCurrentDataLocale()
Deprecated.
|
java.util.Locale |
getCurrentLocale()
Deprecated.
|
java.lang.String |
getDataLanguageIsoCode(java.util.Locale locale)
Deprecated.
|
java.util.Locale |
getDataLocale(java.util.Locale loc)
Deprecated.
|
java.util.Locale[] |
getFallbackLocales(java.util.Locale loc)
Deprecated.
|
protected java.util.Locale |
getLocaleByLanguage(Language lang)
Deprecated.
Returns the (cached)
Locale by the given Language. |
java.util.Locale |
getLocaleByString(java.lang.String isoCodes)
Deprecated.
|
protected java.util.Locale[] |
getLocaleMatchKey(java.util.Locale requested)
Deprecated.
|
PK |
getMatchingPkForDataLocale(java.util.Locale locale)
Deprecated.
Returns proper language PK for matching locale.
|
java.util.Set<java.util.Locale> |
getSupportedDataLocales()
Deprecated.
|
protected java.util.Map<java.util.Locale,DefaultLocalizationService.DataLocale> |
getSupportedLocales()
Deprecated.
Each hybris
Language is encapsulates into a DefaultLocalizationService.DataLocale and is put with the corresponding
Locale into the map. |
boolean |
isLocalizationFallbackEnabled()
Deprecated.
|
void |
keyInvalidated(java.lang.Object[] key,
int invalidationType,
InvalidationTarget target,
RemoteInvalidationSource remoteSrc)
Deprecated.
|
protected DefaultLocalizationService.DataLocale |
matchDataLocale(java.util.Locale loc,
boolean throwError)
Deprecated.
|
void |
setCurrentLocale(java.util.Locale loc)
Deprecated.
|
void |
setLocalizationFallbackEnabled(boolean enabled)
Deprecated.
|
getCurrentTenant, setBeanName, setCurrentTenant, writeReplacepublic java.util.Locale getLocaleByString(java.lang.String isoCodes)
getLocaleByString in interface LocalizationServiceprotected java.util.Locale getLocaleByLanguage(Language lang)
Locale by the given Language.lang - the languagepublic java.util.Locale getCurrentLocale()
getCurrentLocale in interface LocalizationServiceJaloSession the attached Locale.public void setCurrentLocale(java.util.Locale loc)
setCurrentLocale in interface LocalizationServiceloc - the new session localepublic java.util.Locale getCurrentDataLocale()
getCurrentDataLocale in interface LocalizationServicepublic java.util.Locale getDataLocale(java.util.Locale loc)
getDataLocale in interface LocalizationServiceloc - the locale to matchpublic java.lang.String getDataLanguageIsoCode(java.util.Locale locale)
getDataLanguageIsoCode in interface LocalizationServicelocale - the locale to get data language code forpublic java.util.Locale[] getAllLocales(java.util.Locale loc)
getAllLocales in interface LocalizationServicepublic java.util.Locale[] getFallbackLocales(java.util.Locale loc)
getFallbackLocales in interface LocalizationServiceprotected java.util.Locale[] getLocaleMatchKey(java.util.Locale requested)
public PK getMatchingPkForDataLocale(java.util.Locale locale)
LocalizationServicegetMatchingPkForDataLocale in interface LocalizationServicelocale - the locale to get data language code forprotected DefaultLocalizationService.DataLocale matchDataLocale(java.util.Locale loc, boolean throwError)
public java.util.Set<java.util.Locale> getSupportedDataLocales()
getSupportedDataLocales in interface LocalizationServiceLocales for the current system.protected java.util.Map<java.util.Locale,DefaultLocalizationService.DataLocale> getSupportedLocales()
Language is encapsulates into a DefaultLocalizationService.DataLocale and is put with the corresponding
Locale into the map. Additionally each of those items are cached.
We added to JaloTypeCacheUnit unit 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.Locale are mapped to DefaultLocalizationService.DataLocalepublic boolean isLocalizationFallbackEnabled()
isLocalizationFallbackEnabled in interface LocalizationServicetrue if in the current JaloSession the localization fallback is enabled.public void setLocalizationFallbackEnabled(boolean enabled)
setLocalizationFallbackEnabled in interface LocalizationServiceenabled - if true the localization fallback will be enabled.public void afterPropertiesSet()
throws java.lang.Exception
AbstractServicesuper.afterPropertiesSet() before or the java serialization won't work.afterPropertiesSet in class AbstractServicejava.lang.ExceptionInitializingBean#afterPropertiesSet()public void keyInvalidated(java.lang.Object[] key,
int invalidationType,
InvalidationTarget target,
RemoteInvalidationSource remoteSrc)
keyInvalidated in interface InvalidationListenerCopyright © 2018 SAP SE. All Rights Reserved.