ContainerTransaction.java

00001 
00027 package org.objectweb.jonas_ejb.deployment.xml;
00028 
00029 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
00030 import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
00037 public class ContainerTransaction extends AbsElement  {
00038 
00042     private String description = null;
00043 
00047     private JLinkedList methodList = null;
00048 
00052     private String transAttribute = null;
00053 
00054 
00058     public ContainerTransaction() {
00059         super();
00060         methodList = new  JLinkedList("method");
00061     }
00062 
00067     public String getDescription() {
00068         return description;
00069     }
00070 
00075     public void setDescription(String description) {
00076         this.description = description;
00077     }
00078 
00083     public JLinkedList getMethodList() {
00084         return methodList;
00085     }
00086 
00091     public void setMethodList(JLinkedList methodList) {
00092         this.methodList = methodList;
00093     }
00094 
00099     public void addMethod(Method method) {
00100         methodList.add(method);
00101     }
00102 
00107     public String getTransAttribute() {
00108         return transAttribute;
00109     }
00110 
00115     public void setTransAttribute(String transAttribute) {
00116         this.transAttribute = transAttribute;
00117     }
00118 
00124     public String toXML(int indent) {
00125         StringBuffer sb = new StringBuffer();
00126         sb.append(indent(indent));
00127         sb.append("<container-transaction>\n");
00128 
00129         indent += 2;
00130 
00131         // description
00132         sb.append(xmlElement(description, "description", indent));
00133         // method
00134         sb.append(methodList.toXML(indent));
00135         // trans-attribute
00136         sb.append(xmlElement(transAttribute, "trans-attribute", indent));
00137         indent -= 2;
00138         sb.append(indent(indent));
00139         sb.append("</container-transaction>\n");
00140 
00141         return sb.toString();
00142     }
00143 }

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