KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > repository > MailResource


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.repository;
24
25 import java.io.Serializable JavaDoc;
26 import com.sun.enterprise.deployment.interfaces.MailResourceIntf;
27
28 /**
29  * Resource info for MailResource.
30  * IASRI #4650786
31  * @author James Kong
32  */

33 public class MailResource extends J2EEResourceBase
34                             implements Serializable JavaDoc, MailResourceIntf {
35     
36     private String JavaDoc resType_;
37     private String JavaDoc factoryClass_;
38
39     private String JavaDoc storeProtocol_;
40     private String JavaDoc storeProtocolClass_;
41     private String JavaDoc transportProtocol_;
42     private String JavaDoc transportProtocolClass_;
43     private String JavaDoc mailHost_;
44     private String JavaDoc username_;
45     private String JavaDoc mailFrom_;
46     private boolean debug_;
47     
48     public MailResource(String JavaDoc name) {
49         super(name);
50     }
51     
52     protected J2EEResource doClone(String JavaDoc name) {
53         MailResource clone = new MailResource(name);
54         clone.setResType(getResType());
55         clone.setFactoryClass(getFactoryClass());
56         return clone;
57     }
58     
59     public int getType() {
60         return J2EEResource.MAIL_RESOURCE;
61     }
62     
63     public String JavaDoc getResType() {
64         return resType_;
65     }
66     
67     public void setResType(String JavaDoc resType) {
68         resType_ = resType;
69     }
70     
71     public String JavaDoc getFactoryClass() {
72         return factoryClass_;
73     }
74     
75     public void setFactoryClass(String JavaDoc factoryClass) {
76         factoryClass_ = factoryClass;
77     }
78
79     public String JavaDoc getStoreProtocol() {
80         return storeProtocol_;
81     }
82     
83     public void setStoreProtocol(String JavaDoc storeProtocol) {
84         storeProtocol_ = storeProtocol;
85     }
86     
87     public String JavaDoc getStoreProtocolClass() {
88         return storeProtocolClass_;
89     }
90     
91     public void setStoreProtocolClass(String JavaDoc storeProtocolClass) {
92         storeProtocolClass_ = storeProtocolClass;
93     }
94     
95     public String JavaDoc getTransportProtocol() {
96         return transportProtocol_;
97     }
98     
99     public void setTransportProtocol(String JavaDoc transportProtocol) {
100         transportProtocol_ = transportProtocol;
101     }
102     
103     public String JavaDoc getTransportProtocolClass() {
104         return transportProtocolClass_;
105     }
106     
107     public void setTransportProtocolClass(String JavaDoc transportProtocolClass) {
108         transportProtocolClass_ = transportProtocolClass;
109     }
110     
111     public String JavaDoc getMailHost() {
112         return mailHost_;
113     }
114     
115     public void setMailHost(String JavaDoc mailHost) {
116         mailHost_ = mailHost;
117     }
118     
119     public String JavaDoc getUsername() {
120         return username_;
121     }
122     
123     public void setUsername(String JavaDoc username) {
124         username_ = username;
125     }
126     
127     public String JavaDoc getMailFrom() {
128         return mailFrom_;
129     }
130     
131     public void setMailFrom(String JavaDoc mailFrom) {
132         mailFrom_ = mailFrom;
133     }
134     
135     public boolean isDebug() {
136         return debug_;
137     }
138     
139     public void setDebug(boolean debug) {
140         debug_ = debug;
141     }
142     
143     public String JavaDoc toString() {
144         return "< Mail Resource : " + getName() + " , " + getResType() + "... >";
145     }
146 }
147
Popular Tags