Package webwork.action.factory
Class DefaultActionFactory
java.lang.Object
webwork.action.factory.ActionFactory
webwork.action.factory.DefaultActionFactory
- Direct Known Subclasses:
SpringActionFactory
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:
ChainingActionFactoryProxy- Copies properties from one action to the next in a chain.ParametersActionFactoryProxy- Sets parameters on the action.PrepareActionFactoryProxy- Prepares or initializes the action.ContextActionFactoryProxy- Establishes the action's context by executing methods for all implementedAware*interfaces.CommandActionFactoryProxy- Executes a specified "command" method if the action implements theCommandDriveninterface.AliasingActionFactoryProxy- Locates an action from the configuration substituting the alias with the associated action string.CommandActionFactoryProxy- Executes a specified "command" method again in the event the original action name was originally an alias.JspActionFactoryProxy- Returns the JSP action if its suffix is ".jsp".PrefixActionFactoryProxy- Returns an action using a configured list of packages to prefix its name.XMLActionFactoryProxy- Returns the XML action if its suffix is ".xml".JavaActionFactory- Returns an action object from a fully qualified classname.
- Version:
- $Revision: 1.27 $
- Author:
- Rickard Öberg (rickard@middleware-company.com)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetActionImpl(String name) Get an action object.protected ActionFactoryGet the root action factory (usually java).Methods inherited from class webwork.action.factory.ActionFactory
flushCaches, getAction, getActionFactory, setActionFactory
-
Field Details
-
factory
-
-
Constructor Details
-
DefaultActionFactory
public DefaultActionFactory()Initialize action factory proxy delegation chain.
-
-
Method Details
-
getRootFactory
Get the root action factory (usually java). This method is useful for cases where the standard action factories are all required, and the only modification being the way that the Java action implementation is looked up.- Returns:
- the root ActionFactory
-
getActionImpl
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:
getActionImplin classActionFactory- Parameters:
name- classname of the action to be created- Returns:
- the action corresponding to the given name
- Throws:
Exception
-