KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > common > beans > IasConnectorOneZeroBeanInfo


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.tools.common.beans;
25
26 import java.beans.*;
27
28 public class IasConnectorOneZeroBeanInfo extends SimpleBeanInfo {
29     
30     private static java.util.ResourceBundle JavaDoc bundle =
31         java.util.ResourceBundle.getBundle("com.sun.enterprise.tools.common.beans.Bundle"); // NOI18N
32

33     // Bean descriptor information will be obtained from introspection.//GEN-FIRST:BeanDescriptor
34
private static BeanDescriptor beanDescriptor = null;
35     private static BeanDescriptor getBdescriptor(){
36         //GEN-HEADEREND:BeanDescriptor
37

38         // Here you can add code for customizing the BeanDescriptor.
39

40         return beanDescriptor; } //GEN-LAST:BeanDescriptor
41

42     
43     // Properties information will be obtained from introspection.//GEN-FIRST:Properties
44
private static PropertyDescriptor[] properties = null;
45     private static PropertyDescriptor[] getPdescriptor(){//GEN-HEADEREND:Properties
46
try {
47         properties = new PropertyDescriptor[8];
48         // Here you can add code for customizing the properties array.
49
properties[0] = getPropDesc("description", IasConnectorOneZero.class); // NOI18N
50
properties[1] = getPropDesc("idleTimeoutInSeconds", IasConnectorOneZero.class); // NOI18N
51
properties[2] = getPropDesc("jndiName", IasConnectorOneZero.class); // NOI18N
52
properties[3] = getPropDesc("maxPoolSize", IasConnectorOneZero.class); // NOI18N
53
properties[4] = getPropDesc("maxWaitTimeInMillis", IasConnectorOneZero.class); // NOI18N
54
properties[5] = getPropDesc("propertyElements", IasConnectorOneZero.class); // NOI18N
55
properties[6] = getPropDesc("roleMap", IasConnectorOneZero.class); // NOI18N
56
properties[7] = getPropDesc("steadyPoolSize", IasConnectorOneZero.class); // NOI18N
57
}
58         catch (Throwable JavaDoc t) {
59             t.printStackTrace();
60         }
61         return properties; } //GEN-LAST:Properties
62

63     private static PropertyDescriptor getPropDesc(String JavaDoc propName, Class JavaDoc bc)
64     throws java.beans.IntrospectionException JavaDoc {
65         PropertyDescriptor pd = new PropertyDescriptor(propName,bc);
66         pd.setDisplayName(bundle.getString("DISPNAME_"+propName));
67         pd.setName(bundle.getString("NAME_"+propName));
68         pd.setShortDescription(bundle.getString("SHORTDESC_"+propName));
69         return pd;
70     }
71     // Event set information will be obtained from introspection.//GEN-FIRST:Events
72
private static EventSetDescriptor[] eventSets = null;
73     private static EventSetDescriptor[] getEdescriptor(){//GEN-HEADEREND:Events
74

75         // Here you can add code for customizing the event sets array.
76

77         return eventSets; } //GEN-LAST:Events
78

79     // Method information will be obtained from introspection.//GEN-FIRST:Methods
80
private static MethodDescriptor[] methods = null;
81     private static MethodDescriptor[] getMdescriptor(){//GEN-HEADEREND:Methods
82

83         // Here you can add code for customizing the methods array.
84

85         return methods; } //GEN-LAST:Methods
86

87     
88     private static int defaultPropertyIndex = -1; //GEN-BEGIN:Idx
89
private static int defaultEventIndex = -1; //GEN-END:Idx
90

91     
92     //GEN-FIRST:Superclass
93

94     // Here you can add code for customizing the Superclass BeanInfo.
95

96     //GEN-LAST:Superclass
97

98     /**
99      * Gets the bean's <code>BeanDescriptor</code>s.
100      *
101      * @return BeanDescriptor describing the editable
102      * properties of this bean. May return null if the
103      * information should be obtained by automatic analysis.
104      *
105     public BeanDescriptor getBeanDescriptor() {
106         return getBdescriptor();
107     }*/

108     
109     /**
110      * Gets the bean's <code>PropertyDescriptor</code>s.
111      *
112      * @return An array of PropertyDescriptors describing the editable
113      * properties supported by this bean. May return null if the
114      * information should be obtained by automatic analysis.
115      * <p>
116      * If a property is indexed, then its entry in the result array will
117      * belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor.
118      * A client of getPropertyDescriptors can use "instanceof" to check
119      * if a given PropertyDescriptor is an IndexedPropertyDescriptor.
120      */

121     public PropertyDescriptor[] getPropertyDescriptors() {
122         return getPdescriptor();
123     }
124     
125     /**
126      * Gets the bean's <code>EventSetDescriptor</code>s.
127      *
128      * @return An array of EventSetDescriptors describing the kinds of
129      * events fired by this bean. May return null if the information
130      * should be obtained by automatic analysis.
131      *
132     public EventSetDescriptor[] getEventSetDescriptors() {
133         return getEdescriptor();
134     }
135     
136     /**
137      * Gets the bean's <code>MethodDescriptor</code>s.
138      *
139      * @return An array of MethodDescriptors describing the methods
140      * implemented by this bean. May return null if the information
141      * should be obtained by automatic analysis.
142      *
143     public MethodDescriptor[] getMethodDescriptors() {
144         return getMdescriptor();
145     }
146     
147     /**
148      * A bean may have a "default" property that is the property that will
149      * mostly commonly be initially chosen for update by human's who are
150      * customizing the bean.
151      * @return Index of default property in the PropertyDescriptor array
152      * returned by getPropertyDescriptors.
153      * <P> Returns -1 if there is no default property.
154      *
155     public int getDefaultPropertyIndex() {
156         return defaultPropertyIndex;
157     }
158     
159     /**
160      * A bean may have a "default" event that is the event that will
161      * mostly commonly be used by human's when using the bean.
162      * @return Index of default event in the EventSetDescriptor array
163      * returned by getEventSetDescriptors.
164      * <P> Returns -1 if there is no default event.
165      *
166     public int getDefaultEventIndex() {
167         return defaultEventIndex;
168     }*/

169 }
170
171
Popular Tags