KickJava   Java API By Example, From Geeks To Geeks.

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


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.HashMap JavaDoc;
25
26 import org.jboss.logging.Logger;
27
28
29 /**
30  * Represents the ejb-jar.xml deployment descriptor for the 2.1 schema
31  *
32  * @author <a HREF="mailto:bdecoste@jboss.com">William DeCoste</a>
33  * @version <tt>$Revision: 57082 $</tt>
34  */

35 public class EjbJarDD
36 {
37    private static final Logger log = Logger.getLogger(EjbJarDD.class);
38    
39    // ejb-jar.xml
40
private String JavaDoc version;
41
42    private String JavaDoc displayName;
43
44    private Relationships relationships;
45
46    private AssemblyDescriptor assemblyDescriptor;
47    
48    private Interceptors interceptors;
49
50    // jboss.xml
51
private String JavaDoc securityDomain;
52    private String JavaDoc unauthenticatedPrincipal;
53    private String JavaDoc jmxName;
54
55    private HashMap JavaDoc<String JavaDoc, ResourceManager> resourceManagers = new HashMap JavaDoc();
56
57    // both
58
private EnterpriseBeans enterpriseBeans;
59    
60    public void addResourceManager(ResourceManager manager)
61    {
62       resourceManagers.put(manager.getResourceName(), manager);
63    }
64    
65    public String JavaDoc resolveResourceManager(String JavaDoc resourceName)
66    {
67       ResourceManager manager = resourceManagers.get(resourceName);
68       if (manager != null)
69          return manager.getResourceJndiName();
70       
71       return null;
72    }
73
74    public String JavaDoc getSecurityDomain()
75    {
76       return securityDomain;
77    }
78
79    public void setSecurityDomain(String JavaDoc securityDomain)
80    {
81       this.securityDomain = securityDomain;
82    }
83    
84    public String JavaDoc getUnauthenticatedPrincipal()
85    {
86       return unauthenticatedPrincipal;
87    }
88
89    public void setUnauthenticatedPrincipal(String JavaDoc unauthenticatedPrincipal)
90    {
91       this.unauthenticatedPrincipal = unauthenticatedPrincipal;
92    }
93    
94    public String JavaDoc getJmxName()
95    {
96       return jmxName;
97    }
98
99    public void setJmxName(String JavaDoc jmxName)
100    {
101       this.jmxName = jmxName;
102    }
103
104    public String JavaDoc getVersion()
105    {
106       return version;
107    }
108
109    public void setVersion(String JavaDoc version)
110    {
111       this.version = version;
112    }
113
114    public String JavaDoc getDisplayName()
115    {
116       return displayName;
117    }
118
119    public void setDisplayName(String JavaDoc displayName)
120    {
121       this.displayName = displayName;
122    }
123
124    public EnterpriseBeans getEnterpriseBeans()
125    {
126       return enterpriseBeans;
127    }
128
129    public void setEnterpriseBeans(EnterpriseBeans enterpriseBeans)
130    {
131       this.enterpriseBeans = enterpriseBeans;
132    }
133    
134    public Interceptors getInterceptors()
135    {
136       return interceptors;
137    }
138
139    public void setInterceptors(Interceptors interceptors)
140    {
141       this.interceptors = interceptors;
142    }
143
144    public Relationships getRelationships()
145    {
146       return relationships;
147    }
148
149    public void setRelationships(Relationships relationships)
150    {
151       this.relationships = relationships;
152    }
153
154    public AssemblyDescriptor getAssemblyDescriptor()
155    {
156       return assemblyDescriptor;
157    }
158
159    public void setAssemblyDescriptor(AssemblyDescriptor assemblyDescriptor)
160    {
161       this.assemblyDescriptor = assemblyDescriptor;
162    }
163
164    public String JavaDoc toString()
165    {
166       StringBuffer JavaDoc sb = new StringBuffer JavaDoc(100);
167       sb.append('[');
168       sb.append("version=").append(version);
169       sb.append(",");
170       sb.append("displayName=").append(displayName);
171       sb.append(']');
172       return sb.toString();
173    }
174 }
175
Popular Tags