Class DefaultLocalizedValuesService

    • Constructor Detail

      • DefaultLocalizedValuesService

        public DefaultLocalizedValuesService()
    • Method Detail

      • getLanguageLabelKey

        public java.lang.String getLanguageLabelKey​(java.util.Locale locale)
        Description copied from interface: LocalizedValuesService
        Builds language label key based on given locale
        Specified by:
        getLanguageLabelKey in interface LocalizedValuesService
        Parameters:
        locale - an localized object to use
        Returns:
        key of the label
      • getSelectedLocaleOrDefault

        public java.util.Locale getSelectedLocaleOrDefault​(java.util.Map<java.util.Locale,​java.lang.Object> values)
        Description copied from interface: LocalizedValuesService
        Retrieves the first locale from the map if only one element is present Otherwise it returns default locale
        Specified by:
        getSelectedLocaleOrDefault in interface LocalizedValuesService
        Parameters:
        values - from which to retrieve locale
        Returns:
        the first locale from the map or default locale
      • getCurrentValue

        public java.lang.Object getCurrentValue​(java.util.Locale currentLocale,
                                                java.util.Map<java.util.Locale,​java.lang.Object> values)
        Description copied from interface: LocalizedValuesService
        Returns value from given map for given key
        Specified by:
        getCurrentValue in interface LocalizedValuesService
        Parameters:
        currentLocale - key based on which value is retrieved
        values - map from which value is retrieved
        Returns:
        value from given map for given key
      • setCockpitLocaleService

        public void setCockpitLocaleService​(CockpitLocaleService cockpitLocaleService)