public class ValidationEngine extends Object implements ValidationOperations
Validator objects able to verify the requirements necessary for a subject to be valid.ValidationException is thrown, by default, the
validation process ends with an ExitStatus.FAILED, ExitStatus.COMPLETED otherwise. Validators in the validation
chain even if a ValidationException is thrown.| Constructor and Description |
|---|
ValidationEngine()
Creates an instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
addValidationChain(ValidationChain chain) |
void |
addValidator(Validator validator)
Add a
Validator to the set |
void |
setExecutionMode(ExecutionMode executionMode)
Sets the strict mode on/off.
|
Optional<Validator> |
tryFindValidator(String validatorName) |
ValidationContext |
validate(Object subject) |
ValidationContext |
validate(Object subject,
ValidationExecutionCallback callback) |
public void addValidator(Validator validator)
Validator to the setvalidator - the validatorpublic void addValidationChain(ValidationChain chain)
chain - public ValidationContext validate(Object subject)
validate in interface ValidationOperationspublic ValidationContext validate(Object subject, ValidationExecutionCallback callback)
validate in interface ValidationOperationspublic void setExecutionMode(ExecutionMode executionMode)
strict - if false the strict-mode is deactivatedCopyright © 2018 Latitude Srls. All rights reserved.