AuthConstraint.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 AuthConstraint extends AbsElement {
00037 
00041     private JLinkedList descriptionList = null;
00042 
00046     private JLinkedList roleNameList = null;
00047 
00048 
00052     public AuthConstraint() {
00053         super();
00054         descriptionList = new  JLinkedList("description");
00055         roleNameList = new  JLinkedList("role-name");
00056     }
00057 
00058 
00059     // Setters
00060 
00065     public void addDescription(String description) {
00066         descriptionList.add(description);
00067     }
00068 
00073     public void addRoleName(String roleName) {
00074         roleNameList.add(roleName);
00075     }
00076 
00077     // Getters
00078 
00083     public JLinkedList getDescriptionList() {
00084         return descriptionList;
00085     }
00086 
00091     public JLinkedList getRoleNameList() {
00092         return roleNameList;
00093     }
00094 
00100     public String toXML(int indent) {
00101         StringBuffer sb = new StringBuffer();
00102         sb.append(indent(indent));
00103         sb.append("<auth-constraint>\n");
00104 
00105         indent += 2;
00106         // description
00107         sb.append(descriptionList.toXML(indent));
00108 
00109         // role-name
00110         sb.append(roleNameList.toXML(indent));
00111 
00112         indent -= 2;
00113         sb.append(indent(indent));
00114         sb.append("</auth-constraint>\n");
00115 
00116         return sb.toString();
00117     }
00118 
00119 }

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