00001 00027 package org.objectweb.jonas_ejb.deployment.xml; 00028 00029 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 00030 import org.objectweb.jonas_lib.deployment.xml.JLinkedList; 00031 import org.objectweb.jonas_lib.deployment.xml.MessageDestination; 00032 import org.objectweb.jonas_lib.deployment.xml.SecurityRole; 00033 00040 public class AssemblyDescriptor extends AbsElement { 00041 00045 private JLinkedList securityRoleList = null; 00046 00050 private JLinkedList methodPermissionList = null; 00051 00055 private JLinkedList containerTransactionList = null; 00056 00060 private JLinkedList messageDestinationList = null; 00061 00065 private ExcludeList excludeList = null; 00066 00067 00071 public AssemblyDescriptor() { 00072 super(); 00073 securityRoleList = new JLinkedList("security-role"); 00074 methodPermissionList = new JLinkedList("method-permission"); 00075 containerTransactionList = new JLinkedList("container-transaction"); 00076 messageDestinationList = new JLinkedList("message-destination"); 00077 } 00078 00083 public JLinkedList getSecurityRoleList() { 00084 return securityRoleList; 00085 } 00086 00091 public void setSecurityRoleList(JLinkedList securityRoleList) { 00092 this.securityRoleList = securityRoleList; 00093 } 00094 00099 public void addSecurityRole(SecurityRole securityRole) { 00100 securityRoleList.add(securityRole); 00101 } 00102 00107 public JLinkedList getMethodPermissionList() { 00108 return methodPermissionList; 00109 } 00110 00115 public void setMethodPermissionList(JLinkedList methodPermissionList) { 00116 this.methodPermissionList = methodPermissionList; 00117 } 00118 00123 public void addMethodPermission(MethodPermission methodPermission) { 00124 methodPermissionList.add(methodPermission); 00125 } 00126 00131 public JLinkedList getContainerTransactionList() { 00132 return containerTransactionList; 00133 } 00134 00139 public void setContainerTransactionList(JLinkedList containerTransactionList) { 00140 this.containerTransactionList = containerTransactionList; 00141 } 00142 00147 public void addContainerTransaction(ContainerTransaction containerTransaction) { 00148 containerTransactionList.add(containerTransaction); 00149 } 00150 00155 public JLinkedList getMessageDestinationList() { 00156 return messageDestinationList; 00157 } 00158 00163 public void setMessageDestinationList(JLinkedList messageDestinationList) { 00164 this.messageDestinationList = messageDestinationList; 00165 } 00166 00171 public void addMessageDestination(MessageDestination messageDestination) { 00172 messageDestinationList.add(messageDestination); 00173 } 00174 00179 public ExcludeList getExcludeList() { 00180 return excludeList; 00181 } 00182 00187 public void setExcludeList(ExcludeList excludeList) { 00188 this.excludeList = excludeList; 00189 } 00190 00196 public String toXML(int indent) { 00197 StringBuffer sb = new StringBuffer(); 00198 sb.append(indent(indent)); 00199 sb.append("<assembly-descriptor>\n"); 00200 00201 indent += 2; 00202 00203 // security-role 00204 sb.append(securityRoleList.toXML(indent)); 00205 // method-permission 00206 sb.append(methodPermissionList.toXML(indent)); 00207 // container-transaction 00208 sb.append(containerTransactionList.toXML(indent)); 00209 // message-destination 00210 sb.append(messageDestinationList.toXML(indent)); 00211 // exclude-list 00212 if (excludeList != null) { 00213 sb.append(excludeList.toXML(indent)); 00214 } 00215 indent -= 2; 00216 sb.append(indent(indent)); 00217 sb.append("</assembly-descriptor>\n"); 00218 00219 return sb.toString(); 00220 } 00221 }