Package com.atlassian.confluence.setup
Class SetupLocaleManager
java.lang.Object
com.atlassian.confluence.setup.SetupLocaleManager
- All Implemented Interfaces:
LocaleManager
Minimum implementation for the setup context.
Does not allow write operations, which are supposed to be cached for the request or user, since there is no user in
the setup context. Will always delegate to the getSiteDefaultLocale() even if a user is supplied.
- Since:
- 5.0
-
Field Summary
Fields inherited from interface com.atlassian.confluence.languages.LocaleManager
DEFAULT_LOCALE -
Constructor Summary
ConstructorsConstructorDescriptionSetupLocaleManager(com.atlassian.config.ApplicationConfiguration applicationConfiguration) -
Method Summary
Modifier and TypeMethodDescriptiongetLocale(com.atlassian.user.User user) voidsetLanguage(String selectedLanguage) Should set the language string as given by Locale (en-gb for example) in a THREAD LOCAL cache.voidsetRequestLanguages(String languageString) Should set the language string from the request in a THREAD LOCAL cache.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.languages.LocaleManager
getLocaleInfo, invalidateLocaleInfoCache
-
Constructor Details
-
SetupLocaleManager
public SetupLocaleManager(com.atlassian.config.ApplicationConfiguration applicationConfiguration)
-
-
Method Details
-
getSiteDefaultLocale
- Specified by:
getSiteDefaultLocalein interfaceLocaleManager- Returns:
- The default site locale, or
LocaleManager.DEFAULT_LOCALEif none is set.
-
getLocale
- Specified by:
getLocalein interfaceLocaleManager
-
setRequestLanguages
Description copied from interface:LocaleManagerShould set the language string from the request in a THREAD LOCAL cache.- Specified by:
setRequestLanguagesin interfaceLocaleManager- Parameters:
languageString- comma- or semicolon-separated languages
-
setLanguage
Description copied from interface:LocaleManagerShould set the language string as given by Locale (en-gb for example) in a THREAD LOCAL cache. Does nothing if the language string is invalid.- Specified by:
setLanguagein interfaceLocaleManager- Parameters:
selectedLanguage- target language
-