Source Code Cross Referenced for AnnotatedApplicationClient.java in  » EJB-Server-geronimo » plugins » org » apache » geronimo » j2ee » deployment » annotation » 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 » EJB Server geronimo » plugins » org.apache.geronimo.j2ee.deployment.annotation 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         *  Unless required by applicable law or agreed to in writing, software
012:         *  distributed under the License is distributed on an "AS IS" BASIS,
013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         *  See the License for the specific language governing permissions and
015:         *  limitations under the License.
016:         */package org.apache.geronimo.j2ee.deployment.annotation;
017:
018:        import java.util.ArrayList;
019:        import java.util.List;
020:
021:        import org.apache.commons.logging.Log;
022:        import org.apache.commons.logging.LogFactory;
023:        import org.apache.geronimo.xbeans.javaee.ApplicationClientType;
024:        import org.apache.geronimo.xbeans.javaee.EjbLocalRefType;
025:        import org.apache.geronimo.xbeans.javaee.EjbRefType;
026:        import org.apache.geronimo.xbeans.javaee.EnvEntryType;
027:        import org.apache.geronimo.xbeans.javaee.LifecycleCallbackType;
028:        import org.apache.geronimo.xbeans.javaee.MessageDestinationRefType;
029:        import org.apache.geronimo.xbeans.javaee.PersistenceContextRefType;
030:        import org.apache.geronimo.xbeans.javaee.PersistenceUnitRefType;
031:        import org.apache.geronimo.xbeans.javaee.ResourceEnvRefType;
032:        import org.apache.geronimo.xbeans.javaee.ResourceRefType;
033:        import org.apache.geronimo.xbeans.javaee.ServiceRefType;
034:
035:        /**
036:         * Wrapper class to encapsulate the ApplicationClientType class with an interface that the various
037:         * AnnotationHelpers can use
038:         * <p/>
039:         * <p/>
040:         * <p><strong>Remaining ToDo(s):</strong>
041:         * <ul>
042:         * <li>Can AppClients have unresolved EJB references ??
043:         * </ul>
044:         *
045:         * @version $Rev $Date
046:         * @since Geronimo 2.0
047:         */
048:        public class AnnotatedApplicationClient implements  AnnotatedApp {
049:
050:            // Private instance variables
051:            private static final Log log = LogFactory
052:                    .getLog(AnnotatedApplicationClient.class);
053:            private final ApplicationClientType applicationClient;
054:            private List<EjbRefType> ambiguousEjbRefs;
055:            private final String componentType;
056:
057:            /**
058:             * ApplicationClientType-qualified constructor
059:             *
060:             * @param applicationClient ApplicationClientType
061:             * @param applicationClientClassName
062:             */
063:            public AnnotatedApplicationClient(
064:                    ApplicationClientType applicationClient,
065:                    String applicationClientClassName) {
066:                this .applicationClient = applicationClient;
067:                this .componentType = applicationClientClassName;
068:            }
069:
070:            /**
071:             * ApplicationClientType methods used for the @EJB, @EJBs annotations
072:             */
073:            public EjbLocalRefType[] getEjbLocalRefArray() {
074:                return null; // Not supported by app clients
075:            }
076:
077:            public EjbLocalRefType addNewEjbLocalRef() {
078:                return null; // Not supported by app clients
079:            }
080:
081:            public EjbRefType[] getEjbRefArray() {
082:                return applicationClient.getEjbRefArray();
083:            }
084:
085:            public EjbRefType addNewEjbRef() {
086:                return applicationClient.addNewEjbRef();
087:            }
088:
089:            /**
090:             * ApplicationClientType methods used for the @Resource, @Resources annotations
091:             */
092:            public EnvEntryType[] getEnvEntryArray() {
093:                return applicationClient.getEnvEntryArray();
094:            }
095:
096:            public EnvEntryType addNewEnvEntry() {
097:                return applicationClient.addNewEnvEntry();
098:            }
099:
100:            public ServiceRefType[] getServiceRefArray() {
101:                return applicationClient.getServiceRefArray();
102:            }
103:
104:            public ServiceRefType addNewServiceRef() {
105:                return applicationClient.addNewServiceRef();
106:            }
107:
108:            public ResourceRefType[] getResourceRefArray() {
109:                return applicationClient.getResourceRefArray();
110:            }
111:
112:            public ResourceRefType addNewResourceRef() {
113:                return applicationClient.addNewResourceRef();
114:            }
115:
116:            public MessageDestinationRefType[] getMessageDestinationRefArray() {
117:                return applicationClient.getMessageDestinationRefArray();
118:            }
119:
120:            public MessageDestinationRefType addNewMessageDestinationRef() {
121:                return applicationClient.addNewMessageDestinationRef();
122:            }
123:
124:            public ResourceEnvRefType[] getResourceEnvRefArray() {
125:                return applicationClient.getResourceEnvRefArray();
126:            }
127:
128:            public ResourceEnvRefType addNewResourceEnvRef() {
129:                return applicationClient.addNewResourceEnvRef();
130:            }
131:
132:            /**
133:             * applicationClient getter
134:             *
135:             * @return String representation of applicationClient
136:             */
137:            public String toString() {
138:                return applicationClient.toString();
139:            }
140:
141:            /**
142:             * applicationClient getter
143:             *
144:             * @return applicationClient ApplicationClientType
145:             */
146:            public ApplicationClientType getApplicationClient() {
147:                return applicationClient;
148:            }
149:
150:            /**
151:             * ambiguousRefs getter
152:             * <p/>
153:             * <p>There is no corresponding setter method. To add a new item to the list do:
154:             * <pre>
155:             *    getAmbiguousEjbRefs().add(ejbRef);
156:             * </pre>
157:             *
158:             * @return ambiguousRefs list
159:             */
160:            public List<EjbRefType> getAmbiguousEjbRefs() {
161:                if (ambiguousEjbRefs == null) {
162:                    ambiguousEjbRefs = new ArrayList<EjbRefType>();
163:                }
164:                return this .ambiguousEjbRefs;
165:            }
166:
167:            public LifecycleCallbackType[] getPostConstructArray() {
168:                return applicationClient.getPostConstructArray();
169:            }
170:
171:            public LifecycleCallbackType addPostConstruct() {
172:                return applicationClient.addNewPostConstruct();
173:            }
174:
175:            public LifecycleCallbackType[] getPreDestroyArray() {
176:                return applicationClient.getPreDestroyArray();
177:            }
178:
179:            public LifecycleCallbackType addPreDestroy() {
180:                return applicationClient.addNewPreDestroy();
181:            }
182:
183:            public PersistenceContextRefType[] getPersistenceContextRefArray() {
184:                return null; // Not supported by app clients
185:            }
186:
187:            public PersistenceContextRefType addNewPersistenceContextRef() {
188:                return null; // Not supported by app clients
189:            }
190:
191:            public PersistenceUnitRefType[] getPersistenceUnitRefArray() {
192:                return applicationClient.getPersistenceUnitRefArray();
193:            }
194:
195:            public PersistenceUnitRefType addNewPersistenceUnitRef() {
196:                return applicationClient.addNewPersistenceUnitRef();
197:            }
198:
199:            public String getComponentType() {
200:                return componentType;
201:            }
202:
203:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.