source: contrib/MailArchiver/sources/vendor/mime4j/apache-mime4j-0.7-SNAPSHOT-20110327.010440-17/dom/src/main/java/org/apache/james/mime4j/dom/field/ContentDispositionField.java @ 6785

Revision 6785, 3.8 KB checked in by rafaelraymundo, 12 years ago (diff)

Ticket #2946 - Liberado codigo do MailArchiver?. Documentação na subpasta DOCS.

Line 
1package org.apache.james.mime4j.dom.field;
2
3import java.util.Date;
4import java.util.Map;
5
6public interface ContentDispositionField extends ParsedField {
7
8    /** The <code>inline</code> disposition type. */
9    public static final String DISPOSITION_TYPE_INLINE = "inline";
10    /** The <code>attachment</code> disposition type. */
11    public static final String DISPOSITION_TYPE_ATTACHMENT = "attachment";
12    /** The name of the <code>filename</code> parameter. */
13    public static final String PARAM_FILENAME = "filename";
14    /** The name of the <code>creation-date</code> parameter. */
15    public static final String PARAM_CREATION_DATE = "creation-date";
16    /** The name of the <code>modification-date</code> parameter. */
17    public static final String PARAM_MODIFICATION_DATE = "modification-date";
18    /** The name of the <code>read-date</code> parameter. */
19    public static final String PARAM_READ_DATE = "read-date";
20    /** The name of the <code>size</code> parameter. */
21    public static final String PARAM_SIZE = "size";
22
23    /**
24     * Gets the disposition type defined in this Content-Disposition field.
25     *
26     * @return the disposition type or an empty string if not set.
27     */
28    String getDispositionType();
29
30    /**
31     * Gets the value of a parameter. Parameter names are case-insensitive.
32     *
33     * @param name
34     *            the name of the parameter to get.
35     * @return the parameter value or <code>null</code> if not set.
36     */
37    String getParameter(String name);
38
39    /**
40     * Gets all parameters.
41     *
42     * @return the parameters.
43     */
44    Map<String, String> getParameters();
45
46    /**
47     * Determines if the disposition type of this field matches the given one.
48     *
49     * @param dispositionType
50     *            the disposition type to match against.
51     * @return <code>true</code> if the disposition type of this field
52     *         matches, <code>false</code> otherwise.
53     */
54    boolean isDispositionType(String dispositionType);
55
56    /**
57     * Return <code>true</code> if the disposition type of this field is
58     * <i>inline</i>, <code>false</code> otherwise.
59     *
60     * @return <code>true</code> if the disposition type of this field is
61     *         <i>inline</i>, <code>false</code> otherwise.
62     */
63    boolean isInline();
64
65    /**
66     * Return <code>true</code> if the disposition type of this field is
67     * <i>attachment</i>, <code>false</code> otherwise.
68     *
69     * @return <code>true</code> if the disposition type of this field is
70     *         <i>attachment</i>, <code>false</code> otherwise.
71     */
72    public abstract boolean isAttachment();
73
74    /**
75     * Gets the value of the <code>filename</code> parameter if set.
76     *
77     * @return the <code>filename</code> parameter value or <code>null</code>
78     *         if not set.
79     */
80    String getFilename();
81
82    /**
83     * Gets the value of the <code>creation-date</code> parameter if set and
84     * valid.
85     *
86     * @return the <code>creation-date</code> parameter value or
87     *         <code>null</code> if not set or invalid.
88     */
89    Date getCreationDate();
90
91    /**
92     * Gets the value of the <code>modification-date</code> parameter if set
93     * and valid.
94     *
95     * @return the <code>modification-date</code> parameter value or
96     *         <code>null</code> if not set or invalid.
97     */
98    Date getModificationDate();
99
100    /**
101     * Gets the value of the <code>read-date</code> parameter if set and
102     * valid.
103     *
104     * @return the <code>read-date</code> parameter value or <code>null</code>
105     *         if not set or invalid.
106     */
107    Date getReadDate();
108
109    /**
110     * Gets the value of the <code>size</code> parameter if set and valid.
111     *
112     * @return the <code>size</code> parameter value or <code>-1</code> if
113     *         not set or invalid.
114     */
115    long getSize();
116
117}
Note: See TracBrowser for help on using the repository browser.