Source Code Cross Referenced for ConnectionDefinitionInstanceBeanInfo.java in  » EJB-Server-geronimo » plugins » org » apache » geronimo » connector » deployment » dconfigbean » 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.connector.deployment.dconfigbean 
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.connector.deployment.dconfigbean;
017:
018:        import java.beans.*;
019:        import java.awt.*;
020:
021:        /**
022:         * @version $Revision: 1.0$
023:         */
024:        public class ConnectionDefinitionInstanceBeanInfo implements  BeanInfo {
025:            /**
026:             * A bean may have a "default" event that is the event that will
027:             * mostly commonly be used by humans when using the bean.
028:             *
029:             * @return Index of default event in the EventSetDescriptor array
030:             *         returned by getEventSetDescriptors.
031:             *         <P>	Returns -1 if there is no default event.
032:             */
033:            public int getDefaultEventIndex() {
034:                return -1;
035:            }
036:
037:            /**
038:             * A bean may have a "default" property that is the property that will
039:             * mostly commonly be initially chosen for update by human's who are
040:             * customizing the bean.
041:             *
042:             * @return Index of default property in the PropertyDescriptor array
043:             *         returned by getPropertyDescriptors.
044:             *         <P>	Returns -1 if there is no default property.
045:             */
046:            public int getDefaultPropertyIndex() {
047:                return -1;
048:            }
049:
050:            /**
051:             * This method returns an image object that can be used to
052:             * represent the bean in toolboxes, toolbars, etc.   Icon images
053:             * will typically be GIFs, but may in future include other formats.
054:             * <p/>
055:             * Beans aren't required to provide icons and may return null from
056:             * this method.
057:             * <p/>
058:             * There are four possible flavors of icons (16x16 color,
059:             * 32x32 color, 16x16 mono, 32x32 mono).  If a bean choses to only
060:             * support a single icon we recommend supporting 16x16 color.
061:             * <p/>
062:             * We recommend that icons have a "transparent" background
063:             * so they can be rendered onto an existing background.
064:             *
065:             * @param iconKind The kind of icon requested.  This should be
066:             *                 one of the constant values ICON_COLOR_16x16, ICON_COLOR_32x32,
067:             *                 ICON_MONO_16x16, or ICON_MONO_32x32.
068:             * @return An image object representing the requested icon.  May
069:             *         return null if no suitable icon is available.
070:             */
071:            public Image getIcon(int iconKind) {
072:                return null;
073:            }
074:
075:            /**
076:             * Gets the beans <code>BeanDescriptor</code>.
077:             *
078:             * @return A BeanDescriptor providing overall information about
079:             *         the bean, such as its displayName, its customizer, etc.  May
080:             *         return null if the information should be obtained by automatic
081:             *         analysis.
082:             */
083:            public BeanDescriptor getBeanDescriptor() {
084:                BeanDescriptor bd = new BeanDescriptor(
085:                        ConnectionDefinitionInstance.class);
086:                bd.setDisplayName("Geronimo Connection Configurations");
087:                bd
088:                        .setShortDescription("The Resource Adapter defines what type of connections may be made (e.g. to a database, or to JMS).  These entries configure a specific connection instance (to a specific database or JMS server).  This is done primarily by setting appropriate config properties.");
089:                return bd;
090:            }
091:
092:            /**
093:             * This method allows a BeanInfo object to return an arbitrary collection
094:             * of other BeanInfo objects that provide additional information on the
095:             * current bean.
096:             * <P>
097:             * If there are conflicts or overlaps between the information provided
098:             * by different BeanInfo objects, then the current BeanInfo takes precedence
099:             * over the getAdditionalBeanInfo objects, and later elements in the array
100:             * take precedence over earlier ones.
101:             *
102:             * @return an array of BeanInfo objects.  May return null.
103:             */
104:            public BeanInfo[] getAdditionalBeanInfo() {
105:                return null;
106:            }
107:
108:            /**
109:             * Gets the beans <code>EventSetDescriptor</code>s.
110:             *
111:             * @return An array of EventSetDescriptors describing the kinds of
112:             *         events fired by this bean.  May return null if the information
113:             *         should be obtained by automatic analysis.
114:             */
115:            public EventSetDescriptor[] getEventSetDescriptors() {
116:                return null;
117:            }
118:
119:            /**
120:             * Gets the beans <code>MethodDescriptor</code>s.
121:             *
122:             * @return An array of MethodDescriptors describing the externally
123:             *         visible methods supported by this bean.  May return null if
124:             *         the information should be obtained by automatic analysis.
125:             */
126:            public MethodDescriptor[] getMethodDescriptors() {
127:                return new MethodDescriptor[0];
128:            }
129:
130:            /**
131:             * Gets the beans <code>PropertyDescriptor</code>s.
132:             *
133:             * @return An array of PropertyDescriptors describing the editable
134:             *         properties supported by this bean.  May return null if the
135:             *         information should be obtained by automatic analysis.
136:             *         <p/>
137:             *         If a property is indexed, then its entry in the result array will
138:             *         belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor.
139:             *         A client of getPropertyDescriptors can use "instanceof" to check
140:             *         if a given PropertyDescriptor is an IndexedPropertyDescriptor.
141:             */
142:            public PropertyDescriptor[] getPropertyDescriptors() {
143:                try {
144:                    PropertyDescriptor name = new PropertyDescriptor("name",
145:                            ConnectionDefinitionInstance.class);
146:                    name.setDisplayName("Connection Name");
147:                    name
148:                            .setShortDescription("A name that identifies this connection.  It will be used by application resource references to map to this connection.");
149:                    PropertyDescriptor jndiName = new PropertyDescriptor(
150:                            "globalJNDIName",
151:                            ConnectionDefinitionInstance.class);
152:                    jndiName.setDisplayName("Global JNDI Name");
153:                    jndiName
154:                            .setShortDescription("Where to register this connection in the global JNDI tree.  This is only necessary for non-J2EE application clients; it is not used for nornal resource references.");
155:                    PropertyDescriptor configs = new PropertyDescriptor(
156:                            "configProperty",
157:                            ConnectionDefinitionInstance.class,
158:                            "getConfigProperty", null);
159:                    configs.setDisplayName("Configuration Properties");
160:                    configs
161:                            .setShortDescription("The configuration properties that point this connection instance to a particular destination (database, JMS server, etc.).");
162:                    return new PropertyDescriptor[] { name, jndiName, configs };
163:                } catch (IntrospectionException e) {
164:                    throw new RuntimeException(
165:                            "Unable to configure bean properties", e);
166:                }
167:            }
168:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.