Package org.hawaiiframework.validation
Class ValidationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.hawaiiframework.exception.HawaiiException
-
- org.hawaiiframework.validation.ValidationException
-
- All Implemented Interfaces:
Serializable
public class ValidationException extends HawaiiException
- Since:
- 2.0.0
- Author:
- Marcel Overdijk
- See Also:
ValidationResult
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ValidationException()
Constructs a newValidationException
with an emptyValidationResult
.ValidationException(List<ValidationError> validationErrors)
Constructs a newValidationException
with the suppliedValidationError
s.ValidationException(ValidationError validationError)
Constructs a newValidationException
with the suppliedValidationError
.ValidationException(ValidationResult validationResult)
Constructs a newValidationException
with the suppliedValidationResult
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValidationResult
getValidationResult()
Returns the validation result containing the validation errors.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ValidationException
public ValidationException()
Constructs a newValidationException
with an emptyValidationResult
.
-
ValidationException
public ValidationException(ValidationResult validationResult)
Constructs a newValidationException
with the suppliedValidationResult
.- Parameters:
validationResult
- the validation result, not null
-
ValidationException
public ValidationException(ValidationError validationError)
Constructs a newValidationException
with the suppliedValidationError
.- Parameters:
validationError
- the validation error, not null
-
ValidationException
public ValidationException(List<ValidationError> validationErrors)
Constructs a newValidationException
with the suppliedValidationError
s.- Parameters:
validationErrors
- the validation errors, not null
-
-
Method Detail
-
getValidationResult
public ValidationResult getValidationResult()
Returns the validation result containing the validation errors.- Returns:
- the validation result containing the validation errors
-
-