Author: bpontarelli
Date: Fri Dec 28 21:24:27 2007
New Revision: 607376

URL: http://svn.apache.org/viewvc?rev=607376&view=rev
Log:
Comment updates

Modified:
    
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ActionConfigBuilder.java
    
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ClasspathConfigurationProvider.java
    
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
    
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionsService.java
    
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java
    
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/DefaultActionNameBuilder.java
    
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java
    
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
    
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/SEOActionNameBuilder.java
    
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/annotation/ResultPath.java
    
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/annotation/Results.java

Modified: 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ActionConfigBuilder.java
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ActionConfigBuilder.java?rev=607376&r1=607375&r2=607376&view=diff
==============================================================================
--- 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ActionConfigBuilder.java
 (original)
+++ 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ActionConfigBuilder.java
 Fri Dec 28 21:24:27 2007
@@ -25,13 +25,11 @@
  * This interface defines how the action configurations for the current
  * web application can be constructed. This must find all actions that
  * are not specifically defined in the struts XML files or any plugins.
- * Otherwise, the [EMAIL PROTECTED] ConventionUnknownHandler} will not be able 
to
- * handle the unknown actions. Furthermore, it must make every effort
- * to locate all action results as well. The [EMAIL PROTECTED] 
ConventionUnknownHandler}
- * doesn't handle unknown results at all and just throws exceptions.
+ * Furthermore, it must make every effort to locate all action results
+ * as well.
  * </p>
  *
- * @author Brian Pontarelli
+ * @author  Brian Pontarelli
  */
 public interface ActionConfigBuilder {
     /**

Modified: 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ClasspathConfigurationProvider.java
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ClasspathConfigurationProvider.java?rev=607376&r1=607375&r2=607376&view=diff
==============================================================================
--- 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ClasspathConfigurationProvider.java
 (original)
+++ 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ClasspathConfigurationProvider.java
 Fri Dec 28 21:24:27 2007
@@ -31,7 +31,9 @@
  * <p>
  * This class is a configuration provider for the XWork configuration
  * system. This is really the only way to truly handle loading of the
- * packages, actions and results correctly.
+ * packages, actions and results correctly. This doesn't contain any
+ * logic and instead delegates to the configured instance of the
+ * [EMAIL PROTECTED] ActionConfigBuilder} interface.
  * </p>
  *
  * @author Brian Pontarelli

Modified: 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java?rev=607376&r1=607375&r2=607376&view=diff
==============================================================================
--- 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
 (original)
+++ 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
 Fri Dec 28 21:24:27 2007
@@ -48,8 +48,18 @@
 /**
  * <p>
  * This class is the default unknown handler for all of the Convention
- * plugin integration with XWork.
+ * plugin integration with XWork. This handles instances when a URL doesn't
+ * have an action associated with it but does a viable result and also the
+ * instance where an action returns a result code that isn't already
+ * configured but there is a viable result for the code.
  * </p>
+ *
+ * <p>
+ * This class also handles all of the index actions using redirects
+ * and actions in nested packages. For example, if there is an action
+ * <strong>/foo/index</strong> and the URL <strong>/foo</strong> is used,
+ * this will render the index action in the /foo namespace.
+ * </p> 
  *
  * @author  Brian Pontarelli
  */

Modified: 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionsService.java
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionsService.java?rev=607376&r1=607375&r2=607376&view=diff
==============================================================================
--- 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionsService.java
 (original)
+++ 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionsService.java
 Fri Dec 28 21:24:27 2007
@@ -29,16 +29,20 @@
 /**
  * <p>
  * This interface defines the conventions that are used by the convention 
plugin.
+ * In most cases the methods on this class will provide the best default for 
any
+ * values and also handle locating overrides of the default via the annotations
+ * that are part of the plugin.
  * </p>
  *
- * @author Brian Pontarelli
+ * @author  Brian Pontarelli
  */
 public interface ConventionsService {
     /**
-     * Locates the result location from annotations on the action class or the 
package.
+     * Locates the result location from annotations on the action class or the 
package or returns the
+     * default if no annotations are present.
      *
      * @param   actionClass The action class.
-     * @return  The result location if it is set in the annotations otherwise, 
the default result
+     * @return  The result location if it is set in the annotations. 
Otherwise, the default result
      *          location is returned.
      */
     String determineResultPath(Class<?> actionClass);
@@ -49,7 +53,8 @@
      * @param   actionConfig (Optional) The configuration for the action that 
the result is being
      *          built for or null if the default result path is needed.
      * @return  The result location if it is set in the annotations for the 
class of the ActionConfig.
-     *          Otherwise, the default result location is returned.
+     *          Otherwise, the default result location is returned. If null is 
passed in, the default
+     *          is returned,
      */
     String determineResultPath(ActionConfig actionConfig);
 

Modified: 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java?rev=607376&r1=607375&r2=607376&view=diff
==============================================================================
--- 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java
 (original)
+++ 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/ConventionsServiceImpl.java
 Fri Dec 28 21:24:27 2007
@@ -35,7 +35,8 @@
 
 /**
  * <p>
- * This
+ * This class is the implementation of the [EMAIL PROTECTED] 
ConventionsService}
+ * interface and provides all of the defaults and annotation handling.
  * </p>
  *
  * @author Brian Pontarelli
@@ -43,6 +44,12 @@
 public class ConventionsServiceImpl implements ConventionsService {
     private String resultPath;
 
+    /**
+     * Constructs a new instance.
+     *
+     * @param   resultPath The result path that is configured in the Struts 
configuration files using
+     *          the constant name of 
<strong>struts.convention.result.path</strong>.
+     */
     @Inject
     public ConventionsServiceImpl(@Inject("struts.convention.result.path") 
String resultPath) {
         this.resultPath = resultPath;

Modified: 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/DefaultActionNameBuilder.java
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/DefaultActionNameBuilder.java?rev=607376&r1=607375&r2=607376&view=diff
==============================================================================
--- 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/DefaultActionNameBuilder.java
 (original)
+++ 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/DefaultActionNameBuilder.java
 Fri Dec 28 21:24:27 2007
@@ -24,8 +24,11 @@
 
 /**
  * <p>
- * This class does nothing but strip the word <b>Action</b> from the end
- * of the class name and possible lower case the name as well.
+ * This class strips the word <b>Action</b> from the end of the class name
+ * and possibly lowercases the name as well depending on the value of the
+ * constant <strong>struts.convention.action.name.lowercase</strong>. If the
+ * constant is set to <strong>true</strong>, this class will lowercase all
+ * action names.
  * </p>
  *
  * @author Brian Pontarelli

Modified: 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java?rev=607376&r1=607375&r2=607376&view=diff
==============================================================================
--- 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java
 (original)
+++ 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java
 Fri Dec 28 21:24:27 2007
@@ -64,8 +64,6 @@
  * </p>
  *
  * <ul>
- * <li>The result-type is always the default result type for the XWork
- *  package. This current can not be modified.</li>
  * <li>The result config contains the location parameter, which is
  *  required by most result classes to figure out where to find the result.
  *  In addition, the config has all the parameters from the default result-type
@@ -76,22 +74,39 @@
  * After loading the files in the web application, this class will then
  * use any annotations on the action class to override what was found in
  * the web application files. These annotations are the [EMAIL PROTECTED] 
Result}
- * and [EMAIL PROTECTED] org.apache.struts2.convention.annotation.Results} 
annotations. These two annotations allow an action
+ * and [EMAIL PROTECTED] Results} annotations. These two annotations allow an 
action
  * to supply different or non-forward based results for specific return
  * values of an action method.
  * </p>
  *
  * <p>
- * The base result location used by this class for locating JSPs and other
+ * The result path used by this class for locating JSPs and other
  * such result files can be set using the Struts2 constant named
- * <b>struts.convention.base.result.location</b>.
+ * <strong>struts.convention.result.path</strong> or using the
+ * [EMAIL PROTECTED] org.apache.struts2.convention.annotation.ResultPath}
+ * annotation.
  * </p>
  *
  * <p>
- * Also, the base result location can be changed on an action class instance
- * basis by using the [EMAIL PROTECTED] 
org.apache.struts2.convention.annotation.ResultPath} annotation.
+ * This class will also locate and configure Results in the classpath,
+ * including velocity and FreeMarker templates inside the classpath.
  * </p>
  *
+ * <p>
+ * All results that are conigured from resources are given a type corresponding
+ * to the resources extension. The extensions and types are given in the
+ * table below:
+ * </p>
+ *
+ * <table>
+ * <tr><th>Extension</th><th>Type</th></tr>
+ * <tr><td>.jsp</td><td>dispatcher</td</tr>
+ * <tr><td>.html</td><td>dispatcher</td</tr>
+ * <tr><td>.htm</td><td>dispatcher</td</tr>
+ * <tr><td>.vm</td><td>velocity</td</tr>
+ * <tr><td>.ftl</td><td>freemarker</td</tr>
+ * </table>
+ * 
  * @author  Brian Pontarelli
  */
 public class DefaultResultMapBuilder implements ResultMapBuilder {

Modified: 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java?rev=607376&r1=607375&r2=607376&view=diff
==============================================================================
--- 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
 (original)
+++ 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
 Fri Dec 28 21:24:27 2007
@@ -48,10 +48,7 @@
 
 /**
  * <p>
- * This class implements the ActionConfigBuilder interface and uses
- * a list of comma separated packages to find the actions. This uses
- * the XWork2 ResolverUtil to find the classes that implement the
- * XWork2 [EMAIL PROTECTED] com.opensymphony.xwork2.Action} interface or whose 
name ends in [EMAIL PROTECTED] Action}.
+ * This class implements the ActionConfigBuilder interface.
  * </p>
  *
  * @author Brian Pontarelli

Modified: 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/SEOActionNameBuilder.java
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/SEOActionNameBuilder.java?rev=607376&r1=607375&r2=607376&view=diff
==============================================================================
--- 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/SEOActionNameBuilder.java
 (original)
+++ 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/SEOActionNameBuilder.java
 Fri Dec 28 21:24:27 2007
@@ -28,7 +28,7 @@
 /**
  * <p>
  * This class converts the class name into a SEO friendly name by recognizing
- * camel casing and inserting underscores. This also converts everything to
+ * camel casing and inserting dashes. This also converts everything to
  * lower case if desired. And this will also strip off the word <b>Action</b>
  * from the class name.
  * </p>

Modified: 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/annotation/ResultPath.java
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/annotation/ResultPath.java?rev=607376&r1=607375&r2=607376&view=diff
==============================================================================
--- 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/annotation/ResultPath.java
 (original)
+++ 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/annotation/ResultPath.java
 Fri Dec 28 21:24:27 2007
@@ -46,14 +46,14 @@
  *
  * <p>
  * The Convention plugin might find that the namespace is foo and the action
- * name is do_something and will need to find the results. Using this 
annotation
+ * name is do-something and will need to find the results. Using this 
annotation
  * you can set the base path of the results to something like
  * <code>/WEB-INF/jsps</code> so that the Convention plugin will look in the
  * web application for files of this pattern:
  * </p>
  *
  * <pre>
- * /WEB-INF/jsps/foo/do_something-&lt;resultCode>.ext
+ * /WEB-INF/jsps/foo/do-something-&lt;resultCode>.ext
  * </pre>
  *
  * @author  Brian Pontarelli
@@ -62,7 +62,7 @@
 @Target({ElementType.TYPE, ElementType.PACKAGE})
 public @interface ResultPath {
     /**
-     * @return  The base result path to use for this action, instead of the 
default.
+     * @return  The result path to use for this action, instead of the default.
      */
     String value() default "";
 

Modified: 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/annotation/Results.java
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/annotation/Results.java?rev=607376&r1=607375&r2=607376&view=diff
==============================================================================
--- 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/annotation/Results.java
 (original)
+++ 
struts/sandbox/trunk/struts2-convention-plugin/src/main/java/org/apache/struts2/convention/annotation/Results.java
 Fri Dec 28 21:24:27 2007
@@ -27,7 +27,7 @@
 
 /**
  * <p>
- * This annotation allows a class to define more than one [EMAIL PROTECTED] 
org.apache.struts2.convention.annotation.Result}
+ * This annotation allows a class to define more than one [EMAIL PROTECTED] 
Result}
  * annotations.
  * </p>
  *


Reply via email to