Package org.apache.struts2
Interface ActionProxyFactory
- All Known Implementing Classes:
DefaultActionProxyFactory
,PrefixBasedActionProxyFactory
,StrutsActionProxyFactory
public interface ActionProxyFactory
The
ActionProxyFactory
is used to create ActionProxy
s to be executed.
It is the entry point to XWork that is used by a dispatcher to create an ActionProxy
to execute
for a particular namespace and action name.
- Author:
- Jason Carreira
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateActionProxy
(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
(ActionInvocation actionInvocation, 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.
-
Method Details
-
createActionProxy
ActionProxy 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.Note: This is the most used create method.
- 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
- Since:
- 2.1.1
-
createActionProxy
ActionProxy 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.- 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
- Since:
- 2.1.1
-
createActionProxy
ActionProxy createActionProxy(ActionInvocation actionInvocation, 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.- Parameters:
actionInvocation
- 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
- Since:
- 2.1.1
-