UserDataConstraint.java

00001 
00027 package org.objectweb.jonas_web.deployment.xml;
00028 
00029 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
00030 import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
00031 
00036 public class UserDataConstraint extends AbsElement {
00037 
00041     private JLinkedList descriptionList = null;
00042 
00046     private String transportGuarantee = null;
00047 
00048 
00052     public UserDataConstraint() {
00053         super();
00054         descriptionList = new  JLinkedList("description");
00055     }
00056 
00057 
00058     // Setters
00059 
00064     public void addDescription(String description) {
00065         descriptionList.add(description);
00066     }
00067 
00072     public void setTransportGuarantee(String transportGuarantee) {
00073         this.transportGuarantee = transportGuarantee;
00074     }
00075 
00076     // Getters
00077 
00082     public JLinkedList getDescriptionList() {
00083         return descriptionList;
00084     }
00085 
00090     public String getTransportGuarantee() {
00091         return transportGuarantee;
00092     }
00093 
00099     public String toXML(int indent) {
00100         StringBuffer sb = new StringBuffer();
00101         sb.append(indent(indent));
00102         sb.append("<user-data-constraint>\n");
00103 
00104         indent += 2;
00105         // description
00106         sb.append(descriptionList.toXML(indent));
00107 
00108         // transport-guarantee
00109         if (transportGuarantee != null) {
00110             sb.append(xmlElement(transportGuarantee, "transport-guarantee", indent));
00111         }
00112 
00113         indent -= 2;
00114         sb.append(indent(indent));
00115         sb.append("</user-data-constraint>\n");
00116 
00117         return sb.toString();
00118     }
00119 
00120 }

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