org.javalid.external.spring
Class SpringAnnotationValidatorImpl
java.lang.Object
org.javalid.core.AnnotationValidatorImpl
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
|
|
Constructor Summary |
SpringAnnotationValidatorImpl(java.lang.String xmlConfigFile)
Use given xml config file to configure JV, this file is required
as the default config that ships with JV does not have spring enabled. |
SpringAnnotationValidatorImpl(java.lang.String xmlConfigFile,
boolean setValueToNullIfEmptyString)
Use given xml config file to configure JV, this file is required
as the default config that ships with JV does not have spring enabled. |
| Methods inherited from class org.javalid.core.AnnotationValidatorImpl |
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 |
context
protected org.springframework.context.ApplicationContext context
SpringAnnotationValidatorImpl
public SpringAnnotationValidatorImpl(java.lang.String xmlConfigFile)
- Use given xml config file to configure JV, this file is required
as the default config that ships with JV does not have spring enabled.
- Parameters:
xmlConfigFile - The xml configuration file
SpringAnnotationValidatorImpl
public SpringAnnotationValidatorImpl(java.lang.String xmlConfigFile,
boolean setValueToNullIfEmptyString)
- Use given xml config file to configure JV, this file is required
as the default config that ships with JV does not have spring enabled.
- Parameters:
xmlConfigFile - The xml configuration filesetValueToNullIfEmptyString - Defaults to false, but if set to true when a String/StringBuffer value
to validate is encountered and they are EMPTY, they are set to null
instead of leaving it like "".
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext context)
- Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware