Class ActionFactory

java.lang.Object
webwork.action.factory.ActionFactory
Direct Known Subclasses:
ActionFactoryProxy, DefaultActionFactory, JavaActionFactory, JiraActionFactory

public abstract class ActionFactory extends Object
Base action factory implementation that initializes the action factory delegation, establishes the ActionContext and provides access to the action factory. Upon instantiation, this class will initialize the action factory specified by the configuration property webwork.action.factory. If this property is not configured or the specified class cannot be instantiated, the DefaultActionFactory class will be instantiated.
Version:
$Revision: 1.20 $
Author:
Rickard Öberg (rickard@middleware-company.com)
  • Constructor Details

    • ActionFactory

      public ActionFactory()
  • Method Details

    • getAction

      public static Action getAction(String aName) throws Exception
      Returns the matching action found as the result of traversing the action factory delegation chain.
      Parameters:
      aName - name of action to return
      Returns:
      action located through the factory delegation chain
      Throws:
      Exception
    • getActionFactory

      public static ActionFactory getActionFactory()
      Returns the action factory implementation or the default action factory if not available.
      Returns:
      action factory implementation
    • setActionFactory

      public static void setActionFactory(ActionFactory aFactory) throws IllegalStateException
      Set the action factory implementation. Can only be called once.
      Throws:
      IllegalStateException
    • getActionImpl

      public abstract Action getActionImpl(String aName) throws Exception
      Returns the action object for the specified action or a matching action on the action factory delegation chain.
      Parameters:
      aName - name of action to check for a match
      Throws:
      Exception
    • flushCaches

      public void flushCaches()
      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.