Class MessageService

java.lang.Object
org.apache.olingo.odata2.core.exception.MessageService

public class MessageService extends Object
  • Method Details

    • getInstance

      public static MessageService getInstance(Locale locale)
    • isLocaleSupported

      public static boolean isLocaleSupported(Locale locale)
    • getSupportedLocale

      public static Locale getSupportedLocale(List<Locale> locales)
      Return first found supported Locale (iterating over list starting with first element). If no Locale is supported NULL is returned.
      Parameters:
      locales -
      Returns:
      first supported Locale or NULL.
    • getSupportedLocale

      public static Locale getSupportedLocale(List<Locale> locales, Locale defaultLocale)
      Return first found supported Locale (iterating over list starting with first element). If no Locale is supported given defaultLocale is returned.
      Parameters:
      locales - to be checked locales
      defaultLocale - local which is returned if no supported local is in given locales list
      Returns:
      first supported Locale or given defaultLocale.
    • getInstance

      public static MessageService getInstance(List<Locale> locales)
    • getMessage

      public static MessageService.Message getMessage(Locale language, MessageReference context)
    • getMessage

      public static MessageService.Message getMessage(Locale locale, String key, Object... replacements)
    • getLocale

      public Locale getLocale()
    • getKeys

      public Enumeration<String> getKeys()