Class DefaultLocaleManager

    • 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

      • setUserAccessorGenerator

        public void setUserAccessorGenerator​(Supplier<UserAccessor> userAccessorSupplier)
        Deprecated.
        Since:
        7.0.1
      • 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 interface LocaleManager
      • getLocaleInfo

        public final @NonNull LocaleInfo getLocaleInfo​(@Nullable com.atlassian.user.User user)
        Deprecated.
        Specified by:
        getLocaleInfo in interface LocaleManager
        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 interface LocaleManager
      • 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 interface LocaleManager
        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 interface LocaleManager
        Parameters:
        language - target language