1 17 package org.apache.geronimo.connector.deployment.dconfigbean; 18 19 import java.beans.*; 20 import java.awt.*; 21 22 25 public class ConnectionDefinitionInstanceBeanInfo implements BeanInfo { 26 34 public int getDefaultEventIndex() { 35 return -1; 36 } 37 38 47 public int getDefaultPropertyIndex() { 48 return -1; 49 } 50 51 72 public Image getIcon(int iconKind) { 73 return null; 74 } 75 76 84 public BeanDescriptor getBeanDescriptor() { 85 BeanDescriptor bd = new BeanDescriptor(ConnectionDefinitionInstance.class); 86 bd.setDisplayName("Geronimo Connection Configurations"); 87 bd.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."); 88 return bd; 89 } 90 91 103 public BeanInfo[] getAdditionalBeanInfo() { 104 return null; 105 } 106 107 114 public EventSetDescriptor[] getEventSetDescriptors() { 115 return null; 116 } 117 118 125 public MethodDescriptor[] getMethodDescriptors() { 126 return new MethodDescriptor[0]; 127 } 128 129 141 public PropertyDescriptor[] getPropertyDescriptors() { 142 try { 143 PropertyDescriptor name = new PropertyDescriptor("name", ConnectionDefinitionInstance.class); 144 name.setDisplayName("Connection Name"); 145 name.setShortDescription("A name that identifies this connection. It will be used by application resource references to map to this connection."); 146 PropertyDescriptor jndiName = new PropertyDescriptor("globalJNDIName", ConnectionDefinitionInstance.class); 147 jndiName.setDisplayName("Global JNDI Name"); 148 jndiName.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."); 149 PropertyDescriptor configs = new PropertyDescriptor("configProperty", ConnectionDefinitionInstance.class, "getConfigProperty", null); 150 configs.setDisplayName("Configuration Properties"); 151 configs.setShortDescription("The configuration properties that point this connection instance to a particular destination (database, JMS server, etc.)."); 152 return new PropertyDescriptor[]{ 153 name, jndiName, configs 154 }; 155 } catch (IntrospectionException e) { 156 throw new RuntimeException ("Unable to configure bean properties", e); 157 } 158 } 159 } 160 | Popular Tags |