Package org.nuiton.validator
Interface NuitonValidator<O>
- All Known Implementing Classes:
XWork2NuitonValidator
public interface NuitonValidator<O>
Contract of a validator.
To obtain validator, see the
NuitonValidatorFactory api.- Since:
- 2.0
- Author:
- Tony Chemit - chemit@codelutin.com
- See Also:
NuitonValidatorFactory
-
Method Summary
Modifier and Type Method Description java.util.Set<java.lang.String>getEffectiveFields()Obtains the set of effective fields for the validator : means the very fields validated by the validator.java.util.Set<java.lang.String>getEffectiveFields(NuitonValidatorScope scope)Obtains the set of effective fields for the validator for the given scope : means the very fields validated by the validator.java.util.Set<NuitonValidatorScope>getEffectiveScopes()Obtains the set of effective scopes for the validator : means the very scopes that the validator is dealing with.NuitonValidatorModel<O>getModel()Obtains the model of the validator.NuitonValidatorResultvalidate(O object)Validates the given object and returns the result of validation.
-
Method Details
-
validate
Validates the given object and returns the result of validation.- Parameters:
object- the object to validate- Returns:
- the result of validation for the given object
- Throws:
java.lang.NullPointerException- if object isnull.
-
getModel
NuitonValidatorModel<O> getModel()Obtains the model of the validator.- Returns:
- the model of the validator
-
getEffectiveScopes
java.util.Set<NuitonValidatorScope> getEffectiveScopes()Obtains the set of effective scopes for the validator : means the very scopes that the validator is dealing with. This is a subset of the model authorized scopes.- Returns:
- the set of effective scopes of the validator
-
getEffectiveFields
java.util.Set<java.lang.String> getEffectiveFields()Obtains the set of effective fields for the validator : means the very fields validated by the validator. This is a sub set of fields of the object to validate.- Returns:
- the set of effective fields of the validator
-
getEffectiveFields
Obtains the set of effective fields for the validator for the given scope : means the very fields validated by the validator. This is a subset of effective fields of the validator.- Parameters:
scope- given scope to use- Returns:
- the set of effective fields of the validator for the given scope
-