KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > turbine > util > mail > EmailAttachment


1 package org.apache.turbine.util.mail;
2
3 /*
4  * Copyright 2001-2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License")
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import java.net.URL JavaDoc;
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,v 1.4.2.2 2004/05/20 03:20:18 seade Exp $
26  * @deprecated Use org.apache.commons.mail.EmailAttachment instead.
27  */

28 public class EmailAttachment
29 {
30     public final static String JavaDoc ATTACHMENT = javax.mail.Part.ATTACHMENT;
31     public final static String JavaDoc INLINE = javax.mail.Part.INLINE;
32
33     /** The name of this attachment. */
34     private String JavaDoc name = "";
35
36     /** The description of this attachment. */
37     private String JavaDoc description = "";
38
39     /** The full path to this attachment (ie c:/path/to/file.jpg). */
40     private String JavaDoc path = "";
41
42     /** The HttpURI where the file can be got. */
43     private URL JavaDoc url = null;
44
45     /** The disposition. */
46     private String JavaDoc disposition = ATTACHMENT;
47
48     /**
49      * Get the description.
50      *
51      * @return A String.
52      */

53     public String JavaDoc getDescription()
54     {
55         return description;
56     }
57
58     /**
59      * Get the name.
60      *
61      * @return A String.
62      */

63     public String JavaDoc getName()
64     {
65         return name;
66     }
67
68     /**
69      * Get the path.
70      *
71      * @return A String.
72      */

73     public String JavaDoc getPath()
74     {
75         return path;
76     }
77
78     /**
79      * Get the URL.
80      *
81      * @return A URL.
82      */

83     public URL JavaDoc getURL()
84     {
85         return url;
86     }
87
88     /**
89      * Get the disposition.
90      *
91      * @return A String.
92      */

93     public String JavaDoc getDisposition()
94     {
95         return disposition;
96     }
97
98     /**
99      * Set the description.
100      *
101      * @param desc A String.
102      */

103     public void setDescription(String JavaDoc 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 JavaDoc 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 JavaDoc 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 JavaDoc 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 JavaDoc disposition)
144     {
145         this.disposition = disposition;
146     }
147 }
148
Popular Tags