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 JonasActivationspec 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 String defaultAS = null; 60 61 64 public JonasActivationspec() { 65 super(); 66 descriptionList = new JLinkedList("description"); 67 } 68 69 73 public String getId() { 74 return id; 75 } 76 77 81 public void setId(String id) { 82 this.id = id; 83 } 84 85 89 public JLinkedList getDescriptionList() { 90 return descriptionList; 91 } 92 93 97 public void setDescriptionList(JLinkedList descriptionList) { 98 this.descriptionList = descriptionList; 99 } 100 101 105 public void addDescription(String description) { 106 descriptionList.add(description); 107 } 108 109 113 public String getJndiName() { 114 return jndiName; 115 } 116 117 121 public void setJndiName(String jndiName) { 122 this.jndiName = jndiName; 123 } 124 125 129 public String getDefaultAS() { 130 return defaultAS; 131 } 132 133 137 public void setDefaultAS(String defaultAS) { 138 this.defaultAS = defaultAS; 139 } 140 141 146 public String toXML(int indent) { 147 StringBuffer sb = new StringBuffer (); 148 sb.append(indent(indent)); 149 sb.append("<jonas-activationspec>\n"); 150 151 indent += 2; 152 153 sb.append(xmlElement(id, "id", indent)); 155 sb.append(descriptionList.toXML(indent)); 157 sb.append(xmlElement(jndiName, "jndi-name", indent)); 159 sb.append(xmlElement(defaultAS, "defaultAS", indent)); 161 162 indent -= 2; 163 sb.append(indent(indent)); 164 sb.append("</jonas-activationspec>\n"); 165 166 return sb.toString(); 167 } 168 } 169 | Popular Tags |