Interface LocalizedValuesService

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object getCurrentValue​(java.util.Locale currentLocale, java.util.Map<java.util.Locale,​java.lang.Object> values)
      Returns value from given map for given key
      java.lang.String getLanguageLabelKey​(java.util.Locale locale)
      Builds language label key based on given locale
      java.util.Locale getSelectedLocaleOrDefault​(java.util.Map<java.util.Locale,​java.lang.Object> values)
      Retrieves the first locale from the map if only one element is present Otherwise it returns default locale
    • Method Detail

      • getLanguageLabelKey

        java.lang.String getLanguageLabelKey​(java.util.Locale locale)
        Builds language label key based on given locale
        Parameters:
        locale - an localized object to use
        Returns:
        key of the label
      • getSelectedLocaleOrDefault

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

        java.lang.Object getCurrentValue​(java.util.Locale currentLocale,
                                         java.util.Map<java.util.Locale,​java.lang.Object> values)
        Returns value from given map for given key
        Parameters:
        currentLocale - key based on which value is retrieved
        values - map from which value is retrieved
        Returns:
        value from given map for given key