Interface Message


public interface Message
Defines behaviour of validation messages. These messages have a unique string identifier as well as the previous message and sub-message strings.
Author:
Carl Wilson carlwilson AT github
  • Method Details

    • getId

      String getId()
      Get the unique, persistent message identifier.
      Returns:
      the String message id.
    • getTimestamp

      Date getTimestamp()
      Get the message timestamp
      Returns:
      the Date timestamp of the message, or null if not set
    • getSeverity

      Message.Severity getSeverity()
      Get the message severity
      Returns:
      the Message.Severity of the message
    • getMessage

      String getMessage()
      Get the main message
      Returns:
      the String message
    • hasSubMessage

      boolean hasSubMessage()
      Test whether the message has a sub-message
      Returns:
      true if the message has a sub-message, false otherwise
    • getSubMessage

      String getSubMessage()
      Get the sub-message
      Returns:
      the String sub-message
    • isError

      boolean isError()
      Test whether the message has Message.Severity ERROR.
      Returns:
      true if the message has Severity.ERROR, false otherwise
    • isFatal

      boolean isFatal()
      Test whether the message has Message.Severity FATAL.
      Returns:
      true if the message has Severity.FATAL, false otherwise
    • isInfo

      boolean isInfo()
      Test whether the message has Message.Severity INFO.
      Returns:
      true if the message has Severity.INFO, false otherwise
    • isWarning

      boolean isWarning()
      Test whether the message has Message.Severity WARNING.
      Returns:
      true if the message has Severity.WARNING, false otherwise