@NotThreadSafe public final class GlobalLocaleManager extends com.helger.web.scope.singleton.AbstractGlobalWebSingleton implements ILocaleManager
| Constructor and Description |
|---|
GlobalLocaleManager()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
com.helger.commons.collection.impl.ICommonsList<Locale> |
getAllAvailableLocales() |
Locale |
getDefaultLocale() |
static GlobalLocaleManager |
getInstance() |
boolean |
hasLocales() |
boolean |
isSupportedLocale(Locale aLocale)
Check if the passed locale is a supported locale.
|
com.helger.commons.state.EChange |
registerLocale(Locale aLocale)
Register a new locale
|
com.helger.commons.state.EChange |
setDefaultLocale(Locale aDefaultLocale)
Set the default locale.
|
String |
toString() |
getAllGlobalSingletons, getGlobalSingleton, getGlobalSingletonIfInstantiated, isGlobalSingletonInstantiatedgetAllSingletons, getSingleton, getSingletonIfInstantiated, getSingletonScopeKey, isDestroyed, isInDestruction, isInInstantiation, isInPreDestruction, isInstantiated, isSingletonInstantiated, isUsableObject, onAfterInstantiation, onBeforeDestroy, onBeforeScopeDestruction, onDestroy, onScopeDestruction, readAbstractSingletonFields, setDestroyed, setInDestruction, setInInstantiation, setInPreDestruction, setInstantiated, writeAbstractSingletonFields@Deprecated @UsedViaReflection public GlobalLocaleManager()
@Nonnull public static GlobalLocaleManager getInstance()
@Nonnull public com.helger.commons.state.EChange registerLocale(@Nonnull Locale aLocale)
ILocaleManagerregisterLocale in interface ILocaleManageraLocale - The locale to be added. May not be null.EChange.@Nonnull public com.helger.commons.state.EChange setDefaultLocale(@Nonnull Locale aDefaultLocale)
ILocaleManagersetDefaultLocale in interface ILocaleManageraDefaultLocale - The locale to be used as the default. May not be null.EChange@Nullable public Locale getDefaultLocale()
getDefaultLocale in interface ILocaleManagernull if non is
defined@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<Locale> getAllAvailableLocales()
getAllAvailableLocales in interface ILocaleManagerpublic boolean hasLocales()
hasLocales in interface ILocaleManagertrue if at least one locale is present,
false otherwisepublic boolean isSupportedLocale(@Nullable Locale aLocale)
ILocaleManagerisSupportedLocale in interface ILocaleManageraLocale - The locale to checktrue if the passed locale is supported,
false otherwise.public String toString()
toString in class com.helger.scope.singleton.AbstractSingletonCopyright © 2014–2018 Philip Helger. All rights reserved.