1 22 package org.jboss.ejb3.metamodel; 23 24 import java.util.ArrayList ; 25 import java.util.Collection ; 26 import java.util.HashMap ; 27 import java.util.List ; 28 import org.jboss.logging.Logger; 29 30 import org.jboss.metamodel.descriptor.SecurityRole; 31 32 39 public class AssemblyDescriptor 40 { 41 private static final Logger log = Logger.getLogger(AssemblyDescriptor.class); 42 43 private List securityRoles = new ArrayList (); 44 45 private List methodPermissions = new ArrayList (); 46 47 private List containerTransactions = new ArrayList (); 48 49 private HashMap <String , MessageDestination> messageDestinations = new HashMap (); 50 51 private ExcludeList excludeList; 52 53 private List applicationExceptions = new ArrayList (); 54 55 private InitList initList; 56 57 private List injects = new ArrayList (); 58 59 public Collection getMessageDestinations() 60 { 61 return messageDestinations.values(); 62 } 63 64 public void addMessageDestination(MessageDestination messageDestination) 65 { 66 messageDestinations.put(messageDestination.getMessageDestinationName(), messageDestination); 67 } 68 69 public MessageDestination findMessageDestination(String name) 70 { 71 return messageDestinations.get(name); 72 } 73 74 private List interceptorBindings = new ArrayList (); 75 76 public InitList getInitList() 77 { 78 return initList; 79 } 80 81 public void setInitList(InitList initList) 82 { 83 this.initList = initList; 84 } 85 86 public ExcludeList getExcludeList() 87 { 88 return excludeList; 89 } 90 91 public void setExcludeList(ExcludeList excludeList) 92 { 93 this.excludeList = excludeList; 94 } 95 96 public List getApplicationExceptions() 97 { 98 return applicationExceptions; 99 } 100 101 public void addApplicationException(ApplicationException applicationException) 102 { 103 applicationExceptions.add(applicationException); 104 } 105 106 public List getSecurityRoles() 107 { 108 return securityRoles; 109 } 110 111 public void setSecurityRoles(List securityRoles) 112 { 113 this.securityRoles = securityRoles; 114 } 115 116 public void addSecurityRole(SecurityRole securityRole) 117 { 118 securityRoles.add(securityRole); 119 } 120 121 public List <InterceptorBinding> getInterceptorBindings() 122 { 123 return interceptorBindings; 124 } 125 126 public void addInterceptorBinding(InterceptorBinding binding) 127 { 128 interceptorBindings.add(binding); 129 } 130 131 public List getInjects() 132 { 133 return injects; 134 } 135 136 public void addInject(Inject inject) 137 { 138 injects.add(inject); 139 } 140 141 public List getMethodPermissions() 142 { 143 return methodPermissions; 144 } 145 146 public void setMethodPermissions(List methodPermissions) 147 { 148 this.methodPermissions = methodPermissions; 149 } 150 151 public void addMethodPermission(MethodPermission methodPermission) 152 { 153 methodPermissions.add(methodPermission); 154 } 155 156 public List getContainerTransactions() 157 { 158 return containerTransactions; 159 } 160 161 public void setContainerTransactions(List containerTransactions) 162 { 163 this.containerTransactions = containerTransactions; 164 } 165 166 public void addContainerTransaction(ContainerTransaction containerTransaction) 167 { 168 containerTransactions.add(containerTransaction); 169 } 170 171 public String toString() 172 { 173 StringBuffer sb = new StringBuffer (100); 174 sb.append("["); 175 sb.append("securityRoles=").append(securityRoles); 176 sb.append(", applicationExceptions=").append(applicationExceptions); 177 sb.append("]"); 178 return sb.toString(); 179 } 180 } 181 | Popular Tags |