public class DefaultI18NService extends AbstractBusinessService implements I18NService
AbstractService.SerializableDTOmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultI18NService() |
| Modifier and Type | Method and Description |
|---|---|
Set<LanguageModel> |
getAllActiveLanguages()
Deprecated.
|
Set<CountryModel> |
getAllCountries()
Deprecated.
|
Set<CurrencyModel> |
getAllCurrencies()
Deprecated.
|
Set<LanguageModel> |
getAllLanguages()
Deprecated.
|
Locale[] |
getAllLocales(Locale locale)
Returns a collection of Locales for the passed Locale(Language).
Each Locale element only contains language information and gets constructed from the fallback languages of the passed language. |
CurrencyModel |
getBaseCurrency()
Deprecated.
|
Currency |
getBestMatchingJavaCurrency(String isocode)
Returns the Currency instance for the given currency iso code.
|
Locale |
getBestMatchingLocale(Locale locale)
For a given locale this method tries to find a matching locale which is backed by a hybris language item.
|
ResourceBundle |
getBundle(String baseName)
Deprecated.
|
ResourceBundle |
getBundle(String baseName,
Locale[] locales)
Deprecated.
|
ResourceBundle |
getBundle(String baseName,
Locale[] locales,
ClassLoader loader)
Deprecated.
|
CountryModel |
getCountry(String isocode)
Deprecated.
|
CurrencyModel |
getCurrency(String isoCode)
Deprecated.
|
CurrencyModel |
getCurrentCurrency()
Deprecated.
|
Currency |
getCurrentJavaCurrency()
return a Currency representing the current currency.
|
Locale |
getCurrentLocale()
Returns current (session) locale (and not JVM's own locale).
|
TimeZone |
getCurrentTimeZone()
Returns current (session) timezone (and not JVM's own timezone).
|
String |
getEnumLocalizedName(HybrisEnumValue enumValue)
Deprecated.
|
Locale[] |
getFallbackLocales(Locale locale)
Like getAllLocales(Locale locale) but just return the fallbacks themselves
|
I18NDao |
getI18nDao()
Deprecated.
|
PK |
getLangPKFromLocale(Locale locale)
Returns proper language PK for matching locale.
|
LanguageModel |
getLanguage(String isocode)
Deprecated.
|
LocalizationService |
getLocaleService()
Deprecated.
|
Set<Locale> |
getSupportedDataLocales()
Deprecated.
|
Set<Currency> |
getSupportedJavaCurrencies() |
Set<Locale> |
getSupportedLocales() |
TypeService |
getTypeService() |
boolean |
isLocalizationFallbackEnabled()
Return the status of the localization fallback flag.
|
TypeService |
lookupTypeService()
Must be overwritten! Use <lookup-method> in spring.
|
void |
setCurrencyDao(CurrencyDao currencyDao) |
void |
setCurrentCurrency(CurrencyModel currency)
Deprecated.
|
void |
setCurrentJavaCurrency(Currency currency)
Sets the current currency.
|
void |
setCurrentLocale(Locale locale)
Changes current session locale.
|
void |
setCurrentTimeZone(TimeZone zone)
Changes current session timezone.
|
void |
setEnumLocalizedName(HybrisEnumValue enumValue,
String name)
Deprecated.
|
void |
setI18nDao(I18NDao dao)
Deprecated.
|
void |
setLocaleService(LocalizationService localeService)
Deprecated.
|
void |
setLocalizationFallbackEnabled(boolean enabled)
Set the status of the localization fallback flag.
|
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplacepublic TypeService getTypeService()
public TypeService lookupTypeService()
public Currency getCurrentJavaCurrency()
I18NServicegetCurrentJavaCurrency in interface I18NServicepublic void setCurrentJavaCurrency(Currency currency)
I18NServicesetCurrentJavaCurrency in interface I18NServicecurrency - the new currencypublic final Locale getCurrentLocale()
I18NServicegetCurrentLocale in interface I18NServicepublic final void setCurrentLocale(Locale locale)
I18NServicesetCurrentLocale in interface I18NServicelocale - the new session localepublic void setCurrentTimeZone(TimeZone zone)
I18NServicesetCurrentTimeZone in interface I18NServicezone - the new session timezonepublic TimeZone getCurrentTimeZone()
I18NServicegetCurrentTimeZone in interface I18NServicepublic boolean isLocalizationFallbackEnabled()
I18NServiceThe language fallback setting is a session scope setting.
isLocalizationFallbackEnabled in interface I18NServicepublic void setLocalizationFallbackEnabled(boolean enabled)
I18NServiceThe language fallback setting is a session scope setting.
setLocalizationFallbackEnabled in interface I18NServiceenabled - true if localization fallback should be activatedpublic Currency getBestMatchingJavaCurrency(String isocode)
I18NServicegetBestMatchingJavaCurrency in interface I18NServiceisocode - the iso codepublic Locale[] getAllLocales(Locale locale)
I18NServicegetAllLocales in interface I18NServicelocale - the given localepublic Locale getBestMatchingLocale(Locale locale)
I18NServicegetBestMatchingLocale in interface I18NServicelocale - the locale to matchpublic Locale[] getFallbackLocales(Locale locale)
I18NServicegetFallbackLocales in interface I18NServicepublic Set<Currency> getSupportedJavaCurrencies()
getSupportedJavaCurrencies in interface I18NServiceCurrencys for the current system.public Set<Locale> getSupportedLocales()
getSupportedLocales in interface I18NServiceLocales for the current system.public void setCurrencyDao(CurrencyDao currencyDao)
@Deprecated public LocalizationService getLocaleService()
@Deprecated public void setLocaleService(LocalizationService localeService)
localeService - the localeService to set@Deprecated public I18NDao getI18nDao()
@Deprecated public void setI18nDao(I18NDao dao)
dao - the i18nDao to set@Deprecated public CurrencyModel getCurrentCurrency()
getCurrentCurrency in interface I18NService@Deprecated public void setCurrentCurrency(CurrencyModel currency)
setCurrentCurrency in interface I18NServicecurrency - the new currency@Deprecated public LanguageModel getLanguage(String isocode)
getLanguage in interface I18NServiceisocode - the isocode a language is searched for@Deprecated public Set<LanguageModel> getAllActiveLanguages()
getAllActiveLanguages in interface I18NService@Deprecated public Set<LanguageModel> getAllLanguages()
getAllLanguages in interface I18NService@Deprecated public CountryModel getCountry(String isocode)
getCountry in interface I18NServiceisocode - the isocode@Deprecated public Set<CountryModel> getAllCountries()
getAllCountries in interface I18NService@Deprecated public Set<CurrencyModel> getAllCurrencies()
getAllCurrencies in interface I18NService@Deprecated public CurrencyModel getBaseCurrency()
getBaseCurrency in interface I18NService@Deprecated public CurrencyModel getCurrency(String isoCode)
getCurrency in interface I18NServiceisoCode - the iso code@Deprecated public Set<Locale> getSupportedDataLocales()
getSupportedDataLocales in interface I18NServiceLocales for the current system.@Deprecated public ResourceBundle getBundle(String baseName)
getBundle in interface I18NServicebaseName - bundle name@Deprecated public ResourceBundle getBundle(String baseName, Locale[] locales)
getBundle in interface I18NServicebaseName - bundle namelocales - fallback locales (bundles)@Deprecated public ResourceBundle getBundle(String baseName, Locale[] locales, ClassLoader loader)
getBundle in interface I18NServicebaseName - bundle namelocales - fallback locales (bundles)loader - classloader to use@Deprecated public String getEnumLocalizedName(HybrisEnumValue enumValue)
getEnumLocalizedName in interface I18NServiceenumValue - the value@Deprecated public void setEnumLocalizedName(HybrisEnumValue enumValue, String name)
setEnumLocalizedName in interface I18NServiceenumValue - the valuename - the new namepublic PK getLangPKFromLocale(Locale locale)
I18NServicegetLangPKFromLocale in interface I18NServicelocale - the locale to get data language code forCopyright © 2017 SAP SE. All Rights Reserved.