Source Code Cross Referenced for AssemblyDescriptor.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.adapters.CollapsedStringAdapter;
026:        import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
027:        import java.util.ArrayList;
028:        import java.util.List;
029:        import java.util.Map;
030:        import java.util.LinkedHashMap;
031:
032:        /**
033:         * The assembly-descriptorType defines
034:         * application-assembly information.
035:         * <p/>
036:         * The application-assembly information consists of the
037:         * following parts: the definition of security roles, the
038:         * definition of method permissions, the definition of
039:         * transaction attributes for enterprise beans with
040:         * container-managed transaction demarcation, the definition
041:         * of interceptor bindings, a list of
042:         * methods to be excluded from being invoked, and a list of
043:         * exception types that should be treated as application exceptions.
044:         * <p/>
045:         * All the parts are optional in the sense that they are
046:         * omitted if the lists represented by them are empty.
047:         * <p/>
048:         * Providing an assembly-descriptor in the deployment
049:         * descriptor is optional for the ejb-jar file producer.
050:         */
051:        @XmlAccessorType(XmlAccessType.FIELD)
052:        @XmlType(name="assembly-descriptorType",propOrder={"securityRole","methodPermission","containerTransaction","interceptorBinding","messageDestination","excludeList","applicationException"})
053:        public class AssemblyDescriptor {
054:
055:            @XmlElement(name="security-role",required=true)
056:            protected List<SecurityRole> securityRole;
057:            @XmlElement(name="method-permission",required=true)
058:            protected List<MethodPermission> methodPermission;
059:            @XmlElement(name="container-transaction",required=true)
060:            protected List<ContainerTransaction> containerTransaction;
061:            @XmlElement(name="interceptor-binding",required=true)
062:            protected List<InterceptorBinding> interceptorBinding;
063:            @XmlElement(name="message-destination",required=true)
064:            protected List<MessageDestination> messageDestination;
065:            @XmlElement(name="exclude-list")
066:            protected ExcludeList excludeList;
067:            @XmlElement(name="application-exception",required=true)
068:            protected List<ApplicationException> applicationException;
069:            @XmlAttribute
070:            @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
071:            @XmlID
072:            protected String id;
073:
074:            public List<SecurityRole> getSecurityRole() {
075:                if (securityRole == null) {
076:                    securityRole = new ArrayList<SecurityRole>();
077:                }
078:                return this .securityRole;
079:            }
080:
081:            public List<MethodPermission> getMethodPermission() {
082:                if (methodPermission == null) {
083:                    methodPermission = new ArrayList<MethodPermission>();
084:                }
085:                return this .methodPermission;
086:            }
087:
088:            public List<ContainerTransaction> getContainerTransaction() {
089:                if (containerTransaction == null) {
090:                    containerTransaction = new ArrayList<ContainerTransaction>();
091:                }
092:                return this .containerTransaction;
093:            }
094:
095:            public Map<String, List<MethodTransaction>> getMethodTransactions(
096:                    String ejbName) {
097:                Map<String, List<MethodTransaction>> methods = new LinkedHashMap<String, List<MethodTransaction>>();
098:                for (ContainerTransaction transaction : getContainerTransaction()) {
099:
100:                    for (Method method : transaction.getMethod()) {
101:                        if (method.getEjbName().equals(ejbName)) {
102:                            String methodName = method.getMethodName();
103:                            List<MethodTransaction> list = methods
104:                                    .get(methodName);
105:                            if (list == null) {
106:                                list = new ArrayList<MethodTransaction>();
107:                                methods.put(methodName, list);
108:                            }
109:                            list.add(new MethodTransaction(transaction
110:                                    .getTransAttribute(), method));
111:                        }
112:                    }
113:                }
114:                return methods;
115:            }
116:
117:            public List<InterceptorBinding> getInterceptorBinding() {
118:                if (interceptorBinding == null) {
119:                    interceptorBinding = new ArrayList<InterceptorBinding>();
120:                }
121:                return this .interceptorBinding;
122:            }
123:
124:            public InterceptorBinding addInterceptorBinding(
125:                    InterceptorBinding binding) {
126:                getInterceptorBinding().add(binding);
127:                return binding;
128:            }
129:
130:            public List<MessageDestination> getMessageDestination() {
131:                if (messageDestination == null) {
132:                    messageDestination = new ArrayList<MessageDestination>();
133:                }
134:                return this .messageDestination;
135:            }
136:
137:            public ExcludeList getExcludeList() {
138:                if (excludeList == null) {
139:                    excludeList = new ExcludeList();
140:                }
141:                return excludeList;
142:            }
143:
144:            public void setExcludeList(ExcludeList value) {
145:                this .excludeList = value;
146:            }
147:
148:            public List<ApplicationException> getApplicationException() {
149:                if (applicationException == null) {
150:                    applicationException = new ArrayList<ApplicationException>();
151:                }
152:                return this .applicationException;
153:            }
154:
155:            public String getId() {
156:                return id;
157:            }
158:
159:            public void setId(String value) {
160:                this.id = value;
161:            }
162:
163:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.