Class ComposerErrorMessage

java.lang.Object
com.aquima.interactions.composer.model.ComposerErrorMessage
All Implemented Interfaces:
IMessage, Serializable

public class ComposerErrorMessage extends Object implements IMessage
This class holds an error or warning message for a field or page.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • ComposerErrorMessage

      public ComposerErrorMessage(String source, IMultilingualText text)
      Construct an ErrorMessage with isError = true.
      Parameters:
      source - The object/rule sending the error message.
      text - The text object containing the content of the message.
    • ComposerErrorMessage

      public ComposerErrorMessage(String source, IMultilingualText text, boolean isWarning)
      Constructs the message with a text object and a boolean indicating if the message is a warning or an error.
      Parameters:
      source - The object/rule sending the error message.
      text - The text object containing the content of the message.
      isWarning - Boolean indicating if the message is a warning.
    • ComposerErrorMessage

      public ComposerErrorMessage(String source, IMultilingualText text, Throwable trace, boolean isWarning)
      Constructs the message with a text object and a boolean indicating if the message is a warning or an error.
      Parameters:
      source - The object/rule sending the error message.
      text - The text object containing the content of the message.
      trace - The cause of the message.
      isWarning - Boolean indicating if the message is a warning.
  • Method Details

    • getText

      public IMultilingualText getText()
      Description copied from interface: IMessage
      This method returns a text object containing the actual content of the message.
      Specified by:
      getText in interface IMessage
      Returns:
      a text object containing the actual content of the message.
    • getTrace

      public Throwable getTrace()
      Description copied from interface: IMessage
      This method returns the cause of the error or warning message.
      Specified by:
      getTrace in interface IMessage
      Returns:
      The cause of the message, or null when not available.
    • isError

      public boolean isError()
      Description copied from interface: IMessage
      This method returns a boolean indicating if the message is an error message.
      Specified by:
      isError in interface IMessage
      Returns:
      a boolean indicating if the message is an error message.
    • isWarning

      public boolean isWarning()
      Description copied from interface: IMessage
      This method returns a boolean indicating if the message is a warning message.
      Specified by:
      isWarning in interface IMessage
      Returns:
      a boolean indicating if the message is a warning message.
    • getSource

      public String getSource()
      Description copied from interface: IMessage
      This method returns the object causing this message to be created.
      Specified by:
      getSource in interface IMessage
      Returns:
      The source of the message.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object