org.nuiton.validator
Class AbstractNuitonValidatorProvider

java.lang.Object
  extended by org.nuiton.validator.AbstractNuitonValidatorProvider
All Implemented Interfaces:
NuitonValidatorProvider
Direct Known Subclasses:
XWork2NuitonValidatorProvider

public abstract class AbstractNuitonValidatorProvider
extends Object
implements NuitonValidatorProvider

Abstract provider of validator.

Since:
2.0
Author:
tchemit

Nested Class Summary
protected static class AbstractNuitonValidatorProvider.ModelEntry<O>
           
 
Field Summary
protected  Map<AbstractNuitonValidatorProvider.ModelEntry<?>,NuitonValidatorModel<?>> models
           
protected  String name
           
 
Constructor Summary
AbstractNuitonValidatorProvider(String name)
           
 
Method Summary
<O> NuitonValidatorModel<O>
getModel(Class<O> type, String context, NuitonValidatorScope... scopes)
          Obtain a validator model, the model should be cached and not be reinstanciated at each time a validator model is asked.
protected  Map<AbstractNuitonValidatorProvider.ModelEntry<?>,NuitonValidatorModel<?>> getModels()
           
 String getName()
          Obtains the name of the provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuiton.validator.NuitonValidatorProvider
detectValidators, newModel, newValidator
 

Field Detail

models

protected Map<AbstractNuitonValidatorProvider.ModelEntry<?>,NuitonValidatorModel<?>> models

name

protected final String name
Constructor Detail

AbstractNuitonValidatorProvider

public AbstractNuitonValidatorProvider(String name)
Method Detail

getModel

public <O> NuitonValidatorModel<O> getModel(Class<O> type,
                                            String context,
                                            NuitonValidatorScope... scopes)
Description copied from interface: NuitonValidatorProvider
Obtain a validator model, the model should be cached and not be reinstanciated at each time a validator model is asked.

Specified by:
getModel in interface NuitonValidatorProvider
Type Parameters:
O - type of the class to validate
Parameters:
type - type of the class to validate
context - context of validation (null if no context)
scopes - filtered scope (if nothing given, then use all scopes)
Returns:
the cached model of validation

getModels

protected Map<AbstractNuitonValidatorProvider.ModelEntry<?>,NuitonValidatorModel<?>> getModels()

getName

public String getName()
Description copied from interface: NuitonValidatorProvider
Obtains the name of the provider.

Specified by:
getName in interface NuitonValidatorProvider
Returns:
the name of the provider.


Copyright © 2011-2012 CodeLutin. All Rights Reserved.