You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by mw...@apache.org on 2009/02/03 22:05:32 UTC

svn commit: r740443 - /james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/Fields.java

Author: mwiederkehr
Date: Tue Feb  3 21:05:32 2009
New Revision: 740443

URL: http://svn.apache.org/viewvc?rev=740443&view=rev
Log:
MIME4J-100, MIME4J-108: javadoc for Content-Disposition fields 

Modified:
    james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/Fields.java

Modified: james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/Fields.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/Fields.java?rev=740443&r1=740442&r2=740443&view=diff
==============================================================================
--- james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/Fields.java (original)
+++ james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/Fields.java Tue Feb  3 21:05:32 2009
@@ -66,12 +66,34 @@
                 Field.CONTENT_TRANSFER_ENCODING, contentTransferEncoding);
     }
 
+    /**
+     * Creates a content disposition field from the specified raw value. The
+     * specified string gets folded into a multiple-line representation if
+     * necessary but is otherwise taken as is.
+     * 
+     * @param contentDisposition
+     *            raw content disposition containing a disposition type and
+     *            optional parameters.
+     * @return the newly created content disposition field.
+     */
     public static ContentDispositionField contentDisposition(
             String contentDisposition) {
         return parse(ContentDispositionField.class, Field.CONTENT_DISPOSITION,
                 contentDisposition);
     }
 
+    /**
+     * Creates a content disposition field from the specified disposition type
+     * and parameters.
+     * 
+     * @param dispositionType
+     *            a disposition type (usually <code>&quot;inline&quot;</code>
+     *            or <code>&quot;attachment&quot;</code>).
+     * @param parameters
+     *            map containing disposition parameters such as
+     *            <code>&quot;filename&quot;</code>.
+     * @return the newly created content disposition field.
+     */
     public static ContentDispositionField contentDisposition(
             String dispositionType, Map<String, String> parameters) {
         if (!isValidDispositionType(dispositionType))
@@ -92,18 +114,65 @@
         }
     }
 
+    /**
+     * Creates a content disposition field from the specified disposition type
+     * and filename.
+     * 
+     * @param dispositionType
+     *            a disposition type (usually <code>&quot;inline&quot;</code>
+     *            or <code>&quot;attachment&quot;</code>).
+     * @param filename
+     *            filename parameter value or <code>null</code> if the
+     *            parameter should not be included.
+     * @return the newly created content disposition field.
+     */
     public static ContentDispositionField contentDisposition(
             String dispositionType, String filename) {
         return contentDisposition(dispositionType, filename, -1, null, null,
                 null);
     }
 
+    /**
+     * Creates a content disposition field from the specified values.
+     * 
+     * @param dispositionType
+     *            a disposition type (usually <code>&quot;inline&quot;</code>
+     *            or <code>&quot;attachment&quot;</code>).
+     * @param filename
+     *            filename parameter value or <code>null</code> if the
+     *            parameter should not be included.
+     * @param size
+     *            size parameter value or <code>-1</code> if the parameter
+     *            should not be included.
+     */
     public static ContentDispositionField contentDisposition(
             String dispositionType, String filename, long size) {
         return contentDisposition(dispositionType, filename, size, null, null,
                 null);
     }
 
+    /**
+     * Creates a content disposition field from the specified values.
+     * 
+     * @param dispositionType
+     *            a disposition type (usually <code>&quot;inline&quot;</code>
+     *            or <code>&quot;attachment&quot;</code>).
+     * @param filename
+     *            filename parameter value or <code>null</code> if the
+     *            parameter should not be included.
+     * @param size
+     *            size parameter value or <code>-1</code> if the parameter
+     *            should not be included.
+     * @param creationDate
+     *            creation-date parameter value or <code>null</code> if the
+     *            parameter should not be included.
+     * @param modificationDate
+     *            modification-date parameter value or <code>null</code> if
+     *            the parameter should not be included.
+     * @param readDate
+     *            read-date parameter value or <code>null</code> if the
+     *            parameter should not be included.
+     */
     public static ContentDispositionField contentDisposition(
             String dispositionType, String filename, long size,
             Date creationDate, Date modificationDate, Date readDate) {