public interface ValidationResponse
Response from a validation context after processing all checks.
-
Method Summary
Modifier and TypeMethodDescriptionmessage()Message describing the validation failure(s).Convert this response to aValidationException.booleanvalid()True if this is a valid response.All violations of this response.
-
Method Details
-
valid
boolean valid()True if this is a valid response.- Returns:
trueif this is a valid response,falseotherwise
-
message
String message()Message describing the validation failure(s).- Returns:
- message describing the validation failure(s)
-
violations
List<ConstraintViolation> violations()All violations of this response.- Returns:
- list of violations
-
toException
ValidationException toException()Convert this response to aValidationException.- Returns:
- a new exception with all violations from this response
- Throws:
IllegalStateException- if this response is not failed
-