public class XWork2NuitonValidatorProvider extends AbstractNuitonValidatorProvider
| Modifier and Type | Class and Description |
|---|---|
protected static class |
XWork2NuitonValidatorProvider.ValidatorComparator |
protected static class |
XWork2NuitonValidatorProvider.ValidatorFilenameFilter |
AbstractNuitonValidatorProvider.ModelEntry<O>| Modifier and Type | Field and Description |
|---|---|
static String |
PROVIDER_NAME |
models, name| Constructor and Description |
|---|
XWork2NuitonValidatorProvider() |
| Modifier and Type | Method and Description |
|---|---|
SortedSet<NuitonValidator<?>> |
detectValidators(File sourceRoot,
Pattern contextFilter,
NuitonValidatorScope[] scopes,
Class<?>... types)
Detects in the given directory validators.
|
protected File |
getClassDir(File sourceRoot,
Class<?> clazz) |
protected String[] |
getContexts(Class<?> clazz,
File dir) |
protected String[] |
getContextsWithoutScopes(String[] contexts) |
protected String[] |
getFilterContexts(Pattern contextFilter,
String[] realContexts) |
protected <O> NuitonValidator<O> |
getValidator(Class<O> klass,
String context,
NuitonValidatorScope... scopes)
Pour un context et un type d'entité donné, instancie un validateur et
test si ce validateur est utilisable (i.e qu'il admet des champs à
valider).
|
<O> NuitonValidatorModel<O> |
newModel(Class<O> type,
String context,
NuitonValidatorScope... scopes)
Instanciate a new validator model for the given parameters.
|
<O> XWork2NuitonValidator<O> |
newValidator(NuitonValidatorModel<O> model)
Obtains a new validator for the given
model. |
getModel, getModels, getNamepublic static final String PROVIDER_NAME
public <O> NuitonValidatorModel<O> newModel(Class<O> type, String context, NuitonValidatorScope... scopes)
NuitonValidatorProviderO - type of the class to validatetype - type of the class to validatecontext - context of validation (null if no context)scopes - filtered scope (if nothing given, then use all scopes)public <O> XWork2NuitonValidator<O> newValidator(NuitonValidatorModel<O> model)
NuitonValidatorProvidermodel.O - type of class to validatemodel - the model of validator to usepublic SortedSet<NuitonValidator<?>> detectValidators(File sourceRoot, Pattern contextFilter, NuitonValidatorScope[] scopes, Class<?>... types)
NuitonValidatorProvidersourceRoot - root directory where to seek for validatorscontextFilter - the pattern of context to seekscopes - scopes to seek (if none given, will seek for all scopes)types - types of class to seekprotected <O> NuitonValidator<O> getValidator(Class<O> klass, String context, NuitonValidatorScope... scopes)
O - le type du beanklass - le type du beancontext - le context du validateurscopes - les scopes a utiliser (si null alors pas de
filtre sur les scopes)null si aucun scope
détecté dans le validateur.Copyright © 2013–2014 CodeLutin. All rights reserved.