Package org.apache.struts2
Class DefaultActionProxyFactory
java.lang.Object
org.apache.struts2.DefaultActionProxyFactory
- All Implemented Interfaces:
ActionProxyFactory
- Direct Known Subclasses:
StrutsActionProxyFactory
Default factory for
ActionProxyFactory
.- Author:
- Jason Carreira
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ActionInvocation
createActionInvocation
(Map<String, Object> extraContext, boolean pushAction) createActionProxy
(String namespace, String actionName, String methodName, Map<String, Object> extraContext) Creates anActionProxy
for the given namespace and action name by looking up the configuration.The ActionProxy should be fully initialized when it is returned, including having anActionInvocation
instance associated.createActionProxy
(String namespace, String actionName, String methodName, Map<String, Object> extraContext, boolean executeResult, boolean cleanupContext) Creates anActionProxy
for the given namespace and action name by looking up the configuration.The ActionProxy should be fully initialized when it is returned, including having anActionInvocation
instance associated.createActionProxy
(String namespace, String actionName, Map<String, Object> extraContext, boolean executeResult, boolean cleanupContext) createActionProxy
(ActionInvocation inv, String namespace, String actionName, boolean executeResult, boolean cleanupContext) createActionProxy
(ActionInvocation inv, String namespace, String actionName, String methodName, boolean executeResult, boolean cleanupContext) Creates anActionProxy
for the given namespace and action name by looking up the configuration.The ActionProxy should be fully initialized when it is returned, including passedActionInvocation
instance.void
setContainer
(Container container) toString()
-
Field Details
-
container
-
-
Constructor Details
-
DefaultActionProxyFactory
public DefaultActionProxyFactory()
-
-
Method Details
-
setContainer
-
createActionProxy
-
createActionProxy
public ActionProxy createActionProxy(String namespace, String actionName, String methodName, Map<String, Object> extraContext) Description copied from interface:ActionProxyFactory
Creates anActionProxy
for the given namespace and action name by looking up the configuration.The ActionProxy should be fully initialized when it is returned, including having anActionInvocation
instance associated.Note: This is the most used create method.
- Specified by:
createActionProxy
in interfaceActionProxyFactory
- Parameters:
namespace
- the namespace of the action, can be nullactionName
- the name of the actionmethodName
- the name of the method to executeextraContext
- a Map of extra parameters to be provided to the ActionProxy, can be null- Returns:
- ActionProxy the created action proxy
-
createActionProxy
-
createActionProxy
public ActionProxy createActionProxy(String namespace, String actionName, String methodName, Map<String, Object> extraContext, boolean executeResult, boolean cleanupContext) Description copied from interface:ActionProxyFactory
Creates anActionProxy
for the given namespace and action name by looking up the configuration.The ActionProxy should be fully initialized when it is returned, including having anActionInvocation
instance associated.- Specified by:
createActionProxy
in interfaceActionProxyFactory
- Parameters:
namespace
- the namespace of the action, can be nullactionName
- the name of the actionmethodName
- the name of the method to executeextraContext
- a Map of extra parameters to be provided to the ActionProxy, can be nullexecuteResult
- flag which tells whether the result should be executed after the actioncleanupContext
- flag which tells whether the original context should be preserved during execution of the proxy.- Returns:
- ActionProxy the created action proxy
-
createActionInvocation
protected ActionInvocation createActionInvocation(Map<String, Object> extraContext, boolean pushAction) -
createActionProxy
public ActionProxy createActionProxy(ActionInvocation inv, String namespace, String actionName, boolean executeResult, boolean cleanupContext) -
createActionProxy
public ActionProxy createActionProxy(ActionInvocation inv, String namespace, String actionName, String methodName, boolean executeResult, boolean cleanupContext) Description copied from interface:ActionProxyFactory
Creates anActionProxy
for the given namespace and action name by looking up the configuration.The ActionProxy should be fully initialized when it is returned, including passedActionInvocation
instance.- Specified by:
createActionProxy
in interfaceActionProxyFactory
- Parameters:
inv
- the action invocation instance to associate withnamespace
- the namespace of the action, can be nullactionName
- the name of the actionmethodName
- the name of the method to executeexecuteResult
- flag which tells whether the result should be executed after the actioncleanupContext
- flag which tells whether the original context should be preserved during execution of the proxy.- Returns:
- ActionProxy the created action proxy
-
toString
-