public class DefaultActionProxy extends Object implements ActionProxy, Serializable
Modifier and Type | Field and Description |
---|---|
protected ActionEventListener |
actionEventListener |
protected String |
actionName |
protected boolean |
cleanupContext |
protected ActionConfig |
config |
protected Configuration |
configuration |
protected boolean |
executeResult |
protected ActionInvocation |
invocation |
protected LocalizedTextProvider |
localizedTextProvider |
protected String |
method |
protected String |
namespace |
protected ObjectFactory |
objectFactory |
protected UnknownHandlerManager |
unknownHandlerManager |
Modifier | Constructor and Description |
---|---|
protected |
DefaultActionProxy(ActionInvocation inv,
String namespace,
String actionName,
String methodName,
boolean executeResult,
boolean cleanupContext)
This constructor is private so the builder methods (create*) should be used to create an DefaultActionProxy.
|
Modifier and Type | Method and Description |
---|---|
String |
execute()
Execute this ActionProxy.
|
Object |
getAction()
Gets the Action instance for this Proxy.
|
String |
getActionName()
Gets the alias name this ActionProxy is mapped to.
|
ActionConfig |
getConfig()
Gets the ActionConfig this ActionProxy is built from.
|
protected String |
getErrorMessage() |
boolean |
getExecuteResult()
Gets the status of whether the ActionProxy is set to execute the Result after the Action is executed.
|
ActionInvocation |
getInvocation()
Gets the ActionInvocation associated with this ActionProxy.
|
String |
getMethod()
Gets the method name to execute, or null if no method has been specified (meaning
execute will be invoked). |
String |
getNamespace()
Gets the namespace the ActionConfig for this ActionProxy is mapped to.
|
boolean |
isMethodSpecified()
Gets status of the method value's initialization.
|
protected void |
prepare() |
protected String |
prepareNotAllowedErrorMessage() |
void |
setActionEventListener(ActionEventListener listener) |
void |
setConfiguration(Configuration config) |
void |
setExecuteResult(boolean executeResult)
Sets whether this ActionProxy should also execute the Result after executing the Action.
|
void |
setLocalizedTextProvider(LocalizedTextProvider localizedTextProvider) |
void |
setObjectFactory(ObjectFactory factory) |
void |
setUnknownHandler(UnknownHandlerManager unknownHandlerManager) |
protected Configuration configuration
protected ActionConfig config
protected ActionInvocation invocation
protected UnknownHandlerManager unknownHandlerManager
protected LocalizedTextProvider localizedTextProvider
protected String actionName
protected String namespace
protected String method
protected boolean executeResult
protected boolean cleanupContext
protected ObjectFactory objectFactory
protected ActionEventListener actionEventListener
protected DefaultActionProxy(ActionInvocation inv, String namespace, String actionName, String methodName, boolean executeResult, boolean cleanupContext)
The reason for the builder methods is so that you can use a subclass to create your own DefaultActionProxy instance
(like a RMIActionProxy).inv
- the action invocationnamespace
- the namespaceactionName
- the action namemethodName
- the method nameexecuteResult
- execute resultcleanupContext
- cleanup contextpublic void setObjectFactory(ObjectFactory factory)
public void setConfiguration(Configuration config)
public void setUnknownHandler(UnknownHandlerManager unknownHandlerManager)
public void setActionEventListener(ActionEventListener listener)
public void setLocalizedTextProvider(LocalizedTextProvider localizedTextProvider)
public Object getAction()
ActionProxy
getAction
in interface ActionProxy
public String getActionName()
ActionProxy
getActionName
in interface ActionProxy
public ActionConfig getConfig()
ActionProxy
getConfig
in interface ActionProxy
public void setExecuteResult(boolean executeResult)
ActionProxy
setExecuteResult
in interface ActionProxy
executeResult
- true to also execute the Result.public boolean getExecuteResult()
ActionProxy
getExecuteResult
in interface ActionProxy
public ActionInvocation getInvocation()
ActionProxy
getInvocation
in interface ActionProxy
public String getNamespace()
ActionProxy
getNamespace
in interface ActionProxy
public String execute() throws Exception
ActionProxy
execute
in interface ActionProxy
Exception
- can be thrown.ActionInvocation
public String getMethod()
ActionProxy
execute
will be invoked).getMethod
in interface ActionProxy
protected void prepare()
protected String prepareNotAllowedErrorMessage()
protected String getErrorMessage()
public boolean isMethodSpecified()
ActionProxy
isMethodSpecified
in interface ActionProxy
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.