Class ValidationMessage

java.lang.Object
com.aquima.interactions.rule.validation.ValidationMessage
All Implemented Interfaces:
IValidationMessage

public class ValidationMessage extends Object implements IValidationMessage
This class holds the message of a single validation action.
Since:
5.0
Author:
O. Kerpershoek
  • Constructor Details

    • ValidationMessage

      public ValidationMessage(String name, boolean warning, IMultilingualText message)
      Constructs the validation message with the required parameters.
      Parameters:
      name - The name of the validation rule that generated the message.
      warning - Boolean indicating if the message should be treaded as warning instead of error.
      message - The message explaining the cause of the validation failure.
  • Method Details

    • getValidationName

      public String getValidationName()
      Description copied from interface: IValidationMessage
      This method returns the name of the validation rule that failed.
      Specified by:
      getValidationName in interface IValidationMessage
      Returns:
      the name of the validation rule that failed.
    • isWarning

      public boolean isWarning()
      Description copied from interface: IValidationMessage
      This method returns a boolean indicating if the failure is considered a warning.
      Specified by:
      isWarning in interface IValidationMessage
      Returns:
      boolean indicating if the failure is considered a warning.
    • isError

      public boolean isError()
      Description copied from interface: IValidationMessage
      This method returns a boolean indicating if the failure is considered an error.
      Specified by:
      isError in interface IValidationMessage
      Returns:
      boolean indicating if the failure is considered an error.
    • getText

      public IMultilingualText getText()
      Description copied from interface: IValidationMessage
      This method returns a text explaining the validation failure.
      Specified by:
      getText in interface IValidationMessage
      Returns:
      text explaining the validation failure.