| java.lang.Object org.springframework.web.struts.DelegatingActionUtils
DelegatingActionUtils | abstract public class DelegatingActionUtils (Code) | | Common methods for letting Struts Actions work with a
Spring WebApplicationContext.
As everything in Struts is based on concrete inheritance,
we have to provide an Action subclass (DelegatingActionProxy) and
two RequestProcessor subclasses (DelegatingRequestProcessor and
DelegatingTilesRequestProcessor). The only way to share common
functionality is a utility class like this one.
author: Juergen Hoeller since: 1.0.2 See Also: DelegatingActionProxy See Also: DelegatingRequestProcessor See Also: DelegatingTilesRequestProcessor |
Method Summary | |
public static String | determineActionBeanName(ActionMapping mapping) Default implementation of Action bean determination, taking
the mapping path and prepending the module prefix, if any. | public static WebApplicationContext | findRequiredWebApplicationContext(ActionServlet actionServlet, ModuleConfig moduleConfig) Find most specific context available: check ContextLoaderPlugIn's
WebApplicationContext first, fall back to root WebApplicationContext else. | public static int | getAutowireMode(ActionServlet actionServlet) Determine the autowire mode from the "autowire" init-param of the
Struts ActionServlet, falling back to "AUTOWIRE_BY_TYPE" as default. | public static boolean | getDependencyCheck(ActionServlet actionServlet) Determine the dependency check to use from the "dependencyCheck" init-param
of the Struts ActionServlet, falling back to no dependency check as default. | public static WebApplicationContext | getRequiredWebApplicationContext(ActionServlet actionServlet, ModuleConfig moduleConfig) Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext. | public static WebApplicationContext | getWebApplicationContext(ActionServlet actionServlet, ModuleConfig moduleConfig) Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext. |
AUTOWIRE_BY_NAME | final public static String AUTOWIRE_BY_NAME(Code) | | Value of the autowire init-param that indicates autowiring by name:
"byName"
|
AUTOWIRE_BY_TYPE | final public static String AUTOWIRE_BY_TYPE(Code) | | Value of the autowire init-param that indicates autowiring by type:
"byType"
|
PARAM_AUTOWIRE | final public static String PARAM_AUTOWIRE(Code) | | The name of the autowire init-param specified on the Struts ActionServlet:
"spring.autowire"
|
PARAM_DEPENDENCY_CHECK | final public static String PARAM_DEPENDENCY_CHECK(Code) | | The name of the dependency check init-param specified on the Struts ActionServlet:
"spring.dependencyCheck"
|
determineActionBeanName | public static String determineActionBeanName(ActionMapping mapping)(Code) | | Default implementation of Action bean determination, taking
the mapping path and prepending the module prefix, if any.
Parameters: mapping - the Struts ActionMapping the name of the Action bean See Also: org.apache.struts.action.ActionMapping.getPath See Also: org.apache.struts.config.ModuleConfig.getPrefix |
getRequiredWebApplicationContext | public static WebApplicationContext getRequiredWebApplicationContext(ActionServlet actionServlet, ModuleConfig moduleConfig) throws IllegalStateException(Code) | | Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext.
Checks for a module-specific context first, falling back to the
context for the default module else.
Parameters: actionServlet - the associated ActionServlet Parameters: moduleConfig - the associated ModuleConfig (can be null ) the WebApplicationContext throws: IllegalStateException - if no WebApplicationContext could be found See Also: ContextLoaderPlugIn.SERVLET_CONTEXT_PREFIX |
getWebApplicationContext | public static WebApplicationContext getWebApplicationContext(ActionServlet actionServlet, ModuleConfig moduleConfig)(Code) | | Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext.
Checks for a module-specific context first, falling back to the
context for the default module else.
Parameters: actionServlet - the associated ActionServlet Parameters: moduleConfig - the associated ModuleConfig (can be null ) the WebApplicationContext, or null if none See Also: ContextLoaderPlugIn.SERVLET_CONTEXT_PREFIX |
|
|