webwork.action.factory
Class AliasingActionFactoryProxy

java.lang.Object
  extended bywebwork.action.factory.ActionFactory
      extended bywebwork.action.factory.ActionFactoryProxy
          extended bywebwork.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)

Constructor Summary
AliasingActionFactoryProxy(ActionFactory aFactory)
           
 
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 webwork.action.factory.ActionFactoryProxy
getNextFactory
 
Methods inherited from class webwork.action.factory.ActionFactory
getAction, getActionFactory, setActionFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AliasingActionFactoryProxy

public AliasingActionFactoryProxy(ActionFactory aFactory)
Method Detail

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.