Package org.nuiton.validator
Class NuitonValidatorModel<O>
- java.lang.Object
-
- org.nuiton.validator.NuitonValidatorModel<O>
-
- All Implemented Interfaces:
Serializable
public class NuitonValidatorModel<O> extends Object implements Serializable
Represents the model of aNuitonValidator. This model describing properties of a validator :type: the type of object which can be validated by the validatorcontext: the context of validation, if no context is required then the context isnull.scopes: the scopes of validation (seeNuitonValidatorScope)fields: the fields that can be validated by the validator
- Since:
- 2.0
- Author:
- Tony Chemit - chemit@codelutin.com
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected StringcontextContext of validation (can benull, for no context).protected Map<NuitonValidatorScope,String[]>fieldsSet of fields that can be validated for the type and contextprotected Set<NuitonValidatorScope>scopesSet of scopes that can be validated for the type and contextprotected Class<O>typeType of object to validate
-
Constructor Summary
Constructors Constructor Description NuitonValidatorModel(Class<O> type, String context, Set<NuitonValidatorScope> scopes, Map<NuitonValidatorScope,String[]> fields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContext()Map<NuitonValidatorScope,String[]>getFields()Set<NuitonValidatorScope>getScopes()Class<O>getType()
-
-
-
Field Detail
-
context
protected String context
Context of validation (can benull, for no context).
-
scopes
protected Set<NuitonValidatorScope> scopes
Set of scopes that can be validated for the type and context
-
fields
protected Map<NuitonValidatorScope,String[]> fields
Set of fields that can be validated for the type and context
-
-
Constructor Detail
-
NuitonValidatorModel
public NuitonValidatorModel(Class<O> type, String context, Set<NuitonValidatorScope> scopes, Map<NuitonValidatorScope,String[]> fields)
-
-
Method Detail
-
getContext
public String getContext()
-
getScopes
public Set<NuitonValidatorScope> getScopes()
-
getFields
public Map<NuitonValidatorScope,String[]> getFields()
-
-