com.atlassian.greenhopper.jira
Class JIRAResourceAnnotationBeanPostProcessor

java.lang.Object
  extended by com.atlassian.greenhopper.jira.JIRAResourceAnnotationBeanPostProcessor
All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor

public class JIRAResourceAnnotationBeanPostProcessor
extends java.lang.Object
implements org.springframework.beans.factory.config.BeanPostProcessor

JIRA publishes components through ContainerRegistrar. Unfortunately, some components are marked as "internal" and can't be injected by Spring. To work around this and keep static calls from being scattered all around, this PostProcessors can be used together with JIRAResource annotation.

Declared in spring.xml, this runs as another PostProcessors after the default Spring ones. It inspects container-managed beans and tries to resolve annotated fields.

see http://static.springsource.org/spring/docs/2.5.x/reference/beans.html#beans-factory-extension-bpp for a detailed documentation on PostProcessors.

Author:
ahennecke

Constructor Summary
JIRAResourceAnnotationBeanPostProcessor()
           
 
Method Summary
 java.lang.Object postProcessAfterInitialization(java.lang.Object bean, java.lang.String beanName)
          Nothing for us to do here.
 java.lang.Object postProcessBeforeInitialization(java.lang.Object bean, java.lang.String beanName)
          We hook in before the initialisation methods (like afterPropertiesSet) are called, so injection is complete if someone needs it at this point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JIRAResourceAnnotationBeanPostProcessor

public JIRAResourceAnnotationBeanPostProcessor()
Method Detail

postProcessBeforeInitialization

public java.lang.Object postProcessBeforeInitialization(java.lang.Object bean,
                                                        java.lang.String beanName)
                                                 throws org.springframework.beans.BeansException
We hook in before the initialisation methods (like afterPropertiesSet) are called, so injection is complete if someone needs it at this point.

Specified by:
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
Throws:
org.springframework.beans.BeansException

postProcessAfterInitialization

public java.lang.Object postProcessAfterInitialization(java.lang.Object bean,
                                                       java.lang.String beanName)
                                                throws org.springframework.beans.BeansException
Nothing for us to do here.

Specified by:
postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
Throws:
org.springframework.beans.BeansException


Copyright © 2007-2014 Atlassian. All Rights Reserved.