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
00132 sb.append(xmlElement(description, "description", indent));
00133
00134 sb.append(methodList.toXML(indent));
00135
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 }