KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_ear > deployment > xml > Module


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  *
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or 1any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20  * USA
21  *
22  * Initial developer: JOnAS team
23  * --------------------------------------------------------------------------
24  * $Id: Module.java,v 1.3 2004/05/10 10:02:12 sauthieg Exp $
25  * --------------------------------------------------------------------------
26  */

27 package org.objectweb.jonas_ear.deployment.xml;
28
29 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
30 /**
31  * This class defines the implementation of the element module
32  *
33  * @author JOnAS team
34  */

35
36 public class Module extends AbsElement {
37
38     /**
39      * connector
40      */

41     private String JavaDoc connector = null;
42
43     /**
44      * ejb
45      */

46     private String JavaDoc ejb = null;
47
48     /**
49      * java
50      */

51     private String JavaDoc java = null;
52
53     /**
54      * web
55      */

56     private Web web = null;
57
58     /**
59      * alt-dd
60      */

61     private String JavaDoc altDd = null;
62
63
64     /**
65      * Constructor
66      */

67     public Module() {
68         super();
69     }
70
71     /**
72      * Gets the connector
73      * @return the connector
74      */

75     public String JavaDoc getConnector() {
76         return connector;
77     }
78
79     /**
80      * Set the connector
81      * @param connector connector
82      */

83     public void setConnector(String JavaDoc connector) {
84         this.connector = connector;
85     }
86
87     /**
88      * Gets the ejb
89      * @return the ejb
90      */

91     public String JavaDoc getEjb() {
92         return ejb;
93     }
94
95     /**
96      * Set the ejb
97      * @param ejb ejb
98      */

99     public void setEjb(String JavaDoc ejb) {
100         this.ejb = ejb;
101     }
102
103     /**
104      * Gets the java
105      * @return the java
106      */

107     public String JavaDoc getJava() {
108         return java;
109     }
110
111     /**
112      * Set the java
113      * @param java java
114      */

115     public void setJava(String JavaDoc java) {
116         this.java = java;
117     }
118
119     /**
120      * Gets the web
121      * @return the web
122      */

123     public Web getWeb() {
124         return web;
125     }
126
127     /**
128      * Set the web
129      * @param web web
130      */

131     public void setWeb(Web web) {
132         this.web = web;
133     }
134
135     /**
136      * Gets the alt-dd
137      * @return the alt-dd
138      */

139     public String JavaDoc getAltDd() {
140         return altDd;
141     }
142
143     /**
144      * Set the alt-dd
145      * @param altDd altDd
146      */

147     public void setAltDd(String JavaDoc altDd) {
148         this.altDd = altDd;
149     }
150
151     /**
152      * Represents this element by it's XML description.
153      * @param indent use this indent for prexifing XML representation.
154      * @return the XML description of this object.
155      */

156     public String JavaDoc toXML(int indent) {
157         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
158         sb.append(indent(indent));
159         sb.append("<module>\n");
160
161         indent += 2;
162
163         // connector
164
sb.append(xmlElement(connector, "connector", indent));
165         // ejb
166
sb.append(xmlElement(ejb, "ejb", indent));
167         // java
168
sb.append(xmlElement(java, "java", indent));
169         // web
170
if (web != null) {
171             sb.append(web.toXML(indent));
172         }
173         // alt-dd
174
sb.append(xmlElement(altDd, "alt-dd", indent));
175         indent -= 2;
176         sb.append(indent(indent));
177         sb.append("</module>\n");
178
179         return sb.toString();
180     }
181 }
182
Popular Tags