public abstract class AbstractL10nCurrentLocaleProvider extends java.lang.Object implements L10nCurrentLocaleProviderI
L10nCurrentLocaleProviderI managing
the active session/thread locale and caching the resolved fallback chain.
Ensures the active language code is prepended at index 0 (if a locale is set)
and deduplicated against the underlying base fallback list. If locale is
null, no language is prepended and the base fallback list is returned.
DEFAULT_FALLBACKS| Constructor and Description |
|---|
AbstractL10nCurrentLocaleProvider(java.util.Locale locale) |
| Modifier and Type | Method and Description |
|---|---|
void |
flushCache()
Evicts the cached fallback chain, forcing recalculation on next access.
|
java.util.List<java.lang.String> |
getLanguageFallbackChain()
Resolves the deterministic, ordered language fallback chain.
|
java.util.Locale |
getLocale()
Returns the currently active base locale.
|
void |
setLocale(java.util.Locale locale)
Updates the active locale for this provider, triggering cache invalidation
for any resolved fallback chains if the locale has changed.
|
public AbstractL10nCurrentLocaleProvider(java.util.Locale locale)
public java.util.Locale getLocale()
L10nCurrentLocaleProviderIgetLocale in interface L10nCurrentLocaleProviderILocale, or null if uninitializedpublic void setLocale(java.util.Locale locale)
L10nFallbackProviderIsetLocale in interface L10nFallbackProviderIlocale - the new session locale; must not be nullpublic void flushCache()
public java.util.List<java.lang.String> getLanguageFallbackChain()
L10nFallbackProviderIgetLanguageFallbackChain in interface L10nFallbackProviderICopyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.