Interface MessageResolver

  • All Superinterfaces:
    Serializable
    All Known Implementing Classes:
    DefaultMessageResolver

    public interface MessageResolver
    extends Serializable
    Implementations have to resolve the text stored for a given key in the message source they are aware of. Implementations should always be @Dependent scoped!
    • Field Detail

    • Method Detail

      • getMessage

        String getMessage​(MessageContext messageContext,
                          String messageTemplate,
                          String category)
        Parameters:
        messageContext - messageContext which should be used
        messageTemplate - the message key (or inline text) of the current message
        category - the category of the message, e.g. 'longText'. Can be null
        Returns:
        the final but not interpolated message text or null if an error happened or the resource could not be resolved.