Class ValidationResult

java.lang.Object
org.pipservices3.commons.validate.ValidationResult

public class ValidationResult extends Object
Result generated by schema validation
  • Constructor Details

    • ValidationResult

      public ValidationResult()
      Creates a new instance of validation result.
    • ValidationResult

      public ValidationResult(String path, ValidationResultType type, String code, String message, Object expected, Object actual)
      Creates a new instance of validation result and sets its values.
      Parameters:
      path - a dot notation path of the validated element.
      type - a type of the validation result: Information, Warning, or Error.
      code - an error code.
      message - a human readable message.
      expected - an value expected by schema validation.
      actual - an actual value found by schema validation.
      See Also:
  • Method Details

    • getPath

      public String getPath()
      Gets dot notation path of the validated element.
      Returns:
      the path of the validated element.
    • setPath

      public void setPath(String value)
    • getType

      public ValidationResultType getType()
      Gets the type of the validation result: Information, Warning, or Error.
      Returns:
      the type of the validation result.
      See Also:
    • setType

      public void setType(ValidationResultType value)
    • getCode

      public String getCode()
      Gets the error code.
      Returns:
      the error code
    • setCode

      public void setCode(String value)
    • getMessage

      public String getMessage()
      Gets the human readable message.
      Returns:
      the result message.
    • setMessage

      public void setMessage(String value)
    • getExpected

      public Object getExpected()
      Gets the value expected by schema validation.
      Returns:
      the expected value.
    • setExpected

      public void setExpected(Object value)
    • getActual

      public Object getActual()
      Gets the actual value found by schema validation.
      Returns:
      the actual value.
    • setActual

      public void setActual(Object value)