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 36 37 public class Adminobject extends AbsElement { 38 39 42 private String id = null; 43 44 47 private String adminobjectInterface = null; 48 49 52 private String adminobjectClass = null; 53 54 57 private JLinkedList configPropertyList = null; 58 59 60 63 public Adminobject() { 64 super(); 65 configPropertyList = new JLinkedList("config-property"); 66 } 67 68 72 public String getId() { 73 return id; 74 } 75 76 80 public void setId(String id) { 81 this.id = id; 82 } 83 84 88 public String getAdminobjectInterface() { 89 return adminobjectInterface; 90 } 91 92 96 public void setAdminobjectInterface(String adminobjectInterface) { 97 this.adminobjectInterface = adminobjectInterface; 98 } 99 100 104 public String getAdminobjectClass() { 105 return adminobjectClass; 106 } 107 108 112 public void setAdminobjectClass(String adminobjectClass) { 113 this.adminobjectClass = adminobjectClass; 114 } 115 116 120 public JLinkedList getConfigPropertyList() { 121 return configPropertyList; 122 } 123 124 128 public void setConfigPropertyList(JLinkedList configPropertyList) { 129 this.configPropertyList = configPropertyList; 130 } 131 132 136 public void addConfigProperty(ConfigProperty configProperty) { 137 configPropertyList.add(configProperty); 138 } 139 140 145 public String toXML(int indent) { 146 StringBuffer sb = new StringBuffer (); 147 sb.append(indent(indent)); 148 sb.append("<adminobject"); 149 sb.append(xmlAttribute(id, "id")); 150 sb.append(">\n"); 151 152 indent += 2; 153 154 sb.append(xmlElement(adminobjectInterface, "adminobject-interface", indent)); 156 sb.append(xmlElement(adminobjectClass, "adminobject-class", indent)); 158 sb.append(configPropertyList.toXML(indent)); 160 indent -= 2; 161 sb.append(indent(indent)); 162 sb.append("</adminobject>\n"); 163 164 return sb.toString(); 165 } 166 } 167 | Popular Tags |