org.apache.struts.chain.commands
Class AbstractCreateAction

java.lang.Object
  extended by org.apache.struts.chain.commands.ActionCommandBase
      extended by org.apache.struts.chain.commands.AbstractCreateAction
All Implemented Interfaces:
org.apache.commons.chain.Command, ActionCommand
Direct Known Subclasses:
CreateAction

public abstract class AbstractCreateAction
extends ActionCommandBase

Create (if necessary) and cache an Action for this request.

Version:
$Rev: 510851 $ $Date: 2005-11-12 13:01:44 -0500 (Sat, 12 Nov 2005) $

Field Summary
 
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
 
Constructor Summary
AbstractCreateAction()
           
 
Method Summary
 boolean execute(ActionContext actionCtx)
          Create (if necessary) and cache an Action for this request.
protected abstract  Action getAction(ActionContext context, java.lang.String type, ActionConfig actionConfig)
           Create and return the appropriate Action class for the given type and actionConfig.
 
Methods inherited from class org.apache.struts.chain.commands.ActionCommandBase
execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCreateAction

public AbstractCreateAction()
Method Detail

execute

public boolean execute(ActionContext actionCtx)
                throws java.lang.Exception

Create (if necessary) and cache an Action for this request.

Specified by:
execute in interface ActionCommand
Specified by:
execute in class ActionCommandBase
Parameters:
actionCtx - The Context for the current request
Returns:
false so that processing continues
Throws:
java.lang.Exception - if there are any problems instantiating the Action class.

getAction

protected abstract Action getAction(ActionContext context,
                                    java.lang.String type,
                                    ActionConfig actionConfig)
                             throws java.lang.Exception

Create and return the appropriate Action class for the given type and actionConfig.

NOTE: The dependence on ActionServlet suggests that this should be broken up along the lines of the other Abstract/concrete pairs in the org.apache.struts.chain.commands package.

Parameters:
context - The Context for this request
type - Name of class to instantiate
actionConfig - The ActionConfig for this request
Returns:
Instantiated Action class
Throws:
java.lang.Exception - if there are any problems instantiating the Action class.


Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.