Class FieldValidation

java.lang.Object
com.aquima.interactions.composer.model.FieldValidation
All Implemented Interfaces:
IFieldValidation, Serializable

public class FieldValidation extends Object implements IFieldValidation
This class defines a single field validation.
Since:
7.1
Author:
O. Kerpershoek
See Also:
  • Field Details

  • Constructor Details

    • FieldValidation

      public FieldValidation(String type, boolean blocking, boolean essential, IMultilingualText message, Map<String,String> parameters)
      Constructor to create a field validation with a message.
      Parameters:
      type - The type name of the validation, may not be null.
      blocking - Indicating if the validation is blocking, may not be null.
      essential - Boolean indicating if the validation may be considered a fatal error, and further validation of the value is not needed, may not be null.
      message - The message that should be shown in case the validation fails, may not be null.
      parameters - The parameters of the validation, may be null.
  • Method Details

    • getTypeName

      public String getTypeName()
      Description copied from interface: IFieldValidation
      This method returns the type name of the validator that should be used for the field.
      Specified by:
      getTypeName in interface IFieldValidation
      Returns:
      The type name of the validator.
    • isBlocking

      public boolean isBlocking()
      Description copied from interface: IFieldValidation
      This method returns a boolean indicating if the validation is blocking is not successful.
      Specified by:
      isBlocking in interface IFieldValidation
      Returns:
      boolean indicating if the validation is blocking is not successful.
    • isEssential

      public boolean isEssential()
      Description copied from interface: IFieldValidation
      This method returns a boolean indicating if the validation may be considered a fatal error, and further validation of the value is not needed.
      Specified by:
      isEssential in interface IFieldValidation
      Returns:
      Boolean indicating that the validation is essential and must succeed for any further validation to be useful.
    • getMessage

      public IMultilingualText getMessage()
      Description copied from interface: IFieldValidation
      This method returns the message that should be shown in case the validation fails.
      Specified by:
      getMessage in interface IFieldValidation
      Returns:
      The message that should be shown in case the validation fails.
    • getMessageId

      public String getMessageId()
      Description copied from interface: IFieldValidation
      This method returns the message Id that should be shown in case the validation fails.
      Specified by:
      getMessageId in interface IFieldValidation
      Returns:
      The message id that should be shown in case the validation fails.
    • getParameterNames

      public String[] getParameterNames()
      Description copied from interface: IFieldValidation
      This method returns an array containing the parameter names for which a parameter value is defined.
      Specified by:
      getParameterNames in interface IFieldValidation
      Returns:
      array containing the parameter names for which a parameter value is defined.
    • getParameterValue

      public String getParameterValue(String key)
      Description copied from interface: IFieldValidation
      This method returns the value for the specified parameter name. If there is no value specified for the parameter, a null value is returned.
      Specified by:
      getParameterValue in interface IFieldValidation
      Parameters:
      key - The name of the parameter for which the value is requested.
      Returns:
      The value for the specified parameter.
    • toString

      public String toString()
      Overrides:
      toString in class Object