KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_lib > deployment > xml > MessageDestinationRef


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  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or 1any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * Initial developer: Eric Hardesty
22  * --------------------------------------------------------------------------
23  * $Id: MessageDestinationRef.java,v 1.2 2004/07/01 15:35:10 sauthieg Exp $
24  * --------------------------------------------------------------------------
25  */

26
27 package org.objectweb.jonas_lib.deployment.xml;
28
29 /**
30  * This class defines the implementation of the element message-destination-ref.
31  * @author Eric Hardesty
32  */

33 public class MessageDestinationRef extends AbsElement {
34
35     /**
36      * Description of the message-destination-ref
37      */

38     private String JavaDoc description = null;
39
40     /**
41      * Name of this message-destination-ref
42      */

43     private String JavaDoc messageDestinationRefName = null;
44
45     /**
46      * Type of this message-destination-ref
47      */

48     private String JavaDoc messageDestinationType = null;
49
50     /**
51      * Usage of this message-destination-ref
52      */

53     private String JavaDoc messageDestinationUsage = null;
54
55     /**
56      * Link of this message-destination-ref
57      */

58     private String JavaDoc messageDestinationLink = null;
59
60
61     // Setters
62

63     /**
64      * Sets the description
65      * @param description the description to use
66      */

67     public void setDescription(String JavaDoc description) {
68         this.description = description;
69     }
70
71
72     /**
73      * Sets the name
74      * @param refName the name to use
75      */

76     public void setMessageDestinationRefName(String JavaDoc refName) {
77         this.messageDestinationRefName = refName;
78     }
79
80
81     /**
82      * Sets the type
83      * @param type the type to use
84      */

85     public void setMessageDestinationType(String JavaDoc type) {
86         this.messageDestinationType = type;
87     }
88
89
90     /**
91      * Sets the usage
92      * @param usage the usage to use
93      */

94     public void setMessageDestinationUsage(String JavaDoc usage) {
95         this.messageDestinationUsage = usage;
96     }
97
98
99     /**
100      * Sets the link
101      * @param link the link to use
102      */

103     public void setMessageDestinationLink(String JavaDoc link) {
104         this.messageDestinationLink = link;
105     }
106
107
108     // Getters
109

110     /**
111      * @return the description of the messageDestination-ref
112      */

113     public String JavaDoc getDescription() {
114         return description;
115     }
116
117
118     /**
119      * @return the name of the messageDestination-ref
120      */

121     public String JavaDoc getMessageDestinationRefName() {
122         return messageDestinationRefName;
123     }
124
125
126     /**
127      * @return the type of the messageDestination-ref
128      */

129     public String JavaDoc getMessageDestinationType() {
130         return messageDestinationType;
131     }
132
133     /**
134      * @return the usage of the messageDestination-ref
135      */

136     public String JavaDoc getMessageDestinationUsage() {
137         return messageDestinationUsage;
138     }
139
140     /**
141      * @return the link of the messageDestination-ref
142      */

143     public String JavaDoc getMessageDestinationLink() {
144         return messageDestinationLink;
145     }
146
147
148
149     /**
150      * Represents this element by it's XML description.
151      * @param indent use this indent for prexifing XML representation.
152      * @return the XML description of this object.
153      */

154     public String JavaDoc toXML(int indent) {
155         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
156         sb.append(indent(indent));
157         sb.append("<message-destination-ref>\n");
158
159         indent += 2;
160
161         // Description
162
sb.append(xmlElement(description, "description", indent));
163
164         // name
165
sb.append(xmlElement(messageDestinationRefName, "message-destination-ref-name", indent));
166
167         // type
168
sb.append(xmlElement(messageDestinationType, "message-destination-type", indent));
169
170         // usage
171
sb.append(xmlElement(messageDestinationUsage, "message-destination-usage", indent));
172
173         // link
174
sb.append(xmlElement(messageDestinationLink, "message-destination-link", indent));
175
176         indent -= 2;
177         sb.append(indent(indent));
178         sb.append("</message-destination-ref>\n");
179
180         return sb.toString();
181     }
182
183
184 }
185
Popular Tags