com.atlassian.confluence.setup
Class SetupLocaleManager
java.lang.Object
com.atlassian.confluence.setup.SetupLocaleManager
- All Implemented Interfaces:
- LocaleManager
public class SetupLocaleManager
- extends java.lang.Object
- implements 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
Constructor Summary |
SetupLocaleManager(com.atlassian.config.ApplicationConfiguration applicationConfiguration)
|
Method Summary |
java.util.Locale |
getLocale(com.atlassian.user.User user)
|
java.util.Locale |
getSiteDefaultLocale()
|
void |
setLanguage(java.lang.String selectedLanguage)
Should set the language string as given by Locale (en-gb for example) in a THREAD LOCAL cache. |
void |
setRequestLanguages(java.lang.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, wait |
SetupLocaleManager
public SetupLocaleManager(com.atlassian.config.ApplicationConfiguration applicationConfiguration)
getSiteDefaultLocale
public java.util.Locale getSiteDefaultLocale()
- Specified by:
getSiteDefaultLocale
in interface LocaleManager
- Returns:
- The default site locale, or
LocaleManager.DEFAULT_LOCALE
if none is set.
getLocale
public java.util.Locale getLocale(com.atlassian.user.User user)
- Specified by:
getLocale
in interface LocaleManager
setRequestLanguages
public void setRequestLanguages(java.lang.String languageString)
- Description copied from interface:
LocaleManager
- Should set the language string from the request in a THREAD LOCAL cache.
- Specified by:
setRequestLanguages
in interface LocaleManager
setLanguage
public void setLanguage(java.lang.String selectedLanguage)
- Description copied from interface:
LocaleManager
- Should 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:
setLanguage
in interface LocaleManager
Copyright © 2003-2013 Atlassian. All Rights Reserved.