Class DefaultLocalizationService

    • Constructor Detail

      • DefaultLocalizationService

        public DefaultLocalizationService()
        Deprecated.
    • Method Detail

      • getLocaleByLanguage

        protected java.util.Locale getLocaleByLanguage​(Language lang)
        Deprecated.
        Returns the (cached) Locale by the given Language.
        Parameters:
        lang - the language
        Returns:
        the Locale
      • setCurrentLocale

        public void setCurrentLocale​(java.util.Locale loc)
        Deprecated.
        Specified by:
        setCurrentLocale in interface LocalizationService
        Parameters:
        loc - the new session locale
      • getDataLocale

        public java.util.Locale getDataLocale​(java.util.Locale loc)
        Deprecated.
        Specified by:
        getDataLocale in interface LocalizationService
        Parameters:
        loc - the locale to match
      • getDataLanguageIsoCode

        public java.lang.String getDataLanguageIsoCode​(java.util.Locale locale)
        Deprecated.
        Specified by:
        getDataLanguageIsoCode in interface LocalizationService
        Parameters:
        locale - the locale to get data language code for
      • getLocaleMatchKey

        protected java.util.Locale[] getLocaleMatchKey​(java.util.Locale requested)
        Deprecated.
      • getMatchingPkForDataLocale

        public PK getMatchingPkForDataLocale​(java.util.Locale locale)
        Deprecated.
        Description copied from interface: LocalizationService
        Returns proper language PK for matching locale.
        Specified by:
        getMatchingPkForDataLocale in interface LocalizationService
        Parameters:
        locale - the locale to get data language code for
        Returns:
        language pk
      • getSupportedDataLocales

        public java.util.Set<java.util.Locale> getSupportedDataLocales()
        Deprecated.
        Specified by:
        getSupportedDataLocales in interface LocalizationService
        Returns:
        a Set of Locales for the current system.
      • getSupportedLocales

        protected java.util.Map<java.util.Locale,​DefaultLocalizationService.DataLocale> getSupportedLocales()
        Deprecated.
        Each hybris Language is encapsulates into a DefaultLocalizationService.DataLocale and is put with the corresponding Locale into the map. Additionally each of those items are cached.

        We added to JaloTypeCacheUnit unit additional unique value for a current user, nevertheless changes of the supported locales list for a one user in scope of different tenants , still might cause problems (see HOR-893). Note also the memory impact - for a every user there will be separate cache of supported locales created.

        Returns:
        a map where Locale are mapped to DefaultLocalizationService.DataLocale
      • isLocalizationFallbackEnabled

        public boolean isLocalizationFallbackEnabled()
        Deprecated.
        Specified by:
        isLocalizationFallbackEnabled in interface LocalizationService
        Returns:
        true if in the current JaloSession the localization fallback is enabled.
      • setLocalizationFallbackEnabled

        public void setLocalizationFallbackEnabled​(boolean enabled)
        Deprecated.
        Specified by:
        setLocalizationFallbackEnabled in interface LocalizationService
        Parameters:
        enabled - if true the localization fallback will be enabled.
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Deprecated.
        Description copied from class: AbstractService
        Invoked by a BeanFactory after it has set all bean properties supplied. Overwrite this method for adding/implementing additional code into the service. Important note: Please call always super.afterPropertiesSet() before or the java serialization won't work.
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Overrides:
        afterPropertiesSet in class AbstractService
        Throws:
        java.lang.Exception
        See Also:
        InitializingBean.afterPropertiesSet()