JonasActivationspec.java

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;
00031 import org.objectweb.jonas_lib.deployment.xml.TopLevelElement;
00032 
00039 public class JonasActivationspec extends AbsElement  implements TopLevelElement {
00040 
00044     private String id = null;
00045 
00049     private JLinkedList descriptionList = null;
00050 
00054     private String jndiName = null;
00055 
00059     private String defaultAS = null;
00060 
00064     public JonasActivationspec() {
00065         super();
00066         descriptionList = new  JLinkedList("description");
00067     }
00068 
00073     public String getId() {
00074         return id;
00075     }
00076 
00081     public void setId(String id) {
00082         this.id = id;
00083     }
00084 
00089     public JLinkedList getDescriptionList() {
00090         return descriptionList;
00091     }
00092 
00097     public void setDescriptionList(JLinkedList descriptionList) {
00098         this.descriptionList = descriptionList;
00099     }
00100 
00105     public void addDescription(String description) {
00106         descriptionList.add(description);
00107     }
00108 
00113     public String getJndiName() {
00114         return jndiName;
00115     }
00116 
00121     public void setJndiName(String jndiName) {
00122         this.jndiName = jndiName;
00123     }
00124 
00129     public String getDefaultAS() {
00130         return defaultAS;
00131     }
00132 
00137     public void setDefaultAS(String defaultAS) {
00138         this.defaultAS = defaultAS;
00139     }
00140 
00146     public String toXML(int indent) {
00147         StringBuffer sb = new StringBuffer();
00148         sb.append(indent(indent));
00149         sb.append("<jonas-activationspec>\n");
00150 
00151         indent += 2;
00152 
00153         // id
00154         sb.append(xmlElement(id, "id", indent));
00155         // description
00156         sb.append(descriptionList.toXML(indent));
00157         // jndiname
00158         sb.append(xmlElement(jndiName, "jndi-name", indent));
00159         // defaultAS
00160         sb.append(xmlElement(defaultAS, "defaultAS", indent));
00161 
00162         indent -= 2;
00163         sb.append(indent(indent));
00164         sb.append("</jonas-activationspec>\n");
00165 
00166         return sb.toString();
00167     }
00168 }

Generated on Tue Feb 15 15:05:57 2005 for JOnAS by  doxygen 1.3.9.1