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;
00037 public class Adminobject extends AbsElement {
00038
00042 private String id = null;
00043
00047 private String adminobjectInterface = null;
00048
00052 private String adminobjectClass = null;
00053
00057 private JLinkedList configPropertyList = null;
00058
00059
00063 public Adminobject() {
00064 super();
00065 configPropertyList = new JLinkedList("config-property");
00066 }
00067
00072 public String getId() {
00073 return id;
00074 }
00075
00080 public void setId(String id) {
00081 this.id = id;
00082 }
00083
00088 public String getAdminobjectInterface() {
00089 return adminobjectInterface;
00090 }
00091
00096 public void setAdminobjectInterface(String adminobjectInterface) {
00097 this.adminobjectInterface = adminobjectInterface;
00098 }
00099
00104 public String getAdminobjectClass() {
00105 return adminobjectClass;
00106 }
00107
00112 public void setAdminobjectClass(String adminobjectClass) {
00113 this.adminobjectClass = adminobjectClass;
00114 }
00115
00120 public JLinkedList getConfigPropertyList() {
00121 return configPropertyList;
00122 }
00123
00128 public void setConfigPropertyList(JLinkedList configPropertyList) {
00129 this.configPropertyList = configPropertyList;
00130 }
00131
00136 public void addConfigProperty(ConfigProperty configProperty) {
00137 configPropertyList.add(configProperty);
00138 }
00139
00145 public String toXML(int indent) {
00146 StringBuffer sb = new StringBuffer();
00147 sb.append(indent(indent));
00148 sb.append("<adminobject");
00149 sb.append(xmlAttribute(id, "id"));
00150 sb.append(">\n");
00151
00152 indent += 2;
00153
00154
00155 sb.append(xmlElement(adminobjectInterface, "adminobject-interface", indent));
00156
00157 sb.append(xmlElement(adminobjectClass, "adminobject-class", indent));
00158
00159 sb.append(configPropertyList.toXML(indent));
00160 indent -= 2;
00161 sb.append(indent(indent));
00162 sb.append("</adminobject>\n");
00163
00164 return sb.toString();
00165 }
00166 }