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: Florent BENOIT
023: * --------------------------------------------------------------------------
024: * $Id: JonasConfigProperty.java 3673 2003-11-11 20:03:28Z 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 jonas-config-property
032: *
033: * @author Florent Benoit
034: */
035:
036: public class JonasConfigProperty extends AbsElement {
037:
038: /**
039: * jonas-config-property-name
040: */
041: private String jonasConfigPropertyName = null;
042:
043: /**
044: * jonas-config-property-value
045: */
046: private String jonasConfigPropertyValue = null;
047:
048: /**
049: * Constructor
050: */
051: public JonasConfigProperty() {
052: super ();
053: }
054:
055: /**
056: * Gets the jonas-config-property-name
057: * @return the jonas-config-property-name
058: */
059: public String getJonasConfigPropertyName() {
060: return jonasConfigPropertyName;
061: }
062:
063: /**
064: * Set the jonas-config-property-name
065: * @param jonasConfigPropertyName jonasConfigPropertyName
066: */
067: public void setJonasConfigPropertyName(
068: String jonasConfigPropertyName) {
069: this .jonasConfigPropertyName = jonasConfigPropertyName;
070: }
071:
072: /**
073: * Gets the jonas-config-property-value
074: * @return the jonas-config-property-value
075: */
076: public String getJonasConfigPropertyValue() {
077: return jonasConfigPropertyValue;
078: }
079:
080: /**
081: * Set the jonas-config-property-value
082: * @param jonasConfigPropertyValue jonasConfigPropertyValue
083: */
084: public void setJonasConfigPropertyValue(
085: String jonasConfigPropertyValue) {
086: this .jonasConfigPropertyValue = jonasConfigPropertyValue;
087: }
088:
089: /**
090: * Represents this element by it's XML description.
091: * @param indent use this indent for prefixing XML representation.
092: * @return the XML description of this object.
093: */
094: public String toXML(int indent) {
095: StringBuffer sb = new StringBuffer();
096: sb.append(indent(indent));
097: sb.append("<jonas-config-property>\n");
098:
099: indent += 2;
100:
101: // jonas-config-property-name
102: sb.append(xmlElement(jonasConfigPropertyName,
103: "jonas-config-property-name", indent));
104: // jonas-config-property-value
105: sb.append(xmlElement(jonasConfigPropertyValue,
106: "jonas-config-property-value", indent));
107: indent -= 2;
108: sb.append(indent(indent));
109: sb.append("</jonas-config-property>\n");
110:
111: return sb.toString();
112: }
113: }
|