com.atlassian.confluence.it
Class TestingLocaleManager

java.lang.Object
  extended by com.atlassian.confluence.languages.DefaultLocaleManager
      extended by com.atlassian.confluence.it.TestingLocaleManager
All Implemented Interfaces:
LocaleManager, org.springframework.beans.factory.InitializingBean

public class TestingLocaleManager
extends DefaultLocaleManager


Field Summary
 
Fields inherited from interface com.atlassian.confluence.languages.LocaleManager
DEFAULT_LOCALE
 
Constructor Summary
TestingLocaleManager()
           
 
Method Summary
 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
afterPropertiesSet, getSiteDefaultLocale, getUserAccessor, setCacheManager, setLanguage, setLanguageManager, setRequestLanguages, setSettingsManager, setUserAccessorSupplier, toLocale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestingLocaleManager

public TestingLocaleManager()
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 interface LocaleManager
Overrides:
getLocale in class DefaultLocaleManager


Copyright © 2003-2013 Atlassian. All Rights Reserved.