1 26 package org.objectweb.jonas_ear.deployment.xml; 27 28 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 29 import org.objectweb.jonas_lib.deployment.xml.JLinkedList; 30 31 35 public class JonasSecurity extends AbsElement { 36 37 40 private JLinkedList securityRoleMappingList = null; 41 42 45 public JonasSecurity() { 46 super(); 47 securityRoleMappingList = new JLinkedList("security-role-mapping"); 48 } 49 50 51 55 public JLinkedList getSecurityRoleMappingList() { 56 return securityRoleMappingList; 57 } 58 59 63 public void addSecurityRoleMapping(SecurityRoleMapping securityRoleMapping) { 64 securityRoleMappingList.add(securityRoleMapping); 65 } 66 67 72 public String toXML(int indent) { 73 StringBuffer sb = new StringBuffer (); 74 sb.append(indent(indent)); 75 sb.append("<jonas-security>\n"); 76 indent += 2; 77 78 sb.append(securityRoleMappingList.toXML(indent)); 80 81 indent -= 2; 82 sb.append(indent(indent)); 83 sb.append("</jonas-security>\n"); 84 85 return sb.toString(); 86 } 87 88 } | Popular Tags |