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 import org.objectweb.jonas_lib.deployment.xml.MessageDestination; 32 import org.objectweb.jonas_lib.deployment.xml.SecurityRole; 33 34 39 40 public class AssemblyDescriptor extends AbsElement { 41 42 45 private JLinkedList securityRoleList = null; 46 47 50 private JLinkedList methodPermissionList = null; 51 52 55 private JLinkedList containerTransactionList = null; 56 57 60 private JLinkedList messageDestinationList = null; 61 62 65 private ExcludeList excludeList = null; 66 67 68 71 public AssemblyDescriptor() { 72 super(); 73 securityRoleList = new JLinkedList("security-role"); 74 methodPermissionList = new JLinkedList("method-permission"); 75 containerTransactionList = new JLinkedList("container-transaction"); 76 messageDestinationList = new JLinkedList("message-destination"); 77 } 78 79 83 public JLinkedList getSecurityRoleList() { 84 return securityRoleList; 85 } 86 87 91 public void setSecurityRoleList(JLinkedList securityRoleList) { 92 this.securityRoleList = securityRoleList; 93 } 94 95 99 public void addSecurityRole(SecurityRole securityRole) { 100 securityRoleList.add(securityRole); 101 } 102 103 107 public JLinkedList getMethodPermissionList() { 108 return methodPermissionList; 109 } 110 111 115 public void setMethodPermissionList(JLinkedList methodPermissionList) { 116 this.methodPermissionList = methodPermissionList; 117 } 118 119 123 public void addMethodPermission(MethodPermission methodPermission) { 124 methodPermissionList.add(methodPermission); 125 } 126 127 131 public JLinkedList getContainerTransactionList() { 132 return containerTransactionList; 133 } 134 135 139 public void setContainerTransactionList(JLinkedList containerTransactionList) { 140 this.containerTransactionList = containerTransactionList; 141 } 142 143 147 public void addContainerTransaction(ContainerTransaction containerTransaction) { 148 containerTransactionList.add(containerTransaction); 149 } 150 151 155 public JLinkedList getMessageDestinationList() { 156 return messageDestinationList; 157 } 158 159 163 public void setMessageDestinationList(JLinkedList messageDestinationList) { 164 this.messageDestinationList = messageDestinationList; 165 } 166 167 171 public void addMessageDestination(MessageDestination messageDestination) { 172 messageDestinationList.add(messageDestination); 173 } 174 175 179 public ExcludeList getExcludeList() { 180 return excludeList; 181 } 182 183 187 public void setExcludeList(ExcludeList excludeList) { 188 this.excludeList = excludeList; 189 } 190 191 196 public String toXML(int indent) { 197 StringBuffer sb = new StringBuffer (); 198 sb.append(indent(indent)); 199 sb.append("<assembly-descriptor>\n"); 200 201 indent += 2; 202 203 sb.append(securityRoleList.toXML(indent)); 205 sb.append(methodPermissionList.toXML(indent)); 207 sb.append(containerTransactionList.toXML(indent)); 209 sb.append(messageDestinationList.toXML(indent)); 211 if (excludeList != null) { 213 sb.append(excludeList.toXML(indent)); 214 } 215 indent -= 2; 216 sb.append(indent(indent)); 217 sb.append("</assembly-descriptor>\n"); 218 219 return sb.toString(); 220 } 221 } 222 | Popular Tags |