Source Code Cross Referenced for EMailAccount.java in  » Content-Management-System » contineo » org » contineo » core » communication » 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 » Content Management System » contineo » org.contineo.core.communication 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.contineo.core.communication;
002:
003:        import java.util.StringTokenizer;
004:
005:        import org.contineo.core.security.Menu;
006:
007:        /**
008:         * E-Mail account
009:         * 
010:         * @author Michael Scholz, Marco Meschieri
011:         */
012:        public class EMailAccount {
013:            private static final long serialVersionUID = 1L;
014:
015:            private int accountId;
016:
017:            private String userName;
018:
019:            private String mailAddress;
020:
021:            private String provider;
022:
023:            private String host;
024:
025:            private String port;
026:
027:            private String accountUser;
028:
029:            private String accountPassword;
030:
031:            private Menu targetFolder;
032:
033:            // Used only by Struts
034:            private Integer targetFolderId;
035:
036:            // Comma separated list of allowed extesions
037:            private String allowedTypes = "pdf,doc,txt";
038:
039:            private String language = "";
040:
041:            private int deleteFromMailbox = 0;
042:
043:            private int enabled = 1;
044:
045:            /** Creates a new instance of EMailAccount */
046:            public EMailAccount() {
047:                accountId = 0;
048:                userName = "";
049:                mailAddress = "";
050:                provider = "";
051:                host = "";
052:                port = "";
053:                accountUser = "";
054:                accountPassword = "";
055:                targetFolder = null;
056:                targetFolderId = null;
057:            }
058:
059:            public int getDeleteFromMailbox() {
060:                return deleteFromMailbox;
061:            }
062:
063:            public void setDeleteFromMailbox(int deleteFromMailbox) {
064:                if ((deleteFromMailbox < 0) || (deleteFromMailbox > 1)) {
065:                    this .deleteFromMailbox = 0;
066:                } else {
067:                    this .deleteFromMailbox = deleteFromMailbox;
068:                }
069:            }
070:
071:            public String getAllowedTypes() {
072:                return allowedTypes;
073:            }
074:
075:            public void setAllowedTypes(String allowedTypes) {
076:                this .allowedTypes = allowedTypes;
077:            }
078:
079:            public String getLanguage() {
080:                return language;
081:            }
082:
083:            public void setLanguage(String language) {
084:                this .language = language;
085:            }
086:
087:            public Integer getTargetFolderId() {
088:                return targetFolderId;
089:            }
090:
091:            public void setTargetFolderId(Integer targetFolderId) {
092:                this .targetFolderId = targetFolderId;
093:            }
094:
095:            public int getAccountId() {
096:                return accountId;
097:            }
098:
099:            public String getMailAddress() {
100:                return mailAddress;
101:            }
102:
103:            public String getProvider() {
104:                return provider;
105:            }
106:
107:            public String getHost() {
108:                return host;
109:            }
110:
111:            public String getPort() {
112:                return port;
113:            }
114:
115:            public String getAccountUser() {
116:                return accountUser;
117:            }
118:
119:            public String getAccountPassword() {
120:                return accountPassword;
121:            }
122:
123:            public void setAccountId(int id) {
124:                accountId = id;
125:            }
126:
127:            public void setMailAddress(String address) {
128:                mailAddress = address;
129:            }
130:
131:            public void setProvider(String prov) {
132:                provider = prov;
133:            }
134:
135:            public void setHost(String hst) {
136:                host = hst;
137:            }
138:
139:            public void setPort(String prt) {
140:                port = prt;
141:            }
142:
143:            public void setAccountUser(String auser) {
144:                accountUser = auser;
145:            }
146:
147:            public void setAccountPassword(String apwd) {
148:                accountPassword = apwd;
149:            }
150:
151:            public Menu getTargetFolder() {
152:                return targetFolder;
153:            }
154:
155:            public void setTargetFolder(Menu targetFolder) {
156:                this .targetFolder = targetFolder;
157:                if (targetFolder != null)
158:                    this .targetFolderId = targetFolder.getMenuId();
159:                else
160:                    this .targetFolderId = null;
161:            }
162:
163:            public String getUserName() {
164:                return userName;
165:            }
166:
167:            public void setUserName(String userName) {
168:                this .userName = userName;
169:            }
170:
171:            public int getEnabled() {
172:                return enabled;
173:            }
174:
175:            public void setEnabled(int enabled) {
176:                this .enabled = enabled;
177:            }
178:
179:            /**
180:             * Check if the specified type is allowed or not.
181:             * 
182:             * @param type The type to check
183:             * @return True if <code>type</code> is included in
184:             *         <code>allowedTypes</code>
185:             */
186:            public boolean isAllowed(String type) {
187:                StringTokenizer st = new StringTokenizer(allowedTypes, ",",
188:                        false);
189:                while (st.hasMoreTokens()) {
190:                    if (st.nextToken().equalsIgnoreCase(type))
191:                        return true;
192:
193:                }
194:                return false;
195:            }
196:
197:            public void reset() {
198:                accountId = 0;
199:                mailAddress = "";
200:                provider = "";
201:                host = "";
202:                port = "";
203:                userName = "";
204:                accountUser = "";
205:                accountPassword = "";
206:                targetFolder = null;
207:                targetFolderId = null;
208:                language = "";
209:                deleteFromMailbox = 0;
210:            }
211:
212:            @Override
213:            public String toString() {
214:                return mailAddress;
215:            }
216:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.