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 import org.objectweb.jonas_lib.deployment.xml.TopLevelElement; 32 33 38 39 public class Connector extends AbsElement implements TopLevelElement { 40 41 44 private String displayName = null; 45 46 49 private JLinkedList descriptionList = null; 50 51 54 private Icon icon = null; 55 56 59 private String vendorName = null; 60 61 64 private String specVersion = null; 65 66 69 private String eisType = null; 70 71 74 private String version = null; 75 76 79 private String resourceadapterVersion = null; 80 81 84 private License license = null; 85 86 89 private Resourceadapter resourceadapter = null; 90 91 92 95 public Connector() { 96 super(); 97 descriptionList = new JLinkedList("description"); 98 } 99 100 104 public String getDisplayName() { 105 return displayName; 106 } 107 108 112 public void setDisplayName(String displayName) { 113 this.displayName = displayName; 114 } 115 116 120 public JLinkedList getDescriptionList() { 121 return descriptionList; 122 } 123 124 128 public void setDescriptionList(JLinkedList descriptionList) { 129 this.descriptionList = descriptionList; 130 } 131 132 136 public void addDescription(String description) { 137 descriptionList.add(description); 138 } 139 140 141 145 public Icon getIcon() { 146 return icon; 147 } 148 149 153 public void setIcon(Icon icon) { 154 this.icon = icon; 155 } 156 157 158 162 public String getVendorName() { 163 return vendorName; 164 } 165 166 170 public void setVendorName(String vendorName) { 171 this.vendorName = vendorName; 172 } 173 174 178 public String getSpecVersion() { 179 return specVersion; 180 } 181 182 186 public void setSpecVersion(String specVersion) { 187 this.specVersion = specVersion; 188 } 189 190 194 public String getEisType() { 195 return eisType; 196 } 197 198 202 public void setEisType(String eisType) { 203 this.eisType = eisType; 204 } 205 206 210 public String getVersion() { 211 return version; 212 } 213 214 218 public void setVersion(String version) { 219 this.version = version; 220 } 221 222 226 public String getResourceadapterVersion() { 227 return resourceadapterVersion; 228 } 229 230 234 public void setResourceadapterVersion(String resourceadapterVersion) { 235 this.resourceadapterVersion = resourceadapterVersion; 236 } 237 238 242 public License getLicense() { 243 return license; 244 } 245 246 250 public void setLicense(License license) { 251 this.license = license; 252 } 253 254 258 public Resourceadapter getResourceadapter() { 259 return resourceadapter; 260 } 261 262 266 public void setResourceadapter(Resourceadapter resourceadapter) { 267 this.resourceadapter = resourceadapter; 268 } 269 270 275 public String toXML(int indent) { 276 StringBuffer sb = new StringBuffer (); 277 sb.append(indent(indent)); 278 sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); 279 sb.append("<connector"); 280 sb.append(xmlAttribute(specVersion, "version")); 281 sb.append(">\n"); 282 283 indent += 2; 284 285 sb.append(descriptionList.toXML(indent)); 287 sb.append(xmlElement(displayName, "display-name", indent)); 289 if (icon != null) { 291 sb.append(icon.toXML(indent)); 292 } 293 sb.append(xmlElement(vendorName, "vendor-name", indent)); 295 sb.append(xmlElement(eisType, "eis-type", indent)); 297 sb.append(xmlElement(resourceadapterVersion, "resourceadapter-version", indent)); 299 if (license != null) { 301 sb.append(license.toXML(indent)); 302 } 303 if (resourceadapter != null) { 305 sb.append(resourceadapter.toXML(indent)); 306 } 307 indent -= 2; 308 sb.append(indent(indent)); 309 sb.append("</connector>\n"); 310 311 return sb.toString(); 312 } 313 } 314 | Popular Tags |