|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springmodules.validation.bean.conf.loader.xml.AbstractResourceBasedBeanValidationConfigurationLoader
public abstract class AbstractResourceBasedBeanValidationConfigurationLoader
A base class for all bean validation configuration loaders that are resource based (that is, load configuration from files, urls, etc...)
| Constructor Summary | |
|---|---|
AbstractResourceBasedBeanValidationConfigurationLoader()
Constructs a new AbstractResourceBasedBeanValidationConfigurationLoader. |
|
AbstractResourceBasedBeanValidationConfigurationLoader(Resource[] resources)
Constructs a new AbstractResourceBasedBeanValidationConfigurationLoader with the given resources. |
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
protected String |
createDefaultConfigurationFileName(Class clazz)
Creates the default configuration file name for the given class. |
Resource |
getResource()
If this loader is configured with only on resource, use this method to retreive it. |
Resource[] |
getResources()
Returns the resouces this loader uses to load bean validation configurations. |
BeanValidationConfiguration |
loadConfiguration(Class clazz)
Loads the bean validation configuration for the given class from the configured resources. |
protected abstract Map |
loadConfigurations(Resource resource)
Loads all the bean validation configurations from the given resource and returns them as a map where the value is a BeanValidationConfiguration instance and the key is the associated class. |
protected BeanValidationConfiguration |
loadDefaultConfiguration(Class clazz)
Loads the default validation configuration for the given class, caches it and returns it. |
void |
setResource(Resource resource)
Sets a single resource this loader will use to load the bean validation configurations from. |
void |
setResources(Resource[] resources)
Sets the resources this loader will use to load bean validation configurations. |
boolean |
supports(Class clazz)
Determines whether the given class is supported by this loader. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractResourceBasedBeanValidationConfigurationLoader()
public AbstractResourceBasedBeanValidationConfigurationLoader(Resource[] resources)
resources - The resources from which this loader will load the bean validation configurations.| Method Detail |
|---|
public final BeanValidationConfiguration loadConfiguration(Class clazz)
loadConfiguration in interface BeanValidationConfigurationLoaderclazz - The class for which the validation configuration will be loaded.
null if no configuration could be
found.BeanValidationConfigurationLoader.loadConfiguration(Class)public final boolean supports(Class clazz)
supports in interface BeanValidationConfigurationLoaderclazz - The class to be checked.
true if this loader can load a valication configuration for the given class,
false otherwise.BeanValidationConfigurationLoader.supports(Class)
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionInitializingBean.afterPropertiesSet()protected abstract Map loadConfigurations(Resource resource)
BeanValidationConfiguration instance and the key is the associated class.
resource - The resource from which the configurations will be loaded.
public Resource[] getResources()
public void setResources(Resource[] resources)
resources - The resources this loader will use to load bean validation configurations.public Resource getResource()
public void setResource(Resource resource)
resource - The one resource this loader will use to load the bean validation configurations from.protected BeanValidationConfiguration loadDefaultConfiguration(Class clazz)
createDefaultConfigurationFileName(Class) method.
clazz - The class for which the default configuration should be loaded.
protected String createDefaultConfigurationFileName(Class clazz)
Person will be Person.vld.xml.
clazz - The class for which the default configuration will be created.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||