Source Code Cross Referenced for EjbLocalRef.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:
030:        /**
031:         * The ejb-local-refType is used by ejb-local-ref elements for
032:         * the declaration of a reference to an enterprise bean's local
033:         * home or to the local business interface of a 3.0 bean.
034:         * The declaration consists of:
035:         * <p/>
036:         * - an optional description
037:         * - the EJB reference name used in the code of the Deployment
038:         * Component that's referencing the enterprise bean.
039:         * - the optional expected type of the referenced enterprise bean
040:         * - the optional expected local interface of the referenced
041:         * enterprise bean or the local business interface of the
042:         * referenced enterprise bean.
043:         * - the optional expected local home interface of the referenced
044:         * enterprise bean. Not applicable if this ejb-local-ref refers
045:         * to the local business interface of a 3.0 bean.
046:         * - optional ejb-link information, used to specify the
047:         * referenced enterprise bean
048:         * - optional elements to define injection of the named enterprise
049:         * bean into a component field or property.
050:         */
051:        @XmlAccessorType(XmlAccessType.FIELD)
052:        @XmlType(name="ejb-local-refType",propOrder={"description","ejbRefName","ejbRefType","localHome","local","ejbLink","mappedName","injectionTarget"})
053:        public class EjbLocalRef implements  EjbReference {
054:
055:            @XmlElement(required=true)
056:            protected List<Text> description;
057:            @XmlElement(name="ejb-ref-name",required=true)
058:            protected String ejbRefName;
059:            @XmlElement(name="ejb-ref-type")
060:            protected EjbRefType ejbRefType;
061:            @XmlElement(name="local-home")
062:            protected String localHome;
063:            protected String local;
064:            @XmlElement(name="ejb-link")
065:            protected String ejbLink;
066:            @XmlElement(name="mapped-name")
067:            protected String mappedName;
068:            @XmlElement(name="injection-target",required=true)
069:            protected List<InjectionTarget> injectionTarget;
070:            @XmlAttribute
071:            @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
072:            @XmlID
073:            protected String id;
074:
075:            public EjbLocalRef() {
076:            }
077:
078:            public EjbLocalRef(EjbReference ref) {
079:                this .ejbRefName = ref.getName();
080:                this .ejbRefType = ref.getEjbRefType();
081:                this .ejbLink = ref.getEjbLink();
082:                this .mappedName = ref.getMappedName();
083:                this .description = ref.getDescription();
084:                this .injectionTarget = ref.getInjectionTarget();
085:                this .local = ref.getInterface();
086:                this .localHome = ref.getHome();
087:            }
088:
089:            public String getName() {
090:                return getEjbRefName();
091:            }
092:
093:            public String getKey() {
094:                return getName();
095:            }
096:
097:            public String getType() {
098:                return getEjbRefType().name();
099:            }
100:
101:            public void setName(String name) {
102:                setEjbRefName(name);
103:            }
104:
105:            public void setType(String type) {
106:            }
107:
108:            public List<Text> getDescription() {
109:                if (description == null) {
110:                    description = new ArrayList<Text>();
111:                }
112:                return this .description;
113:            }
114:
115:            public String getEjbRefName() {
116:                return ejbRefName;
117:            }
118:
119:            /**
120:             * The ejb-ref-name element contains the name of an EJB
121:             * reference. The EJB reference is an entry in the
122:             * Deployment Component's environment and is relative to the
123:             * java:comp/env context.  The name must be unique within the
124:             * Deployment Component.
125:             * <p/>
126:             * It is recommended that name is prefixed with "ejb/".
127:             * <p/>
128:             * Example:
129:             * <p/>
130:             * <ejb-ref-name>ejb/Payroll</ejb-ref-name>
131:             */
132:            public void setEjbRefName(String value) {
133:                this .ejbRefName = value;
134:            }
135:
136:            public EjbRefType getEjbRefType() {
137:                return ejbRefType;
138:            }
139:
140:            public void setEjbRefType(EjbRefType value) {
141:                this .ejbRefType = value;
142:            }
143:
144:            public String getLocalHome() {
145:                return localHome;
146:            }
147:
148:            public String getHome() {
149:                return getLocalHome();
150:            }
151:
152:            public String getInterface() {
153:                return getLocal();
154:            }
155:
156:            public Type getRefType() {
157:                return Type.LOCAL;
158:            }
159:
160:            public void setRefType(Type refType) {
161:            }
162:
163:            public void setLocalHome(String value) {
164:                this .localHome = value;
165:            }
166:
167:            public String getLocal() {
168:                return local;
169:            }
170:
171:            public void setLocal(String value) {
172:                this .local = value;
173:            }
174:
175:            public String getEjbLink() {
176:                return ejbLink;
177:            }
178:
179:            /**
180:             * The value of the ejb-link element must be the ejb-name of an
181:             * enterprise bean in the same ejb-jar file or in another ejb-jar
182:             * file in the same Java EE application unit.
183:             * <p/>
184:             * Alternatively, the name in the ejb-link element may be
185:             * composed of a path name specifying the ejb-jar containing the
186:             * referenced enterprise bean with the ejb-name of the target
187:             * bean appended and separated from the path name by "#".  The
188:             * path name is relative to the Deployment File containing
189:             * Deployment Component that is referencing the enterprise
190:             * bean.  This allows multiple enterprise beans with the same
191:             * ejb-name to be uniquely identified.
192:             * <p/>
193:             * Examples:
194:             * <p/>
195:             * <ejb-link>EmployeeRecord</ejb-link>
196:             * <p/>
197:             * <ejb-link>../products/product.jar#ProductEJB</ejb-link>
198:             */
199:            public void setEjbLink(String value) {
200:                this .ejbLink = value;
201:            }
202:
203:            public String getMappedName() {
204:                return mappedName;
205:            }
206:
207:            public void setMappedName(String value) {
208:                this .mappedName = value;
209:            }
210:
211:            public List<InjectionTarget> getInjectionTarget() {
212:                if (injectionTarget == null) {
213:                    injectionTarget = new ArrayList<InjectionTarget>();
214:                }
215:                return this .injectionTarget;
216:            }
217:
218:            public String getId() {
219:                return id;
220:            }
221:
222:            public void setId(String value) {
223:                this.id = value;
224:            }
225:
226:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.