Source Code Cross Referenced for EmailAttachment.java in  » Net » apache-common-Email » org » apache » commons » mail » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » apache common Email » org.apache.commons.mail 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2001-2005 The Apache Software Foundation
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *     http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package org.apache.commons.mail;
017:
018:        import java.net.URL;
019:
020:        /**
021:         * This class models an email attachment.  Used by MultiPartEmail.
022:         *
023:         * @since 1.0
024:         * @author <a href="mailto:frank.kim@clearink.com">Frank Y. Kim</a>
025:         * @version $Id: EmailAttachment.java 225600 2005-07-27 20:16:23Z rdonkin $
026:         */
027:        public class EmailAttachment {
028:            /** Definition of the part being an attachment */
029:            public static final String ATTACHMENT = javax.mail.Part.ATTACHMENT;
030:            /** Definition of the part being inline */
031:            public static final String INLINE = javax.mail.Part.INLINE;
032:
033:            /** The name of this attachment. */
034:            private String name = "";
035:
036:            /** The description of this attachment. */
037:            private String description = "";
038:
039:            /** The path to this attachment (ie c:/path/to/file.jpg). */
040:            private String path = "";
041:
042:            /** The HttpURI where the file can be got. */
043:            private URL url;
044:
045:            /** The disposition. */
046:            private String disposition = EmailAttachment.ATTACHMENT;
047:
048:            /**
049:             * Get the description.
050:             *
051:             * @return A String.
052:             * @since 1.0
053:             */
054:            public String getDescription() {
055:                return description;
056:            }
057:
058:            /**
059:             * Get the name.
060:             *
061:             * @return A String.
062:             * @since 1.0
063:             */
064:            public String getName() {
065:                return name;
066:            }
067:
068:            /**
069:             * Get the path.
070:             *
071:             * @return A String.
072:             * @since 1.0
073:             */
074:            public String getPath() {
075:                return path;
076:            }
077:
078:            /**
079:             * Get the URL.
080:             *
081:             * @return A URL.
082:             * @since 1.0
083:             */
084:            public URL getURL() {
085:                return url;
086:            }
087:
088:            /**
089:             * Get the disposition.
090:             *
091:             * @return A String.
092:             * @since 1.0
093:             */
094:            public String getDisposition() {
095:                return disposition;
096:            }
097:
098:            /**
099:             * Set the description.
100:             *
101:             * @param desc A String.
102:             * @since 1.0
103:             */
104:            public void setDescription(String desc) {
105:                this .description = desc;
106:            }
107:
108:            /**
109:             * Set the name.
110:             *
111:             * @param aName A String.
112:             * @since 1.0
113:             */
114:            public void setName(String aName) {
115:                this .name = aName;
116:            }
117:
118:            /**
119:             * Set the path to the attachment.  The path can be absolute or relative
120:             * and should include the filename.
121:             * <p>
122:             * Example: /home/user/images/image.jpg<br>
123:             * Example: images/image.jpg
124:             *
125:             * @param aPath A String.
126:             * @since 1.0
127:             */
128:            public void setPath(String aPath) {
129:                this .path = aPath;
130:            }
131:
132:            /**
133:             * Set the URL.
134:             *
135:             * @param aUrl A URL.
136:             * @since 1.0
137:             */
138:            public void setURL(URL aUrl) {
139:                this .url = aUrl;
140:            }
141:
142:            /**
143:             * Set the disposition.
144:             *
145:             * @param aDisposition A String.
146:             * @since 1.0
147:             */
148:            public void setDisposition(String aDisposition) {
149:                this.disposition = aDisposition;
150:            }
151:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.