1 27 package org.objectweb.jonas_rar.deployment.xml; 28 29 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 30 import org.objectweb.jonas_lib.deployment.xml.JLinkedList; 31 32 37 38 public class ConfigProperty extends AbsElement { 39 40 43 private JLinkedList descriptionList = null; 44 45 48 private String configPropertyName = null; 49 50 53 private String configPropertyType = null; 54 55 58 private String configPropertyValue = null; 59 60 61 64 public ConfigProperty() { 65 super(); 66 descriptionList = new JLinkedList("description"); 67 } 68 69 73 public JLinkedList getDescriptionList() { 74 return descriptionList; 75 } 76 77 81 public void setDescriptionList(JLinkedList descriptionList) { 82 this.descriptionList = descriptionList; 83 } 84 85 89 public void addDescription(String description) { 90 descriptionList.add(description); 91 } 92 93 94 98 public String getConfigPropertyName() { 99 return configPropertyName; 100 } 101 102 106 public void setConfigPropertyName(String configPropertyName) { 107 this.configPropertyName = configPropertyName; 108 } 109 110 114 public String getConfigPropertyType() { 115 return configPropertyType; 116 } 117 118 122 public void setConfigPropertyType(String configPropertyType) { 123 this.configPropertyType = configPropertyType; 124 } 125 126 130 public String getConfigPropertyValue() { 131 return configPropertyValue; 132 } 133 134 138 public void setConfigPropertyValue(String configPropertyValue) { 139 this.configPropertyValue = configPropertyValue; 140 } 141 142 147 public String toXML(int indent) { 148 StringBuffer sb = new StringBuffer (); 149 sb.append(indent(indent)); 150 sb.append("<config-property>\n"); 151 152 indent += 2; 153 154 sb.append(descriptionList.toXML(indent)); 156 sb.append(xmlElement(configPropertyName, "config-property-name", indent)); 158 sb.append(xmlElement(configPropertyType, "config-property-type", indent)); 160 sb.append(xmlElement(configPropertyValue, "config-property-value", indent)); 162 indent -= 2; 163 sb.append(indent(indent)); 164 sb.append("</config-property>\n"); 165 166 return sb.toString(); 167 } 168 } 169 | Popular Tags |