00001
00027 package org.objectweb.jonas_rar.deployment.xml;
00028
00029 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
00030 import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
00031
00038 public class ConfigProperty extends AbsElement {
00039
00043 private JLinkedList descriptionList = null;
00044
00048 private String configPropertyName = null;
00049
00053 private String configPropertyType = null;
00054
00058 private String configPropertyValue = null;
00059
00060
00064 public ConfigProperty() {
00065 super();
00066 descriptionList = new JLinkedList("description");
00067 }
00068
00073 public JLinkedList getDescriptionList() {
00074 return descriptionList;
00075 }
00076
00081 public void setDescriptionList(JLinkedList descriptionList) {
00082 this.descriptionList = descriptionList;
00083 }
00084
00089 public void addDescription(String description) {
00090 descriptionList.add(description);
00091 }
00092
00093
00098 public String getConfigPropertyName() {
00099 return configPropertyName;
00100 }
00101
00106 public void setConfigPropertyName(String configPropertyName) {
00107 this.configPropertyName = configPropertyName;
00108 }
00109
00114 public String getConfigPropertyType() {
00115 return configPropertyType;
00116 }
00117
00122 public void setConfigPropertyType(String configPropertyType) {
00123 this.configPropertyType = configPropertyType;
00124 }
00125
00130 public String getConfigPropertyValue() {
00131 return configPropertyValue;
00132 }
00133
00138 public void setConfigPropertyValue(String configPropertyValue) {
00139 this.configPropertyValue = configPropertyValue;
00140 }
00141
00147 public String toXML(int indent) {
00148 StringBuffer sb = new StringBuffer();
00149 sb.append(indent(indent));
00150 sb.append("<config-property>\n");
00151
00152 indent += 2;
00153
00154
00155 sb.append(descriptionList.toXML(indent));
00156
00157 sb.append(xmlElement(configPropertyName, "config-property-name", indent));
00158
00159 sb.append(xmlElement(configPropertyType, "config-property-type", indent));
00160
00161 sb.append(xmlElement(configPropertyValue, "config-property-value", indent));
00162 indent -= 2;
00163 sb.append(indent(indent));
00164 sb.append("</config-property>\n");
00165
00166 return sb.toString();
00167 }
00168 }