webwork.action.factory
Class AliasingActionFactoryProxy
java.lang.Object
webwork.action.factory.ActionFactory
webwork.action.factory.ActionFactoryProxy
webwork.action.factory.AliasingActionFactoryProxy
- public class AliasingActionFactoryProxy
- extends ActionFactoryProxy
Aliasing action factory proxy. This will convert the given name
to a classname of an Action implementation. By using aliases you
can give meaningful and easy-to-remember names to your action classes.
Using aliases also allow you to use the same action class with
many result view mappings.
If the configuration flag "webwork.only.aliasing"
is set to "true",
then the given name *must* be an alias. Otherwise a security exception
will be thrown. This is to ensure that only actions that you explicitly
want exposed for invocation can be accessed.
However, actions can always access any other action through the ActionFactory
regardless of this setting.
- Version:
- $Revision: 1.14 $
- Author:
- Rickard Öberg (rickard@middleware-company.com)
Method Summary |
void |
flushCaches()
Called if the configuration has been modified. |
Action |
getActionImpl(java.lang.String aName)
Searches for the action from the configuration properties substituting
the alias with the associated action and then returns the matching
action from the action factory proxy chain. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AliasingActionFactoryProxy
public AliasingActionFactoryProxy(ActionFactory aFactory)
getActionImpl
public Action getActionImpl(java.lang.String aName)
throws java.lang.Exception
- Searches for the action from the configuration properties substituting
the alias with the associated action and then returns the matching
action from the action factory proxy chain. For the alias to match, it
must be specified with an
".action"
suffix.
- Specified by:
getActionImpl
in class ActionFactory
- Parameters:
aName
-
- Returns:
- the action corresponding to the given alias
- Throws:
java.lang.Exception
flushCaches
public void flushCaches()
- Description copied from class:
ActionFactory
- Called if the configuration has been modified.
If an ActionFactory does any caching of results,
it should override this method and flush its
internal caches in it.
- Overrides:
flushCaches
in class ActionFactoryProxy
Copyright © 2001-2003 WebWork All Rights Reserved.