1 package org.apache.turbine.util.mail;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import java.net.URL;
20
21 /***
22 * This class models an email attachment. Used by MultiPartEmail.
23 *
24 * @author <a href="mailto:frank.kim@clearink.com">Frank Y. Kim</a>
25 * @version $Id: EmailAttachment.java 264148 2005-08-29 14:21:04Z henning $
26 * @deprecated Use org.apache.commons.mail.EmailAttachment instead.
27 */
28 public class EmailAttachment
29 {
30 public final static String ATTACHMENT = javax.mail.Part.ATTACHMENT;
31 public final static String INLINE = javax.mail.Part.INLINE;
32
33 /*** The name of this attachment. */
34 private String name = "";
35
36 /*** The description of this attachment. */
37 private String description = "";
38
39 /*** The full path to this attachment (ie c:/path/to/file.jpg). */
40 private String path = "";
41
42 /*** The HttpURI where the file can be got. */
43 private URL url = null;
44
45 /*** The disposition. */
46 private String disposition = ATTACHMENT;
47
48 /***
49 * Get the description.
50 *
51 * @return A String.
52 */
53 public String getDescription()
54 {
55 return description;
56 }
57
58 /***
59 * Get the name.
60 *
61 * @return A String.
62 */
63 public String getName()
64 {
65 return name;
66 }
67
68 /***
69 * Get the path.
70 *
71 * @return A String.
72 */
73 public String getPath()
74 {
75 return path;
76 }
77
78 /***
79 * Get the URL.
80 *
81 * @return A URL.
82 */
83 public URL getURL()
84 {
85 return url;
86 }
87
88 /***
89 * Get the disposition.
90 *
91 * @return A String.
92 */
93 public String getDisposition()
94 {
95 return disposition;
96 }
97
98 /***
99 * Set the description.
100 *
101 * @param desc A String.
102 */
103 public void setDescription(String desc)
104 {
105 this.description = desc;
106 }
107
108 /***
109 * Set the name.
110 *
111 * @param name A String.
112 */
113 public void setName(String name)
114 {
115 this.name = name;
116 }
117
118 /***
119 * Set the path.
120 *
121 * @param path A String.
122 */
123 public void setPath(String path)
124 {
125 this.path = path;
126 }
127
128 /***
129 * Set the URL.
130 *
131 * @param url A URL.
132 */
133 public void setURL(URL url)
134 {
135 this.url = url;
136 }
137
138 /***
139 * Set the disposition.
140 *
141 * @param disposition A String.
142 */
143 public void setDisposition(String disposition)
144 {
145 this.disposition = disposition;
146 }
147 }