org.javalid.external.spring.ioc
Class AnnotationValidatorBeanPostProcessor

java.lang.Object
  extended by org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
      extended by org.javalid.external.spring.ioc.AnnotationValidatorBeanPostProcessor
All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor, org.springframework.beans.factory.config.SmartInstantiationAwareBeanPostProcessor

public class AnnotationValidatorBeanPostProcessor
extends org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter

When configured, uses the AnnotationValidator. Note, if you do not supply a configuration file, it defaults to the one that supports field properties (since most Spring Beans will not have getters).

Please note: The original code of this source file has been contributed by Scott Battaglia who deserves the credits for it.

Since:
1.2
Version:
1.0
Author:
Scott Battaglia

Constructor Summary
AnnotationValidatorBeanPostProcessor()
           
AnnotationValidatorBeanPostProcessor(AnnotationValidator<java.lang.Object> validator)
           
AnnotationValidatorBeanPostProcessor(java.lang.String configLocation)
           
 
Method Summary
 java.lang.Object postProcessBeforeInitialization(java.lang.Object bean, java.lang.String beanName)
           
 void setGroup(java.lang.String group)
           
 void setPathPrefix(java.lang.String pathPrefix)
           
 void setRecursiveLevels(int recursiveLevels)
           
 void setResourceBundleMessageSource(org.springframework.context.support.ResourceBundleMessageSource resourceBundleMessageSource)
           
 
Methods inherited from class org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
determineConstructor, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInstantiation, postProcessPropertyValues, predictBeanType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationValidatorBeanPostProcessor

public AnnotationValidatorBeanPostProcessor(java.lang.String configLocation)

AnnotationValidatorBeanPostProcessor

public AnnotationValidatorBeanPostProcessor()

AnnotationValidatorBeanPostProcessor

public AnnotationValidatorBeanPostProcessor(AnnotationValidator<java.lang.Object> validator)
Method Detail

postProcessBeforeInitialization

public java.lang.Object postProcessBeforeInitialization(java.lang.Object bean,
                                                        java.lang.String beanName)
                                                 throws org.springframework.beans.BeansException
Specified by:
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
Overrides:
postProcessBeforeInitialization in class org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
Throws:
org.springframework.beans.BeansException

setPathPrefix

public void setPathPrefix(java.lang.String pathPrefix)

setRecursiveLevels

public void setRecursiveLevels(int recursiveLevels)

setGroup

public void setGroup(java.lang.String group)

setResourceBundleMessageSource

public void setResourceBundleMessageSource(org.springframework.context.support.ResourceBundleMessageSource resourceBundleMessageSource)