Source Code Cross Referenced for ResourceRef.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.XmlTransient;
026:        import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
027:        import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
028:        import java.util.ArrayList;
029:        import java.util.List;
030:
031:        /**
032:         * The resource-refType contains a declaration of a
033:         * Deployment Component's reference to an external resource. It
034:         * consists of an optional description, the resource manager
035:         * connection factory reference name, an optional indication of
036:         * the resource manager connection factory type expected by the
037:         * Deployment Component code, an optional type of authentication
038:         * (Application or Container), and an optional specification of
039:         * the shareability of connections obtained from the resource
040:         * (Shareable or Unshareable).
041:         * <p/>
042:         * It also includes optional elements to define injection of
043:         * the named resource into fields or JavaBeans properties.
044:         * <p/>
045:         * The connection factory type must be supplied unless an
046:         * injection target is specified, in which case the type
047:         * of the target is used.  If both are specified, the type
048:         * must be assignment compatible with the type of the injection
049:         * target.
050:         * <p/>
051:         * Example:
052:         * <p/>
053:         * <resource-ref>
054:         * <res-ref-name>jdbc/EmployeeAppDB</res-ref-name>
055:         * <res-type>javax.sql.DataSource</res-type>
056:         * <res-auth>Container</res-auth>
057:         * <res-sharing-scope>Shareable</res-sharing-scope>
058:         * </resource-ref>
059:         */
060:        @XmlAccessorType(XmlAccessType.FIELD)
061:        @XmlType(name="resource-refType",propOrder={"description","resRefName","resType","resAuth","resSharingScope","mappedName","injectionTarget"})
062:        public class ResourceRef implements  JndiReference {
063:
064:            @XmlElement(required=true)
065:            protected List<Text> description;
066:            @XmlElement(name="res-ref-name",required=true)
067:            protected String resRefName;
068:            @XmlElement(name="res-type")
069:            protected String resType;
070:            @XmlElement(name="res-auth")
071:            protected ResAuth resAuth;
072:            @XmlElement(name="res-sharing-scope")
073:            protected ResSharingScope resSharingScope = ResSharingScope.SHAREABLE;
074:            @XmlElement(name="mapped-name")
075:            protected String mappedName;
076:            @XmlElement(name="injection-target",required=true)
077:            protected List<InjectionTarget> injectionTarget;
078:            @XmlAttribute
079:            @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
080:            @XmlID
081:            protected String id;
082:
083:            @XmlTransient
084:            public String getName() {
085:                return getResRefName();
086:            }
087:
088:            public String getKey() {
089:                return getName();
090:            }
091:
092:            @XmlTransient
093:            public String getType() {
094:                return getResType();
095:            }
096:
097:            public void setName(String name) {
098:                setResRefName(name);
099:            }
100:
101:            public void setType(String type) {
102:                setResType(type);
103:            }
104:
105:            public List<Text> getDescription() {
106:                if (description == null) {
107:                    description = new ArrayList<Text>();
108:                }
109:                return this .description;
110:            }
111:
112:            public String getResRefName() {
113:                return resRefName;
114:            }
115:
116:            public void setResRefName(String value) {
117:                this .resRefName = value;
118:            }
119:
120:            public String getResType() {
121:                return resType;
122:            }
123:
124:            public void setResType(String value) {
125:                this .resType = value;
126:            }
127:
128:            public ResAuth getResAuth() {
129:                return resAuth;
130:            }
131:
132:            public void setResAuth(ResAuth value) {
133:                this .resAuth = value;
134:            }
135:
136:            public ResSharingScope getResSharingScope() {
137:                return resSharingScope;
138:            }
139:
140:            public void setResSharingScope(ResSharingScope value) {
141:                this .resSharingScope = value;
142:            }
143:
144:            public String getMappedName() {
145:                return mappedName;
146:            }
147:
148:            public void setMappedName(String value) {
149:                this .mappedName = value;
150:            }
151:
152:            public List<InjectionTarget> getInjectionTarget() {
153:                if (injectionTarget == null) {
154:                    injectionTarget = new ArrayList<InjectionTarget>();
155:                }
156:                return this .injectionTarget;
157:            }
158:
159:            public String getId() {
160:                return id;
161:            }
162:
163:            public void setId(String value) {
164:                this.id = value;
165:            }
166:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.