org.loom.annotation.processor
Class AbstractInjectedInterceptorAnnotationProcessor<T extends Interceptor>

java.lang.Object
  extended by org.loom.annotation.processor.AbstractAnnotationProcessor
      extended by org.loom.annotation.processor.AbstractInjectedInterceptorAnnotationProcessor<T>
All Implemented Interfaces:
AnnotationProcessor, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
AbstractSecurityAnnotationProcessor, CaptchaAnnotationProcessor, MultiUploadAnnotationProcessor, RequiresConfirmationAnnotationProcessor

public abstract class AbstractInjectedInterceptorAnnotationProcessor<T extends Interceptor>
extends AbstractAnnotationProcessor
implements org.springframework.context.ApplicationContextAware

AnnotationProcessor that makes use of Interceptor instances injected using spring. This processor will ask spring for a interceptor instance each time getInterceptor() gets called, allowing for a new Interceptor instance to be created for each Loom annotation/action class that is found. The injected interceptor lookup will be delayed until the annotation gets processed, so any processor subclass can be registered with loom, but the interceptor will not be looked up until the annotation is effectively used.

Author:
icoloma

Constructor Summary
AbstractInjectedInterceptorAnnotationProcessor(java.lang.Class<T> interceptorClass)
           
 
Method Summary
 org.springframework.context.ApplicationContext getApplicationContext()
           
protected  T getInterceptor()
           
 java.lang.String getInterceptorBeanName()
           
 java.lang.Class<T> getInterceptorClass()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setInterceptorBeanName(java.lang.String interceptorBeanName)
           
 
Methods inherited from class org.loom.annotation.processor.AbstractAnnotationProcessor
process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractInjectedInterceptorAnnotationProcessor

public AbstractInjectedInterceptorAnnotationProcessor(java.lang.Class<T> interceptorClass)
Method Detail

getInterceptor

protected T getInterceptor()

setApplicationContext

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

getInterceptorBeanName

public java.lang.String getInterceptorBeanName()

setInterceptorBeanName

public void setInterceptorBeanName(java.lang.String interceptorBeanName)

getApplicationContext

public org.springframework.context.ApplicationContext getApplicationContext()

getInterceptorClass

public java.lang.Class<T> getInterceptorClass()


The Loom Framework 1.6-SNAPSHOT.
Licensed under the Apache License, Version 2.0 by Extrema Sistemas de Informacion S.L.