1 27 package org.objectweb.jonas_ejb.deployment.xml; 28 29 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 30 import org.objectweb.jonas_lib.deployment.xml.JLinkedList; 31 36 37 public class ContainerTransaction extends AbsElement { 38 39 42 private String description = null; 43 44 47 private JLinkedList methodList = null; 48 49 52 private String transAttribute = null; 53 54 55 58 public ContainerTransaction() { 59 super(); 60 methodList = new JLinkedList("method"); 61 } 62 63 67 public String getDescription() { 68 return description; 69 } 70 71 75 public void setDescription(String description) { 76 this.description = description; 77 } 78 79 83 public JLinkedList getMethodList() { 84 return methodList; 85 } 86 87 91 public void setMethodList(JLinkedList methodList) { 92 this.methodList = methodList; 93 } 94 95 99 public void addMethod(Method method) { 100 methodList.add(method); 101 } 102 103 107 public String getTransAttribute() { 108 return transAttribute; 109 } 110 111 115 public void setTransAttribute(String transAttribute) { 116 this.transAttribute = transAttribute; 117 } 118 119 124 public String toXML(int indent) { 125 StringBuffer sb = new StringBuffer (); 126 sb.append(indent(indent)); 127 sb.append("<container-transaction>\n"); 128 129 indent += 2; 130 131 sb.append(xmlElement(description, "description", indent)); 133 sb.append(methodList.toXML(indent)); 135 sb.append(xmlElement(transAttribute, "trans-attribute", indent)); 137 indent -= 2; 138 sb.append(indent(indent)); 139 sb.append("</container-transaction>\n"); 140 141 return sb.toString(); 142 } 143 } 144 | Popular Tags |