001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: *
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation; either
010: * version 2.1 of the License, or 1any later version.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this library; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
020: * USA
021: *
022: * Initial developer: Eric Hardesty
023: * --------------------------------------------------------------------------
024: * $Id: TmConfigProperty.java 6553 2005-04-14 20:20:22Z ehardesty $
025: * --------------------------------------------------------------------------
026: */package org.objectweb.jonas_rar.deployment.xml;
027:
028: import org.objectweb.jonas_lib.deployment.xml.AbsElement;
029:
030: /**
031: * This class defines the implementation of the element tm-config-property
032: *
033: * @author Florent Benoit
034: */
035:
036: public class TmConfigProperty extends AbsElement {
037:
038: /**
039: * tm-config-property-name
040: */
041: private String tmConfigPropertyName = null;
042:
043: /**
044: * tm-config-property-value
045: */
046: private String tmConfigPropertyValue = null;
047:
048: /**
049: * Constructor
050: */
051: public TmConfigProperty() {
052: super ();
053: }
054:
055: /**
056: * Gets the tm-config-property-name
057: * @return the tm-config-property-name
058: */
059: public String getTmConfigPropertyName() {
060: return tmConfigPropertyName;
061: }
062:
063: /**
064: * Set the tm-config-property-name
065: * @param tmConfigPropertyName tmConfigPropertyName
066: */
067: public void setTmConfigPropertyName(String tmConfigPropertyName) {
068: this .tmConfigPropertyName = tmConfigPropertyName;
069: }
070:
071: /**
072: * Gets the tm-config-property-value
073: * @return the tm-config-property-value
074: */
075: public String getTmConfigPropertyValue() {
076: return tmConfigPropertyValue;
077: }
078:
079: /**
080: * Set the tm-config-property-value
081: * @param tmConfigPropertyValue tmConfigPropertyValue
082: */
083: public void setTmConfigPropertyValue(String tmConfigPropertyValue) {
084: this .tmConfigPropertyValue = tmConfigPropertyValue;
085: }
086:
087: /**
088: * Represents this element by it's XML description.
089: * @param indent use this indent for prefixing XML representation.
090: * @return the XML description of this object.
091: */
092: public String toXML(int indent) {
093: StringBuffer sb = new StringBuffer();
094: sb.append(indent(indent));
095: sb.append("<tm-config-property>\n");
096:
097: indent += 2;
098:
099: // tm-config-property-name
100: sb.append(xmlElement(tmConfigPropertyName,
101: "tm-config-property-name", indent));
102: // tm-config-property-value
103: sb.append(xmlElement(tmConfigPropertyValue,
104: "tm-config-property-value", indent));
105: indent -= 2;
106: sb.append(indent(indent));
107: sb.append("</tm-config-property>\n");
108:
109: return sb.toString();
110: }
111: }
|