Interface IMessageProvider


public interface IMessageProvider
Provides internationalized messages. Implementations provide functionality similar to IProject.getMessage(String), but can be called outside the context of a project.
Since:
10.1
Author:
Petru Galanton
  • Method Summary

    Modifier and Type
    Method
    Description
    getMessage(String messageKey)
    Returns the message with the given key in the default language.
    getMessage(String messageKey, String languageCode)
    Returns the message with the given key in the given language.
  • Method Details

    • getMessage

      String getMessage(String messageKey, String languageCode)
      Returns the message with the given key in the given language.

      If the message for the given key cannot be found for the given language, the message is returned in the default language. Passing a null languageCode is equivalent to calling getMessage(String) and will return the message with the given key in the default language.

      Parameters:
      messageKey - the key of the message (not null).
      languageCode - the code of the desired language (may be null).
      Returns:
      the message in the desired language.
      Throws:
      com.aquima.interactions.metamodel.exception.UnknownMessageException - if the message cannot be found in the desired and default languages.
    • getMessage

      String getMessage(String messageKey)
      Returns the message with the given key in the default language.
      Parameters:
      messageKey - the key of the message (not null).
      Returns:
      the message in the default language.
      Throws:
      com.aquima.interactions.metamodel.exception.UnknownMessageException - if the message cannot be found.