Package com.atlassian.confluence.it
Class TestingLocaleManager
- java.lang.Object
-
- com.atlassian.confluence.languages.DefaultLocaleManager
-
- com.atlassian.confluence.it.TestingLocaleManager
-
- All Implemented Interfaces:
LocaleManager
public class TestingLocaleManager extends DefaultLocaleManager
-
-
Field Summary
-
Fields inherited from interface com.atlassian.confluence.languages.LocaleManager
DEFAULT_LOCALE
-
-
Constructor Summary
Constructors Constructor Description TestingLocaleManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Locale
getLocale(com.atlassian.user.User user)
Returns the user's locale if they have one set in their preferences, otherwise returns the site default locale.-
Methods inherited from class com.atlassian.confluence.languages.DefaultLocaleManager
getLocaleInfo, getSiteDefaultLocale, getUserAccessor, invalidateLocaleInfoCache, setCacheFactory, setCacheManager, setLanguage, setLanguageManager, setRequestLanguages, setSettingsManager, setUserAccessorGenerator, setUserAccessorSupplier
-
-
-
-
Method Detail
-
getLocale
public Locale getLocale(com.atlassian.user.User user)
Description copied from class:DefaultLocaleManager
Returns the user's locale if they have one set in their preferences, otherwise returns the site default locale. Caches the result in the thread-local cache so we only check the preference or settings once per request.- Specified by:
getLocale
in interfaceLocaleManager
- Overrides:
getLocale
in classDefaultLocaleManager
-
-