[maven-release-plugin]  copy for tag FULCRUM_UPLOAD_1_0_5

git-svn-id: https://svn.apache.org/repos/asf/turbine/fulcrum/tags/FULCRUM_UPLOAD_1_0_5@1351119 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/NOTICE.txt b/NOTICE.txt
index dbad3ff..34d2e6a 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -1,5 +1,5 @@
 Turbine Fulcrum Upload Component
-Copyright 2005-2009 The Apache Software Foundation.
+Copyright 2005-2012 The Apache Software Foundation.
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
diff --git a/pom.xml b/pom.xml
index 8a84ad1..0df89a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -135,7 +135,7 @@
     <maven.compile.target>1.5</maven.compile.target>
     <!-- This bits are used for the staging directory -->
     <fulcrum.release.version>1.0.5</fulcrum.release.version>
-    <fulcrum.rc.version>RC1</fulcrum.rc.version>  
+    <fulcrum.rc.version>RC2</fulcrum.rc.version>  
     <fulcrum.deployment.protocol>scpexe</fulcrum.deployment.protocol>
   </properties>  
 	
diff --git a/src/java/org/apache/fulcrum/upload/DefaultUploadService.java b/src/java/org/apache/fulcrum/upload/DefaultUploadService.java
index bcc3a47..bd77d3a 100644
--- a/src/java/org/apache/fulcrum/upload/DefaultUploadService.java
+++ b/src/java/org/apache/fulcrum/upload/DefaultUploadService.java
@@ -54,7 +54,7 @@
  * type, as specified by RFC 1867.  Use {@link
  * org.apache.fulcrum.parser.ParameterParser#getFileItems(String)} to
  * acquire an array of {@link
- * org.apache.commons.fileupload.FileItem} onjects associated with given
+ * org.apache.commons.fileupload.FileItem} objects associated with given
  * html form.
  *
  * @author <a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>
@@ -114,7 +114,7 @@
     }
 
     /**
-     * <p>Parses a <a href="http://rf.cx/rfc1867.html">RFC 1867</a>
+     * <p>Parses a <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
      * compliant <code>multipart/form-data</code> stream.</p>
      *
      * @param req The servlet request to be parsed.
@@ -128,7 +128,7 @@
     }
 
     /**
-     * <p>Parses a <a href="http://rf.cx/rfc1867.html">RFC 1867</a>
+     * <p>Parses a <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
      * compliant <code>multipart/form-data</code> stream.</p>
      *
      * @param req The servlet request to be parsed.
@@ -143,7 +143,7 @@
     }
 
     /**
-     * <p>Parses a <a href="http://rf.cx/rfc1867.html">RFC 1867</a>
+     * <p>Parses a <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
      * compliant <code>multipart/form-data</code> stream.</p>
      *
      * @param req The servlet request to be parsed.
@@ -161,7 +161,7 @@
     }
 
     /**
-     * <p>Parses a <a href="http://rf.cx/rfc1867.html">RFC 1867</a>
+     * <p>Parses a <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
      * compliant <code>multipart/form-data</code> stream.</p>
      *
      * @param req The servlet request to be parsed.
@@ -171,6 +171,7 @@
      * @exception ServiceException Problems reading/parsing the
      * request or storing the uploaded file(s).
      */
+    @SuppressWarnings("unchecked")
     protected List<FileItem> parseRequest(HttpServletRequest req, int sizeMax, DiskFileItemFactory factory)
             throws ServiceException
     {
@@ -188,6 +189,54 @@
     }
 
     /**
+     * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
+     * compliant <code>multipart/form-data</code> stream.
+     *
+     * @param req The servlet request to be parsed.
+     *
+     * @return An iterator to instances of <code>FileItemStream</code>
+     *         parsed from the request, in the order that they were
+     *         transmitted.
+     *
+     * @throws ServiceException if there are problems reading/parsing
+     *                             the request or storing files. This
+     *                             may also be a network error while
+     *                             communicating with the client or a
+     *                             problem while storing the uploaded
+     *                             content.
+     */
+    public FileItemIterator getItemIterator(HttpServletRequest req) throws ServiceException
+    {
+        ServletFileUpload upload = new ServletFileUpload();
+        try
+        {
+            return upload.getItemIterator(req);
+        }
+        catch (FileUploadException e)
+        {
+            throw new ServiceException(UploadService.ROLE, e.getMessage(), e);
+        }
+        catch (IOException e)
+        {
+            throw new ServiceException(UploadService.ROLE, e.getMessage(), e);
+        }
+    }
+
+    /**
+     * Utility method that determines whether the request contains multipart
+     * content.
+     *
+     * @param req The servlet request to be evaluated. Must be non-null.
+     *
+     * @return <code>true</code> if the request is multipart;
+     *         <code>false</code> otherwise.
+     */
+    public boolean isMultipart(HttpServletRequest req)
+    {
+        return ServletFileUpload.isMultipartContent(req);
+    }
+
+    /**
      * @see org.apache.fulcrum.ServiceBroker#getRealPath(String)
      */
     private String getRealPath(String path)
@@ -229,6 +278,8 @@
     }
 
     /**
+     * Avalon component lifecycle method
+     *
      * Initializes the service.
      *
      * This method processes the repository path, to make it relative to the
@@ -251,55 +302,11 @@
         itemFactory = new DiskFileItemFactory(sizeThreshold, new File(repositoryPath));
     }
 
+    /**
+     * Avalon component lifecycle method
+     */
     public void contextualize(Context context) throws ContextException
     {
         this.applicationRoot = context.get( "urn:avalon:home" ).toString();
     }
-
-    /**
-     * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
-     * compliant <code>multipart/form-data</code> stream.
-     *
-     * @param request The servlet request to be parsed.
-     *
-     * @return An iterator to instances of <code>FileItemStream</code>
-     *         parsed from the request, in the order that they were
-     *         transmitted.
-     *
-     * @throws ServiceException if there are problems reading/parsing
-     *                             the request or storing files. This 
-     *                             may also be a network error while 
-     *                             communicating with the client or a 
-     *                             problem while storing the uploaded 
-     *                             content.
-     */    
-    public FileItemIterator getItemIterator(HttpServletRequest req) throws ServiceException {
-        ServletFileUpload upload = new ServletFileUpload();
-        try
-        {
-            return upload.getItemIterator(req);
-        } 
-        catch (FileUploadException e)
-        {
-            throw new ServiceException(UploadService.ROLE, e.getMessage(), e);
-        } 
-        catch (IOException e)
-        {
-            throw new ServiceException(UploadService.ROLE, e.getMessage(), e);
-        }        
-    }
-
-    /**
-     * Utility method that determines whether the request contains multipart
-     * content.
-     *
-     * @param request The servlet request to be evaluated. Must be non-null.
-     *
-     * @return <code>true</code> if the request is multipart;
-     *         <code>false</code> otherwise.
-     */      
-    public boolean isMultipart(HttpServletRequest req)
-    {
-        return ServletFileUpload.isMultipartContent(req);
-    }
 }
diff --git a/src/java/org/apache/fulcrum/upload/UploadService.java b/src/java/org/apache/fulcrum/upload/UploadService.java
index 220d029..3088938 100644
--- a/src/java/org/apache/fulcrum/upload/UploadService.java
+++ b/src/java/org/apache/fulcrum/upload/UploadService.java
@@ -34,7 +34,7 @@
  * POST requests and turning them into form fields and uploaded files.
  * This can be either performed automatically by the {@link
  * org.apache.fulcrum.parser.ParameterParser} or manually by an user
- * definded {@link org.apache.turbine.modules.Action}.
+ * defined {@link org.apache.turbine.modules.Action}.
  *
  * @author <a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>
  * @author <a href="mailto:dlr@collab.net">Daniel Rall</a>
@@ -145,7 +145,7 @@
     String HEADER_ENCODING_DEFAULT = "ISO-8859-1";
 
     /**
-     * <p>Parses a <a href="http://rf.cx/rfc1867.html">RFC 1867</a>
+     * <p>Parses a <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
      * compliant <code>multipart/form-data</code> stream.</p>
      *
      * @param req The servlet request to be parsed.
@@ -156,7 +156,7 @@
         throws ServiceException;
 
     /**
-     * <p>Parses a <a href="http://rf.cx/rfc1867.html">RFC 1867</a>
+     * <p>Parses a <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
      * compliant <code>multipart/form-data</code> stream.</p>
      *
      * @param req The servlet request to be parsed.
@@ -168,7 +168,7 @@
         throws ServiceException;
 
     /**
-     * <p>Parses a <a href="http://rf.cx/rfc1867.html">RFC 1867</a>
+     * <p>Parses a <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
      * compliant <code>multipart/form-data</code> stream.</p>
      *
      * @param req The servlet request to be parsed.
@@ -187,22 +187,22 @@
      * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
      * compliant <code>multipart/form-data</code> stream.
      *
-     * @param request The servlet request to be parsed.
+     * @param req The servlet request to be parsed.
      *
      * @return An iterator to instances of <code>FileItemStream</code>
      *         parsed from the request, in the order that they were
      *         transmitted.
      *
      * @throws ServiceException if there are problems reading/parsing
-     *                             the request or storing files. This 
-     *                             may also be a network error while 
-     *                             communicating with the client or a 
-     *                             problem while storing the uploaded 
+     *                             the request or storing files. This
+     *                             may also be a network error while
+     *                             communicating with the client or a
+     *                             problem while storing the uploaded
      *                             content.
      */
     FileItemIterator getItemIterator(HttpServletRequest req) throws ServiceException;
-    
-    
+
+
     /**
      * <p> Retrieves the value of <code>size.max</code> property of the
      * {@link org.apache.fulcrum.upload.UploadService}.
@@ -239,11 +239,11 @@
      * Utility method that determines whether the request contains multipart
      * content.
      *
-     * @param request The servlet request to be evaluated. Must be non-null.
+     * @param req The servlet request to be evaluated. Must be non-null.
      *
      * @return <code>true</code> if the request is multipart;
      *         <code>false</code> otherwise.
-     */    
+     */
     boolean isMultipart(HttpServletRequest req);
-    
+
 }
diff --git a/src/site/site.xml b/src/site/site.xml
index 206836e..f16b925 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -24,7 +24,6 @@
   <body>
     <menu name="Overview">
       <item name="Main"                 href="/index.html"/>
-      <item name="Properties"           href="/properties.html" />
     </menu>
   </body>
 </project>
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 2ad7af0..f402b26 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -24,7 +24,10 @@
   </properties>
 
   <body>
-    <release version="1.0.5" date="2012-05-11">
+    <release version="1.0.5" date="2012-06-17">
+      <action dev="tv" type="update">
+        Cleanup documentation
+      </action>
       <action dev="ludwig" type="update">
         Add methods to use the streaming API
       </action>
diff --git a/xdocs/index.xml b/xdocs/index.xml
index 3df9480..2bdacbd 100644
--- a/xdocs/index.xml
+++ b/xdocs/index.xml
@@ -39,45 +39,68 @@
     </p>
   </section>
 
-<section name="Configuration">
+  <section name="Configuration">
+    <subsection name="Role Configuration">
+      <source><![CDATA[
+<role
+    name="org.apache.fulcrum.upload.UploadService"
+    shorthand="upload"
+    default-class="org.apache.fulcrum.upload.DefaultUploadService"/>
+      ]]></source>
+    </subsection>
+    
+    <subsection name="Component Configuration">
+      <table>
+        <tr>
+          <th>Item</th>
+          <th>Datatype</th>
+          <th>Cardinality</th>
+          <th>Description</th>
+        </tr>
+        <tr>
+          <td>repository</td>
+          <td>String</td>
+          <td>[0|1]</td>
+          <td>
+          The directory where files will be temporarily stored (default is ".").
+          On Win32 file systems an entry of the form 
+          <code>f:\path\to\upload\repository</code> is most likely necessary.
+          </td>
+        </tr>
+        <tr>
+          <td>sizeMax</td>
+          <td>Integer</td>
+          <td>[0|1]</td>
+          <td>
+          The maximum size of a request that will be processed 
+          (default is 1048576 bytes).
+          </td>
+        </tr>
+        <tr>
+          <td>sizeThreshold</td>
+          <td>Integer</td>
+          <td>[0|1]</td>
+          <td>
+          The maximum size of a request that will have it's elements cached in 
+          memory (default is 10240 bytes).
+          </td>
+        </tr>
+        <tr>
+          <td>headerEncoding</td>
+          <td>String</td>
+          <td>[0|1]</td>
+          <td>
+          Used to specify how the headers are encoded (default is "ISO-8859-1").
+          </td>
+        </tr>
+      </table>
+    </subsection>
 
-    <p>
-      First, here is the role configuration.
-    </p>
-
-    <source>
-    <![CDATA[
-        <role
-            name="org.apache.fulcrum.upload.UploadService"
-            shorthand="upload"
-            default-class="org.apache.fulcrum.upload.DefaultUploadService"/>
-    ]]>
-    </source>
-
-      <p>
-        And here is the configuration:
-      </p>
-    <source>
-
-    <![CDATA[
-        <upload repository="target" sizeMax="1048576" sizeThreshold="10240" headerEncoding="UTF-8"/>
-    ]]>
-    </source>
-<p>
-repository is the directory where files will be temporarily stored (default is ".").
-On Win32 file systems an entry of the form <code>f:\path\to\upload\repository</code>
-is most likely necessary.
-</p>
-<p>
-sizeMax is the maximum size of a request that will be processed (default is 1048576 bytes).
-</p>
-<p>
-sizeThreshold is the maximum size of a request that will have it's elements cached in memory (default is 10240 bytes).
-</p>
-<p>
-headerEncoding is used to specify how the headers are encoded (default is "ISO-8859-1").
-</p>
-
+    <subsection name="Component Configuration Example">
+      <source><![CDATA[
+<upload repository="target" sizeMax="1048576" sizeThreshold="10240" headerEncoding="UTF-8"/>
+      ]]></source>
+    </subsection>
   </section>
 
   <section name="Usage">
@@ -87,13 +110,11 @@
 </p>
 
 <source test=""><![CDATA[
-
 <form enctype="multipart/form-data" method="POST">
-<input type="hidden" name="action" value="UploadExample" />
-<input type="file" name="filename">
-<input type="submit" value="upload" />
+  <input type="hidden" name="action" value="UploadExample" />
+  <input type="file" name="filename">
+  <input type="submit" value="upload" />
 </form>
-
 ]]></source>
 
 <p>
@@ -107,8 +128,8 @@
 but you can achieve this manually thus:
 </p>
 <source test=""><![CDATA[
-    UploadService us = (UploadService) this.lookup(UploadService.ROLE);
-    List fileItems = us.parse(request);
+UploadService us = (UploadService) this.lookup(UploadService.ROLE);
+List fileItems = us.parse(request);
 ]]></source>
 
 <p>
diff --git a/xdocs/properties.xml b/xdocs/properties.xml
deleted file mode 100644
index ac8a008..0000000
--- a/xdocs/properties.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<document>
-
-  <properties>
-    <title>Fulcrum Upload Properties</title>
-    <author email="epugh@opensourceconnections.com">Eric Pugh</author>
-  </properties>
-
-  <body>
-    <section name="Fulcrum Upload Settings">
-      <table>
-        <tr><th>Property</th><th>Optional?</th><th>Description</th></tr>
-        <tr>
-          <td>repository</td>
-          <td>Yes</td>
-          <td>
-            The directory where files will be temporarily stored.  For example WEB-INF
-          </td>
-        </tr>
-        <tr>
-          <td>sizeMax</td>
-          <td>Yes</td>
-          <td>
-            The maximum size of a request that will be processed.  For example 157286400
-          </td>
-        </tr>
-        <tr>
-          <td>sizeThreshold</td>
-          <td>Yes</td>
-          <td>
-            The maximum size of a request that will have it's elements cached in
-            memory.  For example 8192
-          </td>
-        </tr>
-
-      </table>
-    </section>
-
-  </body>
-</document>