From: Matt B. <ma...@sm...> - 2002-03-15 02:19:01
|
Done. Nice job. ----- Original Message ----- From: "Bill Burton" <bi...@pr...> To: "WebWork Developers" <web...@li...> Sent: Wednesday, March 13, 2002 11:12 PM Subject: Re: [Webwork-devel] [PATCH] action.factory package javadoc patch > Hello, > > Attached is a revised patch for javadoc updates to the action.factory > package. Since Rickard moved the ActionContext class from within > ActionFactory to a top level class, I updated that as well. > > Also removed some redundant or unused imports from the classes I touched. > > Thanks, > -Bill > > Bill Burton wrote: > > > > Hello, > > > > Looks like some of the recent commits cause this patch to have a few > > conflicts when applied. Also, since I mentioned *Aware interfaces in a > > couple of places, those descriptions should be updated. > > > > In the meantime while I'm updating the patch so it will apply cleanly, > > could someone do a quick scan to make sure the text looks okay? Even if > > it's not quite right in places, some of the original comments this patch > > fixes were completely wrong and misleading or nonexistent. I also took > > great pains to try and make each first sentence a good synopsis of the > > item being documented as this makes the javadoc summaries much more > > meaningful. > > > > Thanks, > > -Bill > > > > Bill Burton wrote: > > > > > > Hello, > > > > > > Attached is a patch to significantly improve the javadoc for most classes > > > in the .action.factory package as well is minor changes to > > > .action.CommandDriven javadoc. Most notably, I documented the action > > > factory proxy delegation chain in DefaultActionFactory and the list of > > > *Aware interfaces supported in ContextActionFactoryProxy. > > > > > > Also, I fixed all misnamed javadoc tags and removed some unused imports. > > > > > > -Bill > > ---------------------------------------------------------------------------- ---- Index: webwork/src/main/webwork/action/ActionContext.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/ActionContext.java,v retrieving revision 1.1 diff -u -r1.1 ActionContext.java --- webwork/src/main/webwork/action/ActionContext.java 12 Mar 2002 12:54:08 -0000 1.1 +++ webwork/src/main/webwork/action/ActionContext.java 14 Mar 2002 04:18:47 -0000 @@ -6,13 +6,9 @@ */ package webwork.action; -import org.apache.log4j.Category; -import webwork.action.Action; -import webwork.action.factory.DefaultActionFactory; import webwork.action.factory.SessionMap; import webwork.action.factory.ApplicationMap; import webwork.action.factory.ParameterMap; -import webwork.config.Configuration; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; @@ -21,12 +17,17 @@ import java.util.Map; /** - * This class handles the context of each action that is invoked. - * - * The information is associated with the action's thread so that it - * can be accessed from anywhere by calling a static method. The context - * is set by the dispatcher. + * Handles the context of each invoked action while providing + * an abstraction layer for both servlet and non servlet based + * applications. + * <p> + * Information is associated with the action's thread so it + * can be accessed from anywhere by calling a static method. + * <p> + * The context is initially set by the dispatcher. * + * @see webwork.dispatcher.ServletDispatcher + * @see webwork.dispatcher.ClientServletDispatcher * @author Rickard Öberg (ri...@mi...) * @version $Revision: 1.1 $ */ @@ -39,6 +40,11 @@ actionContext.set(aContext); } + /** + * Returns the ActionContext specific to the current thread. + * + * @recturn ActionContext for the current thread + */ public static ActionContext getContext() { return (ActionContext)actionContext.get(); @@ -64,6 +70,12 @@ name = aName; } + /** + * Returns the Locale of the current request in a servlet environment or + * the default Locale in other environments. + * + * @return current locale + */ public Locale getLocale() { if (locale == null) @@ -78,66 +90,122 @@ } } - public void setLocale(Locale locale) + /** + * Set the current locale. + * + * @param locale current locale + */ + public void setLocale(Locale locale) { this.locale = locale; } + /** + * Returns the HttpServletRequest object when in a servlet environment. + * + * @return HttpServletRequest in a servlet environment or null otherwise + */ public HttpServletRequest getRequest() { return request; } + /** + * Set the HttpServletRequest. + */ public void setRequest(HttpServletRequest request) { this.request = request; } + /** + * Returns the HttpServletResponse when in a servlet environment. + * + * @return HttpServletResponse or null + */ public HttpServletResponse getResponse() { return response; } + /** + * Set the HttpServletResponse. + */ public void setResponse(HttpServletResponse response) { this.response = response; } + /** + * Returns the ServletContext when in a servlet environment. + * + * @return ServletContext or null. + */ public ServletContext getServletContext() { return context; } + /** + * Set the ServletContext. + */ public void setServletContext(ServletContext context) { this.context = context; } + /** + * Returns the HttpSession when in a servlet environment or a generic + * session map otherwise. + * + * @return a map of HttpSession or a generic session map + */ public Map getSession() { return session == null ? new SessionMap(request.getSession()) : session; } + /** + * Set a session Map. + */ public void setSession(Map session) { this.session = session; } + /** + * Returns a Map of the ServletContext when in a servlet environment or + * a generic application level Map otherwise. + * + * @return Map of ServletContext or generic application level Map + */ public Map getApplication() { return application == null ? new ApplicationMap(context) : application; } + /** + * Set an application level Map. + */ public void setApplication(Map application) { this.application = application; } + /** + * Returns a Map of the HttpServletRequest parameters when in a servlet + * enviroment or a generic Map of parameters otherwise. + * + * @return Map of HttpServletRequest parameters or generic Map of parameters + */ public Map getParameters() { return parameters == null ? new ParameterMap(request) : parameters; } + /** + * Set a Map of parameters. + */ public void setParameters(Map parameter) { this.parameters = parameter; Index: webwork/src/main/webwork/action/CommandDriven.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/CommandDriven.java,v retrieving revision 1.3 diff -u -r1.3 CommandDriven.java --- webwork/src/main/webwork/action/CommandDriven.java 3 Mar 2002 04:05:20 -0000 1.3 +++ webwork/src/main/webwork/action/CommandDriven.java 14 Mar 2002 04:18:47 -0000 @@ -7,9 +7,11 @@ package webwork.action; /** - * The <pre>CommandDriven</pre> interface provides the basis for multple - * execution paths inside an action. + * Provides multiple execution paths or "commands" for actions implementing + * this interface. * + * @see webwork.action.factory.DefaultActionFactory + * @see webwork.action.factory.CommandActionFactoryProxy * @author Victor Salaman (sa...@qo...) */ public interface CommandDriven Index: webwork/src/main/webwork/action/factory/ActionFactory.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/factory/ActionFactory.java, v retrieving revision 1.14 diff -u -r1.14 ActionFactory.java --- webwork/src/main/webwork/action/factory/ActionFactory.java 12 Mar 2002 12:54:08 -0000 1.14 +++ webwork/src/main/webwork/action/factory/ActionFactory.java 14 Mar 2002 04:18:47 -0000 @@ -10,13 +10,15 @@ import webwork.action.Action; import webwork.config.Configuration; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.Locale; -import java.util.Map; - /** + * 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 + * <code>webwork.action.factory.</code> If this property is not configured + * or the specified class cannot be instantiated, the + * {@link DefaultActionFactory} class will be instantiated. + * * @author Rickard Öberg (ri...@mi...) * @version $Revision: 1.14 $ */ @@ -47,12 +49,25 @@ } + /** + * Returns the matching action found as the result of traversing the action + * factory delegation chain. + * + * @param aName name of action to return + * @return action located through the factory delegation chain + */ public static Action getAction(String aName) throws Exception { return getActionFactory().getActionImpl(aName); } + /** + * Returns the action factory implementation or the default action factory + * if not available. + * + * @return action factory implementation + */ public static ActionFactory getActionFactory() { return actionFactoryImplementation == null ? defaultActionFactory : actionFactoryImplementation; @@ -71,6 +86,12 @@ actionFactoryImplementation = aFactory; } + /** + * Returns the action object for the specified action or + * a matching action on the action factory delegation chain. + * + * @aName name of action to check for a match + */ public abstract Action getActionImpl(String aName) throws Exception; } Index: webwork/src/main/webwork/action/factory/ActionFactoryProxy.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/factory/ActionFactoryProxy. java,v retrieving revision 1.7 diff -u -r1.7 ActionFactoryProxy.java --- webwork/src/main/webwork/action/factory/ActionFactoryProxy.java 11 Mar 2002 09:02:33 -0000 1.7 +++ webwork/src/main/webwork/action/factory/ActionFactoryProxy.java 14 Mar 2002 04:18:47 -0000 @@ -9,13 +9,7 @@ /** - * Main dispatcher servlet. It works in three phases: first propagate all - * parameters to the command JavaBean. Second, call execute() to let the - * JavaBean create the result data. Third, delegate to the JSP that corresponds to - * the result state that was chosen by the JavaBean. - * - * The command JavaBeans can be found in a package prefixed with either - * of the package names in the comma-separated "packages" servlet init parameter. + * Extends ActionFactory to provide proxy support. * * @author Rickard Öberg (ri...@mi...) * @version $Revision: 1.7 $ @@ -27,12 +21,22 @@ private ActionFactory nextFactory; // Constructors -------------------------------------------------- + /** + * Initialize the proxy with the previous proxy in the delegation chain. + * + * @param aFactory next action factory proxy + */ protected ActionFactoryProxy(ActionFactory aFactory) { nextFactory = aFactory; } // Protected ----------------------------------------------------- + /** + * Returns the next action factory proxy in the delegation chain. + * + * @return next action factory proxy + */ protected ActionFactory getNextFactory() { return nextFactory; Index: webwork/src/main/webwork/action/factory/AliasingActionFactoryProxy.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/factory/AliasingActionFacto ryProxy.java,v retrieving revision 1.10 diff -u -r1.10 AliasingActionFactoryProxy.java --- webwork/src/main/webwork/action/factory/AliasingActionFactoryProxy.java 11 Mar 2002 09:02:33 -0000 1.10 +++ webwork/src/main/webwork/action/factory/AliasingActionFactoryProxy.java 14 Mar 2002 04:18:47 -0000 @@ -11,7 +11,6 @@ import java.util.Hashtable; import java.util.Map; -import java.security.AccessController; import org.apache.log4j.Category; @@ -22,7 +21,7 @@ * Using aliases also allow you to use the same action class with * many result view mappings. * <p> - * If the configuration flag "webwork.only.aliasing" is set to "true", + * If the configuration flag <code>"webwork.only.aliasing"</code> 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. @@ -56,7 +55,10 @@ // ActionFactory overrides --------------------------------------- /** - * Get an action object. Substitute name with action name + * 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 <code>".action"</code> suffix. * * @param aName * @return the action corresponding to the given alias Index: webwork/src/main/webwork/action/factory/CommandActionFactoryProxy.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/factory/CommandActionFactor yProxy.java,v retrieving revision 1.9 diff -u -r1.9 CommandActionFactoryProxy.java --- webwork/src/main/webwork/action/factory/CommandActionFactoryProxy.java 12 Mar 2002 12:54:08 -0000 1.9 +++ webwork/src/main/webwork/action/factory/CommandActionFactoryProxy.java 14 Mar 2002 04:18:47 -0000 @@ -11,9 +11,8 @@ import webwork.action.ActionContext; /** - * Support for "commands". This will separate out the command name from the - * action name, and set it on the action so that the action may execute - * using the given command. + * Executes a "command" within an action specified either as part of the + * action name or as a parameter value. * * @author Rickard Öberg (ri...@mi...) * @version $Revision: 1.9 $ @@ -31,12 +30,16 @@ // ActionFactory overrides --------------------------------------- /** - * Get an action object. Extract command name, and set it if - * the action is command-aware. + * Locates the matching action object from the action factory proxy chain + * and then executes a command on it if the {@link CommandDriven} interface + * is implemented. The command is determined either by using the text + * after the <code>"!"</code> in the action name or from the value of the + * first parameter named + * <code>"command."</code> * - * @param name - * @return the action corresponding to the given alias - * @exception ServletException + * @param aName + * @return action from the next action factory proxy + * @exception Exception */ public Action getActionImpl(String aName) throws Exception Index: webwork/src/main/webwork/action/factory/ContextActionFactoryProxy.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/factory/ContextActionFactor yProxy.java,v retrieving revision 1.12 diff -u -r1.12 ContextActionFactoryProxy.java --- webwork/src/main/webwork/action/factory/ContextActionFactoryProxy.java 12 Mar 2002 12:54:08 -0000 1.12 +++ webwork/src/main/webwork/action/factory/ContextActionFactoryProxy.java 14 Mar 2002 04:18:47 -0000 @@ -7,11 +7,12 @@ package webwork.action.factory; import webwork.action.*; -import webwork.util.BeanUtil; import java.util.Map; /** + * Initializes an action for each implemented <code>*Aware</code> interface + * after first locating the action through the action factory proxy chain. * * @author Rickard Öberg (ri...@mi...) * @version $Revision: 1.12 $ @@ -43,6 +44,19 @@ } // Protected ----------------------------------------------------- + /** + * Initializes the specified action object for each <code>*Aware</code> + * interface it implements. The following interfaces are supported and + * initialized in the this order: + * <ul> + * <li>{@link ServletRequestAware}</li> + * <li>{@link ServletResponseAware}</li> + * <li>{@link SessionAware}</li> + * <li>{@link ApplicationAware}</li> + * <li>{@link ParameterAware}</li> + * <li>{@link LocaleAware}</li> + * </ul> + */ protected void setActionContext(Object anAction) { ActionContext context = ActionContext.getContext(); Index: webwork/src/main/webwork/action/factory/DefaultActionFactory.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/factory/DefaultActionFactor y.java,v retrieving revision 1.20 diff -u -r1.20 DefaultActionFactory.java --- webwork/src/main/webwork/action/factory/DefaultActionFactory.java 11 Mar 2002 09:02:33 -0000 1.20 +++ webwork/src/main/webwork/action/factory/DefaultActionFactory.java 14 Mar 2002 04:18:47 -0000 @@ -7,12 +7,43 @@ package webwork.action.factory; import webwork.action.Action; -import org.apache.log4j.Category; /** - * Facade action factory that creates the default set of action factory proxies. - * It will delegate to the proxies as implementation, thus basically providing - * a Facade to them. + * 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. + * + * <p>The order in which factory proxies are executed is as follows:</p> + * <ol> + * <li>{@link ParametersActionFactoryProxy} - + * Sets parameters on the action.</li> + * <li>{@link PrepareActionFactoryProxy} - + * Prepares or initializes the action.</li> + * <li>{@link ContextActionFactoryProxy} - + * Establishes the action's context by executing methods for all + * implemented <code>Aware*</code> interfaces.</li> + * <li>{@link CommandActionFactoryProxy} - + * Executes a specified "command" method if the action implements + * the {@link webwork.action.CommandDriven} interface.</li> + * <li>{@link AliasingActionFactoryProxy} - + * Locates an action from the configuration substituting the alias + * with the associated action string.</li> + * <li>{@link CommandActionFactoryProxy} - + * Executes a specified "command" method again in the event the + * original action name was originally an alias.</li> + * <li>{@link JspActionFactoryProxy} - + * Returns the JSP action if its suffix is ".jsp".</li> + * <li>{@link PrefixActionFactoryProxy} - + * Returns an action using a configured list of packages to prefix + * its name.</li> + * <li>{@link XMLActionFactoryProxy} - + * Returns the XML action if its suffix is ".xml".</li> + * <li>{@link ScriptActionFactoryProxy} - + * Returns the Script action if its suffix matches that of a supported + * scripting language.</li> + * <li>{@link JavaActionFactory} - + * Returns an action object from a fully qualified classname.</li> + * </ol> * * @author Rickard Öberg (ri...@mi...) * @version $Revision: 1.20 $ @@ -24,8 +55,7 @@ ActionFactory factory; /** - * Initialize factory - * + * Initialize action factory proxy delegation chain. */ public DefaultActionFactory() { @@ -46,11 +76,12 @@ } /** - * 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. * * @param name classname of the action to be created * @return the action corresponding to the given name - * @exception ServletException + * @exception Exception */ public Action getActionImpl(String name) throws Exception Index: webwork/src/main/webwork/action/factory/JavaActionFactory.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/factory/JavaActionFactory.j ava,v retrieving revision 1.7 diff -u -r1.7 JavaActionFactory.java --- webwork/src/main/webwork/action/factory/JavaActionFactory.java 11 Mar 2002 09:02:33 -0000 1.7 +++ webwork/src/main/webwork/action/factory/JavaActionFactory.java 14 Mar 2002 04:18:47 -0000 @@ -12,13 +12,7 @@ import java.util.Map; /** - * Main dispatcher servlet. It works in three phases: first propagate all - * parameters to the command JavaBean. Second, call execute() to let the - * JavaBean create the result data. Third, delegate to the JSP that corresponds to - * the result state that was chosen by the JavaBean. - * - * The command JavaBeans can be found in a package prefixed with either - * of the package names in the comma-separated "packages" servlet init parameter. + * Returns a loaded and instantiated action class instance. * * @author Rickard Öberg (ri...@mi...) * @version $Revision: 1.7 $ @@ -33,9 +27,6 @@ // HttpServlet overrides ----------------------------------------- /** * Initialize factory - * - * @param config - * @exception ServletException */ public JavaActionFactory() { @@ -44,11 +35,12 @@ } /** - * Get an action object. The name should be the fully qualified classname of the action. + * Returns a loaded and instantiated action class instance using a fully + * qualified classname. * * @param name classname of the action to be created * @return get the action corresponding to the given Java class name - * @exception ServletException + * @exception Exception */ public Action getActionImpl(String name) throws Exception Index: webwork/src/main/webwork/action/factory/JspActionFactoryProxy.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/factory/JspActionFactoryPro xy.java,v retrieving revision 1.6 diff -u -r1.6 JspActionFactoryProxy.java --- webwork/src/main/webwork/action/factory/JspActionFactoryProxy.java 11 Mar 2002 09:02:33 -0000 1.6 +++ webwork/src/main/webwork/action/factory/JspActionFactoryProxy.java 14 Mar 2002 04:18:47 -0000 @@ -10,6 +10,8 @@ import webwork.action.standard.JSP; /** + * Obtains the JSP action if the action suffix is <code>".jsp"</code>. + * * @author Rickard Öberg (ri...@mi...) * @version $Revision: 1.6 $ */ @@ -26,12 +28,11 @@ // ActionFactory overrides --------------------------------------- /** - * Get an action object. If the last part of the action is a JSP extension (i.e. ".jsp") then get the - * JSP action and execute the page with it. + * If the suffix of the action is <code>".jsp"</code>, return the JSP action. * - * @param name + * @param aName * @return the JSP-action or action corresponding to the given name - * @exception ServletException + * @exception Exception */ public Action getActionImpl(String aName) throws Exception Index: webwork/src/main/webwork/action/factory/ParametersActionFactoryProxy.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/factory/ParametersActionFac toryProxy.java,v retrieving revision 1.5 diff -u -r1.5 ParametersActionFactoryProxy.java --- webwork/src/main/webwork/action/factory/ParametersActionFactoryProxy.java 12 Mar 2002 12:54:08 -0000 1.5 +++ webwork/src/main/webwork/action/factory/ParametersActionFactoryProxy.java 14 Mar 2002 04:18:47 -0000 @@ -12,6 +12,8 @@ import java.util.Map; /** + * Sets properties on an action from parameters after locating it through + * the action factory proxy chain. * * @author Rickard Öberg (ri...@mi...) * @version $Revision: 1.5 $ @@ -28,6 +30,11 @@ } // ActionFactory implementation ------------------------------- + /** + * Sets properties on the obtained action from the parameters. + * + * @see BeanUtil#setProperties(Map, Object) + */ public Action getActionImpl(String aName) throws Exception { Index: webwork/src/main/webwork/action/factory/PrefixActionFactoryProxy.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/factory/PrefixActionFactory Proxy.java,v retrieving revision 1.11 diff -u -r1.11 PrefixActionFactoryProxy.java --- webwork/src/main/webwork/action/factory/PrefixActionFactoryProxy.java 11 Mar 2002 09:02:33 -0000 1.11 +++ webwork/src/main/webwork/action/factory/PrefixActionFactoryProxy.java 14 Mar 2002 04:18:47 -0000 @@ -16,6 +16,11 @@ import java.util.StringTokenizer; /** + * Locate an action based on the configured list of package prefixes. + * The configuration property <code>webwork.action.packages</code> is used + * to specify a comma separated list of packages that should be considered + * as prefixes. The default package prefix list is: <code>webwork.action.test</code> + * and <code>webwork.action.standard</code>. * * @author Rickard Öberg (ri...@mi...) * @version $Revision: 1.11 $ @@ -56,11 +61,13 @@ // ActionFactory overrides --------------------------------------- /** - * Get an action object. Add prefix to given name, and delegate to next factory. + * Returns an action class instance after searching through a list of + * package prefixes from the configuration properties. If no action + * was found, get the action from the action factory proxy chain. * - * @param name - * @return action whose given name may be prefixed by this factory - * @exception ServletException + * @param aName + * @return action whose name may be prefixed by this factory + * @exception Exception */ public Action getActionImpl(String aName) throws Exception Index: webwork/src/main/webwork/action/factory/PrepareActionFactoryProxy.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/factory/PrepareActionFactor yProxy.java,v retrieving revision 1.4 diff -u -r1.4 PrepareActionFactoryProxy.java --- webwork/src/main/webwork/action/factory/PrepareActionFactoryProxy.java 11 Mar 2002 09:02:33 -0000 1.4 +++ webwork/src/main/webwork/action/factory/PrepareActionFactoryProxy.java 14 Mar 2002 04:18:47 -0000 @@ -6,12 +6,14 @@ */ package webwork.action.factory; -import webwork.action.*; -import webwork.util.BeanUtil; +import webwork.action.Action; +import webwork.action.PrepareAction; import java.util.Map; /** + * Prepares or initializes an action implementing the {@link PrepareAction} + * interface after first locating it through the action factory proxy chain. * * @author Rickard Öberg (ri...@mi...) * @version $Revision: 1.4 $ Index: webwork/src/main/webwork/action/factory/ScriptActionFactoryProxy.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/factory/ScriptActionFactory Proxy.java,v retrieving revision 1.8 diff -u -r1.8 ScriptActionFactoryProxy.java --- webwork/src/main/webwork/action/factory/ScriptActionFactoryProxy.java 11 Mar 2002 09:02:34 -0000 1.8 +++ webwork/src/main/webwork/action/factory/ScriptActionFactoryProxy.java 14 Mar 2002 04:18:47 -0000 @@ -10,13 +10,7 @@ import webwork.action.standard.Script; /** - * Main dispatcher servlet. It works in three phases: first propagate all - * parameters to the command JavaBean. Second, call execute() to let the - * JavaBean create the result data. Third, delegate to the JSP that corresponds to - * the result state that was chosen by the JavaBean. - * - * The command JavaBeans can be found in a package prefixed with either - * of the package names in the comma-separated "packages" servlet init parameter. + * Obtains the Script action if the suffix is a supported scripting suffix. * * @author Rickard Öberg (ri...@mi...) * @version $Revision: 1.8 $ @@ -34,12 +28,13 @@ // ActionFactory overrides --------------------------------------- /** - * Get an action object. If the last part of the action is a scripting extension (e.g. ".js") then get the - * Script action and load the script with it. + * If the suffix of the action is a scripting extension, get the Script + * action and then load the script. Currently, <code>".js"</code> + * is the only suffix supported. * - * @param name - * @return the script or action corresponding to the given name - * @exception ServletException + * @param aName + * @return the script action or an action corresponding to the given name + * @exception Exception */ public Action getActionImpl(String aName) throws Exception Index: webwork/src/main/webwork/action/factory/XMLActionFactoryProxy.java =================================================================== RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/factory/XMLActionFactoryPro xy.java,v retrieving revision 1.4 diff -u -r1.4 XMLActionFactoryProxy.java --- webwork/src/main/webwork/action/factory/XMLActionFactoryProxy.java 3 Mar 2002 04:05:20 -0000 1.4 +++ webwork/src/main/webwork/action/factory/XMLActionFactoryProxy.java 14 Mar 2002 04:18:47 -0000 @@ -11,6 +11,8 @@ import webwork.action.standard.XML; /** + * Obtain the XML action if the action suffix is <code>".xml"</code>. + * * @author Philipp Meier <me...@o-...> * @version $Revision: 1.4 $ */ @@ -26,12 +28,11 @@ // ActionFactory overrides --------------------------------------- /** - * Get an action object. If the last part of the action is a XML extension (i.e. ".xml") then get the - * XMl action and execute the page with it. + * If the suffix of the action is <code>".xml"</code>, get the XML action. * - * @param name + * @param aName * @return the XML-action or action corresponding to the given name - * @exception ServletException + * @exception Exception */ public Action getActionImpl(String aName) throws Exception { |