Interface MessageBundle

All Known Implementing Classes:
EmptyMessageBundle, XtbMessageBundle

public interface MessageBundle
An interface for providing alternative values for user-visible messages in JavaScript code.
  • Method Details

    • idGenerator

      JsMessage.IdGenerator idGenerator()
      Gets the message ID generator to use to compute message IDs for this type of bundle.
      Returns:
      idGenerator instance or null if we do not want to use any custom id generation. In case if idGenerator is null caller should decide how to create id by itself. In the most cases using the message key is enough.
    • getMessage

      JsMessage getMessage(String id)
      Gets a message replacement.
      Parameters:
      id - the id of the message being replaced; the key is message ID generated by JsMessage.IdGenerator
      Returns:
      the message replacement, which may be null.
    • getAllMessages

      Iterable<JsMessage> getAllMessages()
      Returns an iterable over the keys that this object has replacements for.
      Returns:
      all messages from this bundle.