org.javalid.external.spring
Class SpringAnnotationValidatorImpl

java.lang.Object
  extended by org.javalid.core.AnnotationValidatorImpl
      extended by org.javalid.external.spring.SpringAnnotationValidatorImpl
All Implemented Interfaces:
AnnotationValidator, org.springframework.context.ApplicationContextAware

public class SpringAnnotationValidatorImpl
extends AnnotationValidatorImpl
implements org.springframework.context.ApplicationContextAware

This validator extends AnnotationValidatorImpl and is 'Spring-aware' by implementing ApplicationContextAware. This validator should be used if you need Spring support (thus need the spring-dependency jar file) and have ENABLED the spring extension in the configuration file.

Since:
1.0
Version:
1.0
Author:
M.Reuvers

Field Summary
protected  org.springframework.context.ApplicationContext context
           
 
Fields inherited from class org.javalid.core.AnnotationValidatorImpl
cacheSupport, jvConfig, jvConfigWrapper
 
Constructor Summary
SpringAnnotationValidatorImpl(java.lang.String xmlConfigFile)
          Use given xml config file to configure JaValid, this file is required as the default config that ships with JaValid, does not have spring enabled.
SpringAnnotationValidatorImpl(java.net.URL urlConfigFile)
          Use given url config file to configure JaValid, this file is required as the default config that ships with JaValid, does not have spring enabled.
 
Method Summary
 void setApplicationContext(org.springframework.context.ApplicationContext context)
           
 
Methods inherited from class org.javalid.core.AnnotationValidatorImpl
getLocaleResolver, getMessageCodeResolver, isMessageResolvingEnabled, setLocaleResolver, setMessageCodeResolver, validateObject, validateObject, validateObject, validateObject, validateObject, validateObject, validateObject, validateObject, validateObject, validateObject, validateObject, validateObjectPriv, validateProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected org.springframework.context.ApplicationContext context
Constructor Detail

SpringAnnotationValidatorImpl

public SpringAnnotationValidatorImpl(java.lang.String xmlConfigFile)
Use given xml config file to configure JaValid, this file is required as the default config that ships with JaValid, does not have spring enabled.

Parameters:
xmlConfigFile - The xml configuration file

SpringAnnotationValidatorImpl

public SpringAnnotationValidatorImpl(java.net.URL urlConfigFile)
Use given url config file to configure JaValid, this file is required as the default config that ships with JaValid, does not have spring enabled.

Parameters:
urlConfigFile - The url configuration file
Since:
1.2
Method Detail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext context)
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware