Interface MessageCode


  • public interface MessageCode
    A message code that includes both the code and the template.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.lang.String getCode()
      Get the code that uniquely identifies this within the given context
      default java.lang.String getMessage​(java.lang.Object... args)
      Get the message translated to the current locale.
      default java.lang.String getMessage​(java.util.Locale locale, java.lang.Object... args)
      Get the message translated to the specified locale.
      java.lang.String getMessageTemplate()
      Get the message template, in English
    • Method Detail

      • getCode

        java.lang.String getCode()
        Get the code that uniquely identifies this within the given context
      • getMessageTemplate

        java.lang.String getMessageTemplate()
        Get the message template, in English
      • getMessage

        default java.lang.String getMessage​(java.lang.Object... args)
        Get the message translated to the current locale. See I18n for more information on how to set this.
        Parameters:
        args -
        Returns:
      • getMessage

        default java.lang.String getMessage​(java.util.Locale locale,
                                            java.lang.Object... args)
        Get the message translated to the specified locale. See I18n for more information on how to set this.
        Parameters:
        args -
        Returns: