Class DefaultLocaleManager
- java.lang.Object
-
- com.atlassian.confluence.languages.DefaultLocaleManager
-
- All Implemented Interfaces:
LocaleManager
- Direct Known Subclasses:
TestingLocaleManager
@Deprecated public class DefaultLocaleManager extends Object implements LocaleManager
Deprecated.since 7.20 Replaced byDefaultLocaleManager
-
-
Field Summary
-
Fields inherited from interface com.atlassian.confluence.languages.LocaleManager
DEFAULT_LOCALE
-
-
Constructor Summary
Constructors Constructor Description DefaultLocaleManager()
Deprecated.since 7.5DefaultLocaleManager(SettingsManager settingsManager, UserAccessor userAccessor, LanguageManager languageManager, com.atlassian.vcache.VCacheFactory cacheFactory)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Locale
getLocale(com.atlassian.user.User user)
Deprecated.Returns the user's locale if they have one set in their preferences, otherwise returns the site default locale.@NonNull LocaleInfo
getLocaleInfo(@Nullable com.atlassian.user.User user)
Deprecated.Locale
getSiteDefaultLocale()
Deprecated.UserAccessor
getUserAccessor()
Deprecated.void
invalidateLocaleInfoCache(@Nullable com.atlassian.user.User user)
Deprecated.void
setCacheFactory(com.atlassian.vcache.VCacheFactory cacheFactory)
Deprecated.void
setCacheManager(com.atlassian.cache.CacheManager cacheManager)
Deprecated.since 5.10 UsesetCacheFactory(VCacheFactory)
void
setLanguage(String language)
Deprecated.Should set the language string as given by Locale (en-gb for example) in a THREAD LOCAL cache.void
setLanguageManager(LanguageManager languageManager)
Deprecated.void
setRequestLanguages(String languageString)
Deprecated.Should set the language string from the request in a THREAD LOCAL cache.void
setSettingsManager(SettingsManager settingsManager)
Deprecated.void
setUserAccessorGenerator(Supplier<UserAccessor> userAccessorSupplier)
Deprecated.void
setUserAccessorSupplier(com.atlassian.util.concurrent.Supplier<UserAccessor> userAccessorSupplier)
Deprecated.since 7.0.1.
-
-
-
Constructor Detail
-
DefaultLocaleManager
public DefaultLocaleManager(SettingsManager settingsManager, UserAccessor userAccessor, LanguageManager languageManager, com.atlassian.vcache.VCacheFactory cacheFactory)
Deprecated.- Since:
- 7.5
-
DefaultLocaleManager
@Deprecated public DefaultLocaleManager()
Deprecated.since 7.5
-
-
Method Detail
-
setUserAccessorSupplier
@Deprecated public void setUserAccessorSupplier(com.atlassian.util.concurrent.Supplier<UserAccessor> userAccessorSupplier)
Deprecated.since 7.0.1. UsesetUserAccessorGenerator(Supplier)
-
setUserAccessorGenerator
public void setUserAccessorGenerator(Supplier<UserAccessor> userAccessorSupplier)
Deprecated.- Since:
- 7.0.1
-
setCacheManager
@Deprecated public void setCacheManager(com.atlassian.cache.CacheManager cacheManager)
Deprecated.since 5.10 UsesetCacheFactory(VCacheFactory)
-
setCacheFactory
public void setCacheFactory(com.atlassian.vcache.VCacheFactory cacheFactory)
Deprecated.- Since:
- 5.10
-
setLanguageManager
public void setLanguageManager(LanguageManager languageManager)
Deprecated.
-
invalidateLocaleInfoCache
public final void invalidateLocaleInfoCache(@Nullable com.atlassian.user.User user)
Deprecated.- Specified by:
invalidateLocaleInfoCache
in interfaceLocaleManager
-
getLocaleInfo
public final @NonNull LocaleInfo getLocaleInfo(@Nullable com.atlassian.user.User user)
Deprecated.- Specified by:
getLocaleInfo
in interfaceLocaleManager
- Returns:
- a locale info with requested , selected and selection reason
-
getLocale
public Locale getLocale(com.atlassian.user.User user)
Deprecated.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
-
getSiteDefaultLocale
public Locale getSiteDefaultLocale()
Deprecated.- Specified by:
getSiteDefaultLocale
in interfaceLocaleManager
- Returns:
- The default site locale, or
LocaleManager.DEFAULT_LOCALE
if none is set.
-
setSettingsManager
public void setSettingsManager(SettingsManager settingsManager)
Deprecated.
-
getUserAccessor
public UserAccessor getUserAccessor()
Deprecated.
-
setRequestLanguages
public void setRequestLanguages(String languageString)
Deprecated.Description copied from interface:LocaleManager
Should set the language string from the request in a THREAD LOCAL cache.- Specified by:
setRequestLanguages
in interfaceLocaleManager
- Parameters:
languageString
- comma- or semicolon-separated languages
-
setLanguage
public void setLanguage(String language)
Deprecated.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 interfaceLocaleManager
- Parameters:
language
- target language
-
-