Class XValidationResult

java.lang.Object
de.xima.fc.form.common.models.XValidationResult
All Implemented Interfaces:
IXValidationResult, Serializable

public class XValidationResult extends Object implements IXValidationResult
A simple POJO implementation of IXValidationResult.
Author:
XIMA MEDIA GmbH
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new validation result representing a successful validation (no validation error).
    XValidationResult(boolean valid)
    Creates a new validation result with an empty message.
    XValidationResult(boolean valid, String message)
    Creates a new validation result with the given message.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
    Deprecated.
    boolean
     
    void
    setMessage(String message)
    Deprecated.
    Do not modify this instance, use the appropriate constructor with the data you require.
    void
    setValid(boolean valid)
    Deprecated.
    Do not modify this instance, use the appropriate constructor with the data you require.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • XValidationResult

      public XValidationResult()
      Creates a new validation result representing a successful validation (no validation error).
    • XValidationResult

      public XValidationResult(boolean valid)
      Creates a new validation result with an empty message.
      Parameters:
      valid - Whether the submitted values were valid.
    • XValidationResult

      public XValidationResult(boolean valid, String message)
      Creates a new validation result with the given message.
      Parameters:
      valid - Whether the submitted values were valid.
      message - The error message to display in case the values are not valid.
  • Method Details

    • getMessage

      public String getMessage()
      Specified by:
      getMessage in interface IXValidationResult
      Returns:
      In case IXValidationResult.isValid() returns false, the error message that should be displayed.
    • setMessage

      @Deprecated public void setMessage(String message)
      Deprecated.
      Do not modify this instance, use the appropriate constructor with the data you require.
      Parameters:
      message - the message
    • getValid

      @Deprecated public boolean getValid()
      Deprecated.
      Returns:
      Use isValid().
    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface IXValidationResult
      Returns:
      Whether the submitted values are valid.
    • setValid

      @Deprecated public void setValid(boolean valid)
      Deprecated.
      Do not modify this instance, use the appropriate constructor with the data you require.
      Parameters:
      valid - Whether the submitted values are valid.