01: /**
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * 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: MessageDestination.java 5049 2004-07-01 15:35:10Z sauthieg $
24: * --------------------------------------------------------------------------
25: */package org.objectweb.jonas_lib.deployment.xml;
26:
27: /**
28: * This class defines the implementation of the element message-destination.
29: * @author Eric Hardesty
30: */
31: public class MessageDestination extends AbsElement {
32:
33: /**
34: * Name of this message-destination
35: */
36: private String messageDestinationName = null;
37:
38: // Setters
39:
40: /**
41: * Sets the name
42: * @param name the name to use
43: */
44: public void setMessageDestinationName(String name) {
45: this .messageDestinationName = name;
46: }
47:
48: // Getters
49:
50: /**
51: * @return the name of the jonas-message-destination
52: */
53: public String getMessageDestinationName() {
54: return messageDestinationName;
55: }
56:
57: /**
58: * Represents this element by it's XML description.
59: * @param indent use this indent for prexifing XML representation.
60: * @return the XML description of this object.
61: */
62: public String toXML(int indent) {
63: StringBuffer sb = new StringBuffer();
64: sb.append(indent(indent));
65: sb.append("<message-destination>\n");
66:
67: indent += 2;
68:
69: // name
70: sb.append(xmlElement(messageDestinationName,
71: "message-destination-name", indent));
72:
73: indent -= 2;
74: sb.append(indent(indent));
75: sb.append("</message-destination>\n");
76:
77: return sb.toString();
78: }
79:
80: }
|