Package org.nuiton.validator.xwork2
Class XWork2NuitonValidator<O>
java.lang.Object
org.nuiton.validator.xwork2.XWork2NuitonValidator<O>
- All Implemented Interfaces:
NuitonValidator<O>
public class XWork2NuitonValidator<O> extends java.lang.Object implements NuitonValidator<O>
Implementation of
NuitonValidator using XWork2 validators.- Since:
- 2.0
- Author:
- Tony Chemit - chemit@codelutin.com
-
Field Summary
Fields Modifier and Type Field Description protected NuitonValidatorModel<O>modelprotected java.util.Map<NuitonValidatorScope,XWork2ScopeValidator<O>>validatorsxworks scope validators * -
Constructor Summary
Constructors Constructor Description XWork2NuitonValidator(NuitonValidatorModel<O> model) -
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.
-
Field Details
-
model
-
validators
xworks scope validators *
-
-
Constructor Details
-
Method Details
-
validate
Description copied from interface:NuitonValidatorValidates the given object and returns the result of validation.- Specified by:
validatein interfaceNuitonValidator<O>- Parameters:
object- the object to validate- Returns:
- the result of validation for the given object
- Throws:
java.lang.NullPointerException- if object isnull.
-
getEffectiveScopes
Description copied from interface:NuitonValidatorObtains 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.- Specified by:
getEffectiveScopesin interfaceNuitonValidator<O>- Returns:
- the set of effective scopes of the validator
-
getEffectiveFields
public java.util.Set<java.lang.String> getEffectiveFields()Description copied from interface:NuitonValidatorObtains 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.- Specified by:
getEffectiveFieldsin interfaceNuitonValidator<O>- Returns:
- the set of effective fields of the validator
-
getEffectiveFields
Description copied from interface:NuitonValidatorObtains 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.- Specified by:
getEffectiveFieldsin interfaceNuitonValidator<O>- Parameters:
scope- given scope to use- Returns:
- the set of effective fields of the validator for the given scope
-
getModel
Description copied from interface:NuitonValidatorObtains the model of the validator.- Specified by:
getModelin interfaceNuitonValidator<O>- Returns:
- the model of the validator
-