Package org.apache.struts2
Class DefaultActionProxy
java.lang.Object
org.apache.struts2.DefaultActionProxy
- All Implemented Interfaces:
- Serializable,- ActionProxy
- Direct Known Subclasses:
- StrutsActionProxy
The Default ActionProxy implementation
- Since:
- 2005-8-6
- Author:
- Rainer Hermanns, Revised by Henry Hu, tmjee
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected ActionEventListenerprotected Stringprotected booleanprotected ActionConfigprotected Configurationprotected booleanprotected ActionInvocationprotected LocalizedTextProviderprotected Stringprotected Stringprotected ObjectFactoryprotected UnknownHandlerManager
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDefaultActionProxy(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.
- 
Method SummaryModifier and TypeMethodDescriptionexecute()Execute this ActionProxy.Gets the Action instance for this Proxy.Gets the alias name this ActionProxy is mapped to.Gets the ActionConfig this ActionProxy is built from.protected StringbooleanGets the status of whether the ActionProxy is set to execute the Result after the Action is executed.Gets the method name to execute, or null if no method has been specified (meaningexecutewill be invoked).Gets the namespace the ActionConfig for this ActionProxy is mapped to.booleanGets status of the method value's initialization.protected voidprepare()protected StringvoidsetActionEventListener(ActionEventListener listener) voidsetConfiguration(Configuration config) voidsetExecuteResult(boolean executeResult) Sets whether this ActionProxy should also execute the Result after executing the Action.voidsetLocalizedTextProvider(LocalizedTextProvider localizedTextProvider) voidsetObjectFactory(ObjectFactory factory) voidsetUnknownHandler(UnknownHandlerManager unknownHandlerManager) 
- 
Field Details- 
configuration
- 
config
- 
invocation
- 
unknownHandlerManager
- 
localizedTextProvider
- 
actionName
- 
namespace
- 
method
- 
executeResultprotected boolean executeResult
- 
cleanupContextprotected boolean cleanupContext
- 
objectFactory
- 
actionEventListener
 
- 
- 
Constructor Details- 
DefaultActionProxyprotected 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.The reason for the builder methods is so that you can use a subclass to create your own DefaultActionProxy instance (like a RMIActionProxy).- Parameters:
- inv- the action invocation
- namespace- the namespace
- actionName- the action name
- methodName- the method name
- executeResult- execute result
- cleanupContext- cleanup context
 
 
- 
- 
Method Details- 
setObjectFactory
- 
setConfiguration
- 
setUnknownHandler
- 
setActionEventListener
- 
setLocalizedTextProvider
- 
getActionDescription copied from interface:ActionProxyGets the Action instance for this Proxy.- Specified by:
- getActionin interface- ActionProxy
- Returns:
- the Action instance
 
- 
getActionNameDescription copied from interface:ActionProxyGets the alias name this ActionProxy is mapped to.- Specified by:
- getActionNamein interface- ActionProxy
- Returns:
- the alias name
 
- 
getConfigDescription copied from interface:ActionProxyGets the ActionConfig this ActionProxy is built from.- Specified by:
- getConfigin interface- ActionProxy
- Returns:
- the ActionConfig
 
- 
setExecuteResultpublic void setExecuteResult(boolean executeResult) Description copied from interface:ActionProxySets whether this ActionProxy should also execute the Result after executing the Action.- Specified by:
- setExecuteResultin interface- ActionProxy
- Parameters:
- executeResult- true to also execute the Result.
 
- 
getExecuteResultpublic boolean getExecuteResult()Description copied from interface:ActionProxyGets the status of whether the ActionProxy is set to execute the Result after the Action is executed.- Specified by:
- getExecuteResultin interface- ActionProxy
- Returns:
- the status
 
- 
getInvocation- Specified by:
- getInvocationin interface- ActionProxy
 
- 
getNamespaceDescription copied from interface:ActionProxyGets the namespace the ActionConfig for this ActionProxy is mapped to.- Specified by:
- getNamespacein interface- ActionProxy
- Returns:
- the namespace
 
- 
executeDescription copied from interface:ActionProxyExecute this ActionProxy. This will set the ActionContext from the ActionInvocation into the ActionContext ThreadLocal before invoking the ActionInvocation, then set the old ActionContext back into the ThreadLocal.- Specified by:
- executein interface- ActionProxy
- Returns:
- the result code returned from executing the ActionInvocation
- Throws:
- Exception- can be thrown.
- See Also:
 
- 
getMethodDescription copied from interface:ActionProxyGets the method name to execute, or null if no method has been specified (meaningexecutewill be invoked).- Specified by:
- getMethodin interface- ActionProxy
- Returns:
- the method to execute
 
- 
prepareprotected void prepare()
- 
prepareNotAllowedErrorMessage
- 
getErrorMessage
- 
isMethodSpecifiedpublic boolean isMethodSpecified()Description copied from interface:ActionProxyGets status of the method value's initialization.- Specified by:
- isMethodSpecifiedin interface- ActionProxy
- Returns:
- true if the method returned by getMethod() is not a default initializer value.
 
 
-