|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTilesRequestProcessor
org.springframework.web.struts.AutowiringTilesRequestProcessor
@Deprecated public class AutowiringTilesRequestProcessor
Subclass of Struts's TilesRequestProcessor that autowires Struts Actions with Spring beans defined in ContextLoaderPlugIn's WebApplicationContext or - in case of general service layer beans - in the root WebApplicationContext.
Behaves like
AutowiringRequestProcessor
,
but also provides the Tiles functionality of the original TilesRequestProcessor.
As there's just a single central class to customize in Struts, we have to provide
another subclass here, covering both the Tiles and the Spring delegation aspect.
The default implementation delegates to the DelegatingActionUtils class as fas as possible, to reuse as much code as possible despite the need to provide two RequestProcessor subclasses. If you need to subclass yet another RequestProcessor, take this class as a template, delegating to DelegatingActionUtils just like it.
AutowiringRequestProcessor
,
ContextLoaderPlugIn
,
DelegatingActionUtils
Field Summary | |
---|---|
private int |
autowireMode
Deprecated. |
private boolean |
dependencyCheck
Deprecated. |
private WebApplicationContext |
webApplicationContext
Deprecated. |
Constructor Summary | |
---|---|
AutowiringTilesRequestProcessor()
Deprecated. |
Method Summary | |
---|---|
protected int |
getAutowireMode()
Deprecated. Return the autowire mode to use for wiring Struts Actions. |
protected boolean |
getDependencyCheck()
Deprecated. Return whether to apply a dependency check after wiring Struts Actions. |
protected WebApplicationContext |
getWebApplicationContext()
Deprecated. Return the current Spring WebApplicationContext. |
void |
init(ActionServlet actionServlet,
ModuleConfig moduleConfig)
Deprecated. |
protected int |
initAutowireMode(ActionServlet actionServlet,
ModuleConfig moduleConfig)
Deprecated. Determine the autowire mode to use for wiring Struts Actions. |
protected boolean |
initDependencyCheck(ActionServlet actionServlet,
ModuleConfig moduleConfig)
Deprecated. Determine whether to apply a dependency check after wiring Struts Actions. |
protected WebApplicationContext |
initWebApplicationContext(ActionServlet actionServlet,
ModuleConfig moduleConfig)
Deprecated. Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext, falling back to the root WebApplicationContext. |
protected Action |
processActionCreate(HttpServletRequest request,
HttpServletResponse response,
ActionMapping mapping)
Deprecated. Extend the base class method to autowire each created Action instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private WebApplicationContext webApplicationContext
private int autowireMode
private boolean dependencyCheck
Constructor Detail |
---|
public AutowiringTilesRequestProcessor()
Method Detail |
---|
public void init(ActionServlet actionServlet, ModuleConfig moduleConfig) throws ServletException
ServletException
protected WebApplicationContext initWebApplicationContext(ActionServlet actionServlet, ModuleConfig moduleConfig) throws java.lang.IllegalStateException
actionServlet
- the associated ActionServletmoduleConfig
- the associated ModuleConfig
java.lang.IllegalStateException
- if no WebApplicationContext could be foundDelegatingActionUtils.findRequiredWebApplicationContext(ActionServlet, ModuleConfig)
,
ContextLoaderPlugIn.SERVLET_CONTEXT_PREFIX
protected int initAutowireMode(ActionServlet actionServlet, ModuleConfig moduleConfig)
The default implementation checks the "autowire" init-param of the Struts ActionServlet, falling back to "AUTOWIRE_BY_TYPE" as default.
actionServlet
- the associated ActionServletmoduleConfig
- the associated ModuleConfig
DelegatingActionUtils.getAutowireMode(ActionServlet)
,
AutowireCapableBeanFactory.autowireBeanProperties(java.lang.Object, int, boolean)
,
AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE
,
AutowireCapableBeanFactory.AUTOWIRE_BY_NAME
protected boolean initDependencyCheck(ActionServlet actionServlet, ModuleConfig moduleConfig)
The default implementation checks the "dependencyCheck" init-param of the Struts ActionServlet, falling back to no dependency check as default.
actionServlet
- the associated ActionServletmoduleConfig
- the associated ModuleConfig
DelegatingActionUtils.getDependencyCheck(ActionServlet)
,
AutowireCapableBeanFactory.autowireBeanProperties(java.lang.Object, int, boolean)
protected final WebApplicationContext getWebApplicationContext()
protected final int getAutowireMode()
protected final boolean getDependencyCheck()
protected Action processActionCreate(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws java.io.IOException
java.io.IOException
AutowireCapableBeanFactory.autowireBeanProperties(java.lang.Object, int, boolean)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |