Source Code Cross Referenced for EjbJar.java in  » J2EE » openejb3 » org » apache » openejb » jee » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » openejb3 » org.apache.openejb.jee 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         *
003:         * Licensed to the Apache Software Foundation (ASF) under one or more
004:         * contributor license agreements.  See the NOTICE file distributed with
005:         * this work for additional information regarding copyright ownership.
006:         * The ASF licenses this file to You under the Apache License, Version 2.0
007:         * (the "License"); you may not use this file except in compliance with
008:         * the License.  You may obtain a copy of the License at
009:         *
010:         *     http://www.apache.org/licenses/LICENSE-2.0
011:         *
012:         *  Unless required by applicable law or agreed to in writing, software
013:         *  distributed under the License is distributed on an "AS IS" BASIS,
014:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015:         *  See the License for the specific language governing permissions and
016:         *  limitations under the License.
017:         */package org.apache.openejb.jee;
018:
019:        import javax.xml.bind.annotation.XmlAccessType;
020:        import javax.xml.bind.annotation.XmlAccessorType;
021:        import javax.xml.bind.annotation.XmlAttribute;
022:        import javax.xml.bind.annotation.XmlElement;
023:        import javax.xml.bind.annotation.XmlID;
024:        import javax.xml.bind.annotation.XmlType;
025:        import javax.xml.bind.annotation.XmlElementWrapper;
026:        import javax.xml.bind.annotation.XmlElements;
027:        import javax.xml.bind.annotation.XmlTransient;
028:        import javax.xml.bind.annotation.XmlRootElement;
029:        import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
030:        import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
031:        import java.util.Map;
032:        import java.util.LinkedHashMap;
033:        import java.util.Collection;
034:
035:        /**
036:         * The ejb-jarType defines the root element of the EJB
037:         * deployment descriptor. It contains
038:         * <p/>
039:         * - an optional description of the ejb-jar file
040:         * - an optional display name
041:         * - an optional icon that contains a small and a large
042:         * icon file name
043:         * - structural information about all included
044:         * enterprise beans that is not specified through
045:         * annotations
046:         * - structural information about interceptor classes
047:         * - a descriptor for container managed relationships,
048:         * if any.
049:         * - an optional application-assembly descriptor
050:         * - an optional name of an ejb-client-jar file for the
051:         * ejb-jar.
052:         */
053:        @XmlRootElement(name="ejb-jar")
054:        @XmlAccessorType(XmlAccessType.FIELD)
055:        @XmlType(name="ejb-jarType",propOrder={"descriptions","displayNames","icon","enterpriseBeans","interceptors","relationships","assemblyDescriptor","ejbClientJar"})
056:        public class EjbJar {
057:
058:            @XmlTransient
059:            protected TextMap description = new TextMap();
060:            @XmlTransient
061:            protected TextMap displayName = new TextMap();
062:            @XmlElement(name="icon",required=true)
063:            protected LocalCollection<Icon> icon = new LocalCollection<Icon>();
064:            @XmlTransient
065:            protected Map<String, EnterpriseBean> enterpriseBeans = new LinkedHashMap<String, EnterpriseBean>();
066:
067:            private Interceptors interceptors;
068:            protected Relationships relationships;
069:            @XmlElement(name="assembly-descriptor")
070:            protected AssemblyDescriptor assemblyDescriptor;
071:            @XmlElement(name="ejb-client-jar")
072:            protected String ejbClientJar;
073:            @XmlAttribute
074:            @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
075:            @XmlID
076:            protected String id;
077:            @XmlAttribute(name="metadata-complete")
078:            protected Boolean metadataComplete;
079:            @XmlAttribute(required=true)
080:            @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
081:            protected String version;
082:
083:            public EjbJar() {
084:            }
085:
086:            public EjbJar(String id) {
087:                this .id = id;
088:            }
089:
090:            @XmlElement(name="description",required=true)
091:            public Text[] getDescriptions() {
092:                return description.toArray();
093:            }
094:
095:            public void setDescriptions(Text[] text) {
096:                description.set(text);
097:            }
098:
099:            public String getDescription() {
100:                return description.get();
101:            }
102:
103:            @XmlElement(name="display-name",required=true)
104:            public Text[] getDisplayNames() {
105:                return displayName.toArray();
106:            }
107:
108:            public void setDisplayNames(Text[] text) {
109:                displayName.set(text);
110:            }
111:
112:            public String getDisplayName() {
113:                return displayName.get();
114:            }
115:
116:            public Collection<Icon> getIcons() {
117:                if (icon == null) {
118:                    icon = new LocalCollection<Icon>();
119:                }
120:                return icon;
121:            }
122:
123:            public Map<String, Icon> getIconMap() {
124:                if (icon == null) {
125:                    icon = new LocalCollection<Icon>();
126:                }
127:                return icon.toMap();
128:            }
129:
130:            public Icon getIcon() {
131:                return icon.getLocal();
132:            }
133:
134:            @XmlElementWrapper(name="enterprise-beans")
135:            @XmlElements({@XmlElement(name="message-driven",required=true,type=MessageDrivenBean.class),@XmlElement(name="session",required=true,type=SessionBean.class),@XmlElement(name="entity",required=true,type=EntityBean.class)})
136:            public EnterpriseBean[] getEnterpriseBeans() {
137:                return enterpriseBeans.values()
138:                        .toArray(new EnterpriseBean[] {});
139:            }
140:
141:            public void setEnterpriseBeans(EnterpriseBean[] v) {
142:                enterpriseBeans.clear();
143:                for (EnterpriseBean e : v)
144:                    enterpriseBeans.put(e.getEjbName(), e);
145:            }
146:
147:            public <T extends EnterpriseBean> T addEnterpriseBean(T bean) {
148:                enterpriseBeans.put(bean.getEjbName(), bean);
149:                return bean;
150:            }
151:
152:            public EnterpriseBean removeEnterpriseBean(String name) {
153:                EnterpriseBean bean = enterpriseBeans.remove(name);
154:                return bean;
155:            }
156:
157:            public EnterpriseBean getEnterpriseBean(String ejbName) {
158:                return enterpriseBeans.get(ejbName);
159:            }
160:
161:            public Map<String, EnterpriseBean> getEnterpriseBeansByEjbName() {
162:                return enterpriseBeans;
163:            }
164:
165:            public Interceptor[] getInterceptors() {
166:                if (interceptors == null)
167:                    return new Interceptor[] {};
168:                return interceptors.getInterceptor();
169:            }
170:
171:            public Interceptor addInterceptor(Interceptor interceptor) {
172:                if (interceptors == null)
173:                    interceptors = new Interceptors();
174:                return interceptors.addInterceptor(interceptor);
175:            }
176:
177:            public Interceptor getInterceptor(String className) {
178:                if (interceptors == null)
179:                    return null;
180:                return interceptors.getInterceptor(className);
181:            }
182:
183:            public Relationships getRelationships() {
184:                return relationships;
185:            }
186:
187:            public void setRelationships(Relationships value) {
188:                this .relationships = value;
189:            }
190:
191:            public AssemblyDescriptor getAssemblyDescriptor() {
192:                if (assemblyDescriptor == null) {
193:                    assemblyDescriptor = new AssemblyDescriptor();
194:                }
195:                return assemblyDescriptor;
196:            }
197:
198:            public void setAssemblyDescriptor(AssemblyDescriptor value) {
199:                this .assemblyDescriptor = value;
200:            }
201:
202:            public String getEjbClientJar() {
203:                return ejbClientJar;
204:            }
205:
206:            public void setEjbClientJar(String value) {
207:                this .ejbClientJar = value;
208:            }
209:
210:            public String getId() {
211:                return id;
212:            }
213:
214:            public void setId(String value) {
215:                this .id = value;
216:            }
217:
218:            public Boolean isMetadataComplete() {
219:                return metadataComplete != null && metadataComplete;
220:            }
221:
222:            public void setMetadataComplete(Boolean value) {
223:                this .metadataComplete = value;
224:            }
225:
226:            public String getVersion() {
227:                if (version == null) {
228:                    return "3.0";
229:                } else {
230:                    return version;
231:                }
232:            }
233:
234:            public void setVersion(String value) {
235:                this.version = value;
236:            }
237:
238:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.