@Deprecated public class DefaultLocalizationService extends AbstractService implements LocalizationService, InvalidationListener
| Modifier and Type | Class and Description |
|---|---|
protected class |
DefaultLocalizationService.DataLocale
Deprecated.
|
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.
|
Locale[] |
getAllLocales(Locale loc)
Deprecated.
|
Locale |
getCurrentDataLocale()
Deprecated.
|
Locale |
getCurrentLocale()
Deprecated.
|
String |
getDataLanguageIsoCode(Locale locale)
Deprecated.
|
Locale |
getDataLocale(Locale loc)
Deprecated.
|
Locale[] |
getFallbackLocales(Locale loc)
Deprecated.
|
protected Locale |
getLocaleByLanguage(Language lang)
Deprecated.
|
Locale |
getLocaleByString(String isoCodes)
Deprecated.
|
protected Locale[] |
getLocaleMatchKey(Locale requested)
Deprecated.
|
PK |
getMatchingPkForDataLocale(Locale locale)
Deprecated.
Returns proper language PK for matching locale.
|
Set<Locale> |
getSupportedDataLocales()
Deprecated.
|
protected Map<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(Object[] key,
int invalidationType,
InvalidationTarget target,
RemoteInvalidationSource remoteSrc)
Deprecated.
|
protected DefaultLocalizationService.DataLocale |
matchDataLocale(Locale loc,
boolean throwError)
Deprecated.
|
void |
setCurrentLocale(Locale loc)
Deprecated.
|
void |
setLocalizationFallbackEnabled(boolean enabled)
Deprecated.
|
getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplacepublic Locale getLocaleByString(String isoCodes)
getLocaleByString in interface LocalizationServiceprotected Locale getLocaleByLanguage(Language lang)
lang - the languagepublic Locale getCurrentLocale()
getCurrentLocale in interface LocalizationServiceJaloSession the attached Locale.public void setCurrentLocale(Locale loc)
setCurrentLocale in interface LocalizationServiceloc - the new session localepublic Locale getCurrentDataLocale()
getCurrentDataLocale in interface LocalizationServicepublic Locale getDataLocale(Locale loc)
getDataLocale in interface LocalizationServiceloc - the locale to matchpublic String getDataLanguageIsoCode(Locale locale)
getDataLanguageIsoCode in interface LocalizationServicelocale - the locale to get data language code forpublic Locale[] getAllLocales(Locale loc)
getAllLocales in interface LocalizationServicepublic Locale[] getFallbackLocales(Locale loc)
getFallbackLocales in interface LocalizationServicepublic PK getMatchingPkForDataLocale(Locale locale)
LocalizationServicegetMatchingPkForDataLocale in interface LocalizationServicelocale - the locale to get data language code forprotected DefaultLocalizationService.DataLocale matchDataLocale(Locale loc, boolean throwError)
public Set<Locale> getSupportedDataLocales()
getSupportedDataLocales in interface LocalizationServiceLocales for the current system.protected Map<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 Exception
AbstractServicesuper.afterPropertiesSet() before or the java serialization won't work.afterPropertiesSet in class AbstractServiceExceptionInitializingBean#afterPropertiesSet()public void keyInvalidated(Object[] key, int invalidationType, InvalidationTarget target, RemoteInvalidationSource remoteSrc)
keyInvalidated in interface InvalidationListenerCopyright © 2017 SAP SE. All Rights Reserved.