Package org.nuiton.validator
Package of Nuiton-validator api.
The Validator api
The NuitonValidator
is the object responsible
to launch validation for a given object and then return the result of
validation in a NuitonValidatorResult
via the
method NuitonValidator.validate(Object)
.
NuitonValidator<O> validator = XXX; NuitonValidatorResult result = validator.validate(o);
Obtain a validator
To obtain a validator use the factory of validators :NuitonValidatorFactory
.
NuitonValidator<O> validator = NuitonValidatorFactory.newValidator(O.class);
Implements the validator api
At the moment, there is an offered implementation based on xwork2 framework. To be continued...- Since:
- 2.0
-
Interface Summary Interface Description NuitonValidator<O> Contract of a validator.NuitonValidatorProvider Provider ofNuitonValidator
. -
Class Summary Class Description AbstractNuitonValidatorProvider Abstract provider of validator.AbstractNuitonValidatorProvider.ModelEntry<O> NuitonValidatorFactory Factory to obtain new validators.NuitonValidatorModel<O> Represents the model of aNuitonValidator
.NuitonValidatorResult Contains validation messages coming from the methodNuitonValidator.validate(Object)
.NuitonValidatorResult.FieldMap<V> -
Enum Summary Enum Description NuitonValidatorScope The differents levels of messages in validation process.