public interface ValidationExceptionHandler<R>
Instances of this class are NOT thread safe as they collect data during the validation process.
Modifier and Type | Method and Description |
---|---|
boolean |
hasFailed()
Returns a boolean flag indicating whether a validation was successful or not.
|
void |
onExceptions(ValidationException... exceptions)
Called in case of validation rule violations.
|
R |
result()
Returns an overall validation result based on an aggregation of all
exceptions thrown during the validation process.
|
void |
setValidationSubject(Object subject)
Should be called before validation starts.
|
void onExceptions(ValidationException... exceptions)
exceptions
- the exceptions that describe the validatin errorsR result() throws HL7Exception
HL7Exception
- if an error occurred during calculating the resultvoid setValidationSubject(Object subject)
subject
- subject to be validatedCopyright © 2001–2017 University Health Network. All rights reserved.