Class ValidationResult
java.lang.Object
org.pipservices3.commons.validate.ValidationResult
Result generated by schema validation
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of validation result.ValidationResult
(String path, ValidationResultType type, String code, String message, Object expected, Object actual) Creates a new instance of validation result and sets its values. -
Method Summary
Modifier and TypeMethodDescriptionGets the actual value found by schema validation.getCode()
Gets the error code.Gets the value expected by schema validation.Gets the human readable message.getPath()
Gets dot notation path of the validated element.getType()
Gets the type of the validation result: Information, Warning, or Error.void
void
void
setExpected
(Object value) void
setMessage
(String value) void
void
setType
(ValidationResultType value)
-
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
Gets dot notation path of the validated element.- Returns:
- the path of the validated element.
-
setPath
-
getType
Gets the type of the validation result: Information, Warning, or Error.- Returns:
- the type of the validation result.
- See Also:
-
setType
-
getCode
Gets the error code.- Returns:
- the error code
-
setCode
-
getMessage
Gets the human readable message.- Returns:
- the result message.
-
setMessage
-
getExpected
Gets the value expected by schema validation.- Returns:
- the expected value.
-
setExpected
-
getActual
Gets the actual value found by schema validation.- Returns:
- the actual value.
-
setActual
-