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 JonasAdminobject extends AbsElement implements TopLevelElement { 40 41 44 private String id = null; 45 46 49 private JLinkedList descriptionList = null; 50 51 54 private String jndiName = null; 55 56 59 private JLinkedList jonasConfigPropertyList = null; 60 61 62 65 public JonasAdminobject() { 66 super(); 67 descriptionList = new JLinkedList("description"); 68 jonasConfigPropertyList = new JLinkedList("jonas-config-property"); 69 } 70 71 75 public String getId() { 76 return id; 77 } 78 79 83 public void setId(String id) { 84 this.id = id; 85 } 86 87 91 public JLinkedList getDescriptionList() { 92 return descriptionList; 93 } 94 95 99 public void setDescriptionList(JLinkedList descriptionList) { 100 this.descriptionList = descriptionList; 101 } 102 103 107 public void addDescription(String description) { 108 descriptionList.add(description); 109 } 110 111 115 public String getJndiName() { 116 return jndiName; 117 } 118 119 123 public void setJndiName(String jndiName) { 124 this.jndiName = jndiName; 125 } 126 127 131 public JLinkedList getJonasConfigPropertyList() { 132 return jonasConfigPropertyList; 133 } 134 135 139 public void setJonasConfigPropertyList(JLinkedList jonasConfigPropertyList) { 140 this.jonasConfigPropertyList = jonasConfigPropertyList; 141 } 142 143 147 public void addJonasConfigProperty(JonasConfigProperty jonasConfigProperty) { 148 jonasConfigPropertyList.add(jonasConfigProperty); 149 } 150 151 156 public String toXML(int indent) { 157 StringBuffer sb = new StringBuffer (); 158 sb.append(indent(indent)); 159 sb.append("<jonas-adminobject>\n"); 160 161 indent += 2; 162 163 sb.append(xmlElement(id, "id", indent)); 165 sb.append(descriptionList.toXML(indent)); 167 sb.append(xmlElement(jndiName, "jndi-name", indent)); 169 if (jonasConfigPropertyList != null) { 171 sb.append(jonasConfigPropertyList.toXML(indent)); 172 } 173 indent -= 2; 174 sb.append(indent(indent)); 175 sb.append("</jonas-adminobject>\n"); 176 177 return sb.toString(); 178 } 179 } 180 | Popular Tags |