| |
|
| java.lang.Object com.opensymphony.xwork.interceptor.AroundInterceptor com.opensymphony.xwork.spring.interceptor.ActionAutowiringInterceptor
ActionAutowiringInterceptor | public class ActionAutowiringInterceptor extends AroundInterceptor implements ApplicationContextAware(Code) | |
TODO: Give a description of the Interceptor.
TODO: Describe the paramters for this Interceptor.
TODO: Discuss some possible extension of the Interceptor.
<!-- TODO: Describe how the Interceptor reference will effect execution -->
<action name="someAction" class="com.examples.SomeAction">
TODO: fill in the interceptor reference.
<interceptor-ref name=""/>
<result name="success">good_result.ftl</result>
</action>
Autowires action classes to Spring beans. The strategy for autowiring the beans can be configured
by setting the parameter on the interceptor. Actions that need access to the ActionContext
can implements the ApplicationContextAware interface. The context will also be placed on
the action context under the APPLICATION_CONTEXT attribute.
author: Simon Stewart author: Eric Hauser |
APPLICATION_CONTEXT | final public static String APPLICATION_CONTEXT(Code) | | |
before | protected void before(ActionInvocation invocation) throws Exception(Code) | | Looks for the ApplicationContext under the attribute that the Spring listener sets in
the servlet context. The configuration is done the first time here instead of in init() since the
ActionContext is not available during Interceptor initialization.
Autowires the action to Spring beans and places the ApplicationContext
on the ActionContext
TODO Should this check to see if the SpringObjectFactory has already been configured
instead of instantiating a new one? Or is there a good reason for the interceptor to have it's own
factory?
Parameters: invocation - throws: Exception - |
getApplicationContext | protected ApplicationContext getApplicationContext()(Code) | | context |
setApplicationContext | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException(Code) | | Parameters: applicationContext - throws: BeansException - |
setAutowireStrategy | public void setAutowireStrategy(Integer autowireStrategy)(Code) | | Parameters: autowireStrategy - |
Fields inherited from com.opensymphony.xwork.interceptor.AroundInterceptor | protected transient Log log(Code)(Java Doc)
|
|
|
|