webwork.action.factory
Class DefaultActionFactory

java.lang.Object
  extended bywebwork.action.factory.ActionFactory
      extended bywebwork.action.factory.DefaultActionFactory

public class DefaultActionFactory
extends ActionFactory

Default implementation of an action factory facade that creates the default set of action factory proxies. This class delegates to the proxies as implementation, thus acting as a facade to them.

The order in which factory proxies are executed is as follows:

  1. ChainingActionFactoryProxy - Copies properties from one action to the next in a chain.
  2. ParametersActionFactoryProxy - Sets parameters on the action.
  3. PrepareActionFactoryProxy - Prepares or initializes the action.
  4. ContextActionFactoryProxy - Establishes the action's context by executing methods for all implemented Aware* interfaces.
  5. CommandActionFactoryProxy - Executes a specified "command" method if the action implements the CommandDriven interface.
  6. AliasingActionFactoryProxy - Locates an action from the configuration substituting the alias with the associated action string.
  7. CommandActionFactoryProxy - Executes a specified "command" method again in the event the original action name was originally an alias.
  8. JspActionFactoryProxy - Returns the JSP action if its suffix is ".jsp".
  9. PrefixActionFactoryProxy - Returns an action using a configured list of packages to prefix its name.
  10. XMLActionFactoryProxy - Returns the XML action if its suffix is ".xml".
  11. ScriptActionFactoryProxy - Returns the Script action if its suffix matches that of a supported scripting language.
  12. JavaActionFactory - Returns an action object from a fully qualified classname.

Version:
$Revision: 1.25 $
Author:
Rickard Öberg (rickard@middleware-company.com)

Field Summary
protected  ActionFactory factory
           
 
Constructor Summary
DefaultActionFactory()
          Initialize action factory proxy delegation chain.
 
Method Summary
 Action getActionImpl(java.lang.String name)
          Get an action object.
 
Methods inherited from class webwork.action.factory.ActionFactory
flushCaches, getAction, getActionFactory, setActionFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected ActionFactory factory
Constructor Detail

DefaultActionFactory

public DefaultActionFactory()
Initialize action factory proxy delegation chain.

Method Detail

getActionImpl

public Action getActionImpl(java.lang.String name)
                     throws java.lang.Exception
Get an action object. The name should be the fully qualified classname of the action. Returns an instance of the matching action class by searching through the action factory proxy delegation chain.

Specified by:
getActionImpl in class ActionFactory
Parameters:
name - classname of the action to be created
Returns:
the action corresponding to the given name
Throws:
java.lang.Exception


Copyright © 2001-2003 WebWork All Rights Reserved.