1 26 27 package org.objectweb.jonas_web.deployment.xml; 28 29 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 30 import org.objectweb.jonas_lib.deployment.xml.JLinkedList; 31 32 36 public class UserDataConstraint extends AbsElement { 37 38 41 private JLinkedList descriptionList = null; 42 43 46 private String transportGuarantee = null; 47 48 49 52 public UserDataConstraint() { 53 super(); 54 descriptionList = new JLinkedList("description"); 55 } 56 57 58 60 64 public void addDescription(String description) { 65 descriptionList.add(description); 66 } 67 68 72 public void setTransportGuarantee(String transportGuarantee) { 73 this.transportGuarantee = transportGuarantee; 74 } 75 76 78 82 public JLinkedList getDescriptionList() { 83 return descriptionList; 84 } 85 86 90 public String getTransportGuarantee() { 91 return transportGuarantee; 92 } 93 94 99 public String toXML(int indent) { 100 StringBuffer sb = new StringBuffer (); 101 sb.append(indent(indent)); 102 sb.append("<user-data-constraint>\n"); 103 104 indent += 2; 105 sb.append(descriptionList.toXML(indent)); 107 108 if (transportGuarantee != null) { 110 sb.append(xmlElement(transportGuarantee, "transport-guarantee", indent)); 111 } 112 113 indent -= 2; 114 sb.append(indent(indent)); 115 sb.append("</user-data-constraint>\n"); 116 117 return sb.toString(); 118 } 119 120 } 121 | Popular Tags |