@Deprecated public abstract class DelegatingActionUtils extends Object
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.
DelegatingActionProxy
,
DelegatingRequestProcessor
,
DelegatingTilesRequestProcessor
Modifier and Type | Field and Description |
---|---|
static String |
AUTOWIRE_BY_NAME
Deprecated.
Value of the autowire init-param that indicates autowiring by name:
"byName"
|
static String |
AUTOWIRE_BY_TYPE
Deprecated.
Value of the autowire init-param that indicates autowiring by type:
"byType"
|
static String |
PARAM_AUTOWIRE
Deprecated.
The name of the autowire init-param specified on the Struts ActionServlet:
"spring.autowire"
|
static String |
PARAM_DEPENDENCY_CHECK
Deprecated.
The name of the dependency check init-param specified on the Struts ActionServlet:
"spring.dependencyCheck"
|
Constructor and Description |
---|
DelegatingActionUtils()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static String |
determineActionBeanName(org.apache.struts.action.ActionMapping mapping)
Deprecated.
Default implementation of Action bean determination, taking
the mapping path and prepending the module prefix, if any.
|
static WebApplicationContext |
findRequiredWebApplicationContext(org.apache.struts.action.ActionServlet actionServlet,
org.apache.struts.config.ModuleConfig moduleConfig)
Deprecated.
Find most specific context available: check ContextLoaderPlugIn's
WebApplicationContext first, fall back to root WebApplicationContext else.
|
static int |
getAutowireMode(org.apache.struts.action.ActionServlet actionServlet)
Deprecated.
Determine the autowire mode from the "autowire" init-param of the
Struts ActionServlet, falling back to "AUTOWIRE_BY_TYPE" as default.
|
static boolean |
getDependencyCheck(org.apache.struts.action.ActionServlet actionServlet)
Deprecated.
Determine the dependency check to use from the "dependencyCheck" init-param
of the Struts ActionServlet, falling back to no dependency check as default.
|
static WebApplicationContext |
getRequiredWebApplicationContext(org.apache.struts.action.ActionServlet actionServlet,
org.apache.struts.config.ModuleConfig moduleConfig)
Deprecated.
Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext.
|
static WebApplicationContext |
getWebApplicationContext(org.apache.struts.action.ActionServlet actionServlet,
org.apache.struts.config.ModuleConfig moduleConfig)
Deprecated.
Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext.
|
public static final String PARAM_AUTOWIRE
public static final String PARAM_DEPENDENCY_CHECK
public static final String AUTOWIRE_BY_NAME
public static final String AUTOWIRE_BY_TYPE
public static WebApplicationContext getWebApplicationContext(org.apache.struts.action.ActionServlet actionServlet, org.apache.struts.config.ModuleConfig moduleConfig)
Checks for a module-specific context first, falling back to the context for the default module else.
actionServlet
- the associated ActionServletmoduleConfig
- the associated ModuleConfig (can be null
)null
if noneContextLoaderPlugIn.SERVLET_CONTEXT_PREFIX
public static WebApplicationContext getRequiredWebApplicationContext(org.apache.struts.action.ActionServlet actionServlet, org.apache.struts.config.ModuleConfig moduleConfig) throws IllegalStateException
Checks for a module-specific context first, falling back to the context for the default module else.
actionServlet
- the associated ActionServletmoduleConfig
- the associated ModuleConfig (can be null
)IllegalStateException
- if no WebApplicationContext could be foundContextLoaderPlugIn.SERVLET_CONTEXT_PREFIX
public static WebApplicationContext findRequiredWebApplicationContext(org.apache.struts.action.ActionServlet actionServlet, org.apache.struts.config.ModuleConfig moduleConfig) throws IllegalStateException
When checking the ContextLoaderPlugIn context: checks for a module-specific context first, falling back to the context for the default module else.
actionServlet
- the associated ActionServletmoduleConfig
- the associated ModuleConfig (can be null
)IllegalStateException
- if no WebApplicationContext could be foundgetWebApplicationContext(org.apache.struts.action.ActionServlet, org.apache.struts.config.ModuleConfig)
,
WebApplicationContextUtils.getRequiredWebApplicationContext(javax.servlet.ServletContext)
public static String determineActionBeanName(org.apache.struts.action.ActionMapping mapping)
mapping
- the Struts ActionMappingActionConfig.getPath()
,
ModuleConfig.getPrefix()
public static int getAutowireMode(org.apache.struts.action.ActionServlet actionServlet)
actionServlet
- the Struts ActionServletPARAM_AUTOWIRE
,
AUTOWIRE_BY_NAME
,
AUTOWIRE_BY_TYPE
,
AutowireCapableBeanFactory.autowireBeanProperties(java.lang.Object, int, boolean)
,
AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE
,
AutowireCapableBeanFactory.AUTOWIRE_BY_NAME
public static boolean getDependencyCheck(org.apache.struts.action.ActionServlet actionServlet)
actionServlet
- the Struts ActionServletPARAM_DEPENDENCY_CHECK
,
AutowireCapableBeanFactory.autowireBeanProperties(java.lang.Object, int, boolean)