KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > metamodel > AssemblyDescriptor


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.ejb3.metamodel;
23
24 import java.util.ArrayList JavaDoc;
25 import java.util.Collection JavaDoc;
26 import java.util.HashMap JavaDoc;
27 import java.util.List JavaDoc;
28 import org.jboss.logging.Logger;
29
30 import org.jboss.metamodel.descriptor.SecurityRole;
31
32 /**
33  * Represents <assembly-descriptor> elements of the ejb-jar.xml deployment descriptor for the 1.4
34  * schema
35  *
36  * @author <a HREF="mailto:bdecoste@jboss.com">William DeCoste</a>
37  * @version <tt>$Revision: 45409 $</tt>
38  */

39 public class AssemblyDescriptor
40 {
41    private static final Logger log = Logger.getLogger(AssemblyDescriptor.class);
42
43    private List JavaDoc securityRoles = new ArrayList JavaDoc();
44
45    private List JavaDoc methodPermissions = new ArrayList JavaDoc();
46
47    private List JavaDoc containerTransactions = new ArrayList JavaDoc();
48    
49    private HashMap JavaDoc<String JavaDoc, MessageDestination> messageDestinations = new HashMap JavaDoc();
50
51    private ExcludeList excludeList;
52
53    private List JavaDoc applicationExceptions = new ArrayList JavaDoc();
54
55    private InitList initList;
56
57    private List JavaDoc injects = new ArrayList JavaDoc();
58    
59    public Collection JavaDoc 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 JavaDoc name)
70    {
71       return messageDestinations.get(name);
72    }
73
74    private List JavaDoc interceptorBindings = new ArrayList JavaDoc();
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 JavaDoc getApplicationExceptions()
97    {
98       return applicationExceptions;
99    }
100
101    public void addApplicationException(ApplicationException applicationException)
102    {
103       applicationExceptions.add(applicationException);
104    }
105
106    public List JavaDoc getSecurityRoles()
107    {
108       return securityRoles;
109    }
110
111    public void setSecurityRoles(List JavaDoc securityRoles)
112    {
113       this.securityRoles = securityRoles;
114    }
115
116    public void addSecurityRole(SecurityRole securityRole)
117    {
118       securityRoles.add(securityRole);
119    }
120
121    public List JavaDoc<InterceptorBinding> getInterceptorBindings()
122    {
123       return interceptorBindings;
124    }
125
126    public void addInterceptorBinding(InterceptorBinding binding)
127    {
128       interceptorBindings.add(binding);
129    }
130
131    public List JavaDoc getInjects()
132    {
133       return injects;
134    }
135
136    public void addInject(Inject inject)
137    {
138       injects.add(inject);
139    }
140
141    public List JavaDoc getMethodPermissions()
142    {
143       return methodPermissions;
144    }
145
146    public void setMethodPermissions(List JavaDoc methodPermissions)
147    {
148       this.methodPermissions = methodPermissions;
149    }
150
151    public void addMethodPermission(MethodPermission methodPermission)
152    {
153       methodPermissions.add(methodPermission);
154    }
155
156    public List JavaDoc getContainerTransactions()
157    {
158       return containerTransactions;
159    }
160
161    public void setContainerTransactions(List JavaDoc containerTransactions)
162    {
163       this.containerTransactions = containerTransactions;
164    }
165
166    public void addContainerTransaction(ContainerTransaction containerTransaction)
167    {
168       containerTransactions.add(containerTransaction);
169    }
170
171    public String JavaDoc toString()
172    {
173       StringBuffer JavaDoc sb = new StringBuffer JavaDoc(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