org.nuiton.validator
Class NuitonValidatorFactory
java.lang.Object
org.nuiton.validator.NuitonValidatorFactory
public class NuitonValidatorFactory
- extends Object
Factory to obtain new validators.
The factory contains a cache of NuitonValidatorModel.
To obtain a new validator with no context, use this code :
NuitonValidator validator = NuitonValidatorFactory.newValidator(O.class);
- Since:
- 2.0
- Author:
- tchemit
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultProviderName
protected static String defaultProviderName
providers
protected static Map<String,NuitonValidatorProvider> providers
NuitonValidatorFactory
protected NuitonValidatorFactory()
newValidator
public static <O> NuitonValidator<O> newValidator(Class<O> type,
NuitonValidatorScope... scopes)
newValidator
public static <O> NuitonValidator<O> newValidator(Class<O> type,
String context,
NuitonValidatorScope... scopes)
newValidator
public static <O> NuitonValidator<O> newValidator(String providerName,
Class<O> type,
String context,
NuitonValidatorScope... scopes)
throws NullPointerException
- Throws:
NullPointerException
getProviders
public static Map<String,NuitonValidatorProvider> getProviders()
getProvider
public static NuitonValidatorProvider getProvider(String providerName)
throws IllegalArgumentException,
NullPointerException
- Throws:
IllegalArgumentException
NullPointerException
getDefaultProvider
public static NuitonValidatorProvider getDefaultProvider()
getDefaultProviderName
public static String getDefaultProviderName()
throws IllegalStateException
- Throws:
IllegalStateException
setDefaultProviderName
public static void setDefaultProviderName(String defaultProviderName)
throws IllegalArgumentException,
NullPointerException
- Throws:
IllegalArgumentException
NullPointerException
Copyright © 2011 CodeLutin. All Rights Reserved.