com.opensymphony.xwork
Class ActionProxyFactory

java.lang.Object
  extended by com.opensymphony.xwork.ActionProxyFactory
Direct Known Subclasses:
DefaultActionProxyFactory

public abstract class ActionProxyFactory
extends Object

The ActionProxyFactory is used to create ActionProxies 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 Created Jun 15, 2003 5:18:30 PM
See Also:
DefaultActionProxyFactory

Constructor Summary
ActionProxyFactory()
           
 
Method Summary
abstract  ActionInvocation createActionInvocation(ActionProxy actionProxy)
          Used by an ActionProxy or ActionProxyFactory to create an ActionInvocation to associate with an ActionProxy as part of creating an ActionProxy.
abstract  ActionInvocation createActionInvocation(ActionProxy actionProxy, Map extraContext)
          Used by an ActionProxy or ActionProxyFactory to create an ActionInvocation to associate with an ActionProxy as part of creating an ActionProxy.
abstract  ActionInvocation createActionInvocation(ActionProxy actionProxy, Map extraContext, boolean pushAction)
          Used by an ActionProxy or ActionProxyFactory to create an ActionInvocation to associate with an ActionProxy as part of creating an ActionProxy.
abstract  ActionProxy createActionProxy(String namespace, String actionName, Map extraContext)
          Creates an ActionProxy for the given namespace and action name by looking up the configuration.
abstract  ActionProxy createActionProxy(String namespace, String actionName, Map extraContext, boolean executeResult, boolean cleanupContext)
          Creates an ActionProxy for the given namespace and action name by looking up the configuration.
static ActionProxyFactory getFactory()
           
static void setFactory(ActionProxyFactory factory)
          Set the ActionProxyFactory implementation to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionProxyFactory

public ActionProxyFactory()
Method Detail

setFactory

public static void setFactory(ActionProxyFactory factory)
Set the ActionProxyFactory implementation to use. If no instance is set, a new DefaultActionProxyFactory is used.

Parameters:
factory -

getFactory

public static ActionProxyFactory getFactory()

createActionInvocation

public abstract ActionInvocation createActionInvocation(ActionProxy actionProxy,
                                                        Map extraContext)
                                                 throws Exception
Used by an ActionProxy or ActionProxyFactory to create an ActionInvocation to associate with an ActionProxy as part of creating an ActionProxy. Client code should not need to call the createActionInvocation methods.

Parameters:
actionProxy -
extraContext -
Returns:
ActionInvocation
Throws:
Exception

createActionInvocation

public abstract ActionInvocation createActionInvocation(ActionProxy actionProxy)
                                                 throws Exception
Used by an ActionProxy or ActionProxyFactory to create an ActionInvocation to associate with an ActionProxy as part of creating an ActionProxy. Client code should not need to call the createActionInvocation methods.

Parameters:
actionProxy -
Returns:
ActionInvocation
Throws:
Exception

createActionInvocation

public abstract ActionInvocation createActionInvocation(ActionProxy actionProxy,
                                                        Map extraContext,
                                                        boolean pushAction)
                                                 throws Exception
Used by an ActionProxy or ActionProxyFactory to create an ActionInvocation to associate with an ActionProxy as part of creating an ActionProxy. Client code should not need to call the createActionInvocation methods.

Parameters:
actionProxy -
extraContext -
pushAction - tells whether the Action should be pushed onto the ValueStack
Returns:
ActionInvocation
Throws:
Exception

createActionProxy

public abstract ActionProxy createActionProxy(String namespace,
                                              String actionName,
                                              Map extraContext)
                                       throws Exception
Creates an ActionProxy for the given namespace and action name by looking up the configuration. The ActionProxy should be fully initialized when it is returned, including having an ActionInvocation instance associated.

Parameters:
namespace - the namespace of the action
actionName -
extraContext - a Map of extra parameters to be provided to the ActionProxy
Returns:
ActionProxy
Throws:
Exception

createActionProxy

public abstract ActionProxy createActionProxy(String namespace,
                                              String actionName,
                                              Map extraContext,
                                              boolean executeResult,
                                              boolean cleanupContext)
                                       throws Exception
Creates an ActionProxy for the given namespace and action name by looking up the configuration. The ActionProxy should be fully initialized when it is returned, including having an ActionInvocation instance associated.

Parameters:
namespace - the namespace of the action
actionName -
extraContext - a Map of extra parameters to be provided to the ActionProxy
executeResult - flag which tells whether the result should be executed after the action
cleanupContext -
Returns:
ActionProxy
Throws:
Exception

WebWork Project Page