1 19 package org.netbeans.tests.j2eeserver.plugin.jsr88; 20 21 import java.beans.*; 22 23 public class WebModuleConfigBeanBeanInfo extends SimpleBeanInfo { 24 25 26 ; 28 private static BeanDescriptor getBdescriptor(){ 29 BeanDescriptor beanDescriptor = new BeanDescriptor ( WebModuleConfigBean.class , null ); 31 33 return beanDescriptor; } 35 36 private static final int PROPERTY_securityDomain = 0; 38 39 ; 41 private static PropertyDescriptor[] getPdescriptor(){ 42 PropertyDescriptor[] properties = new PropertyDescriptor[1]; 43 44 try { 45 properties[PROPERTY_securityDomain] = new PropertyDescriptor ( "securityDomain", WebModuleConfigBean.class, "getSecurityDomain", "setSecurityDomain" ); 46 } 47 catch( IntrospectionException e) {} 49 51 return properties; } 53 private static final int EVENT_propertyChangeListener = 0; 55 56 ; 58 private static EventSetDescriptor[] getEdescriptor(){ 59 EventSetDescriptor[] eventSets = new EventSetDescriptor[1]; 60 61 try { 62 eventSets[EVENT_propertyChangeListener] = new EventSetDescriptor ( WebModuleConfigBean.class, "propertyChangeListener", java.beans.PropertyChangeListener .class, new String [] {"propertyChange"}, "addPropertyChangeListener", "removePropertyChangeListener" ); 63 } 64 catch( IntrospectionException e) {} 66 68 return eventSets; } 70 private static final int METHOD_getDConfigBean0 = 0; 72 private static final int METHOD_notifyDDChange1 = 1; 73 private static final int METHOD_removeDConfigBean2 = 2; 74 75 ; 77 private static MethodDescriptor[] getMdescriptor(){ 78 MethodDescriptor[] methods = new MethodDescriptor[3]; 79 80 try { 81 methods[METHOD_getDConfigBean0] = new MethodDescriptor ( WebModuleConfigBean.class.getMethod("getDConfigBean", new Class [] {javax.enterprise.deploy.model.DDBean .class})); 82 methods[METHOD_getDConfigBean0].setDisplayName ( "" ); 83 methods[METHOD_notifyDDChange1] = new MethodDescriptor ( WebModuleConfigBean.class.getMethod("notifyDDChange", new Class [] {javax.enterprise.deploy.model.XpathEvent .class})); 84 methods[METHOD_notifyDDChange1].setDisplayName ( "" ); 85 methods[METHOD_removeDConfigBean2] = new MethodDescriptor ( WebModuleConfigBean.class.getMethod("removeDConfigBean", new Class [] {javax.enterprise.deploy.spi.DConfigBean .class})); 86 methods[METHOD_removeDConfigBean2].setDisplayName ( "" ); 87 } 88 catch( Exception e) {} 90 92 return methods; } 94 95 private static final int defaultPropertyIndex = -1; private static final int defaultEventIndex = -1; 98 private static int PROPERTY_contextRoot; 99 100 101 103 105 107 114 public BeanDescriptor getBeanDescriptor() { 115 return getBdescriptor(); 116 } 117 118 130 public PropertyDescriptor[] getPropertyDescriptors() { 131 return getPdescriptor(); 132 } 133 134 141 public EventSetDescriptor[] getEventSetDescriptors() { 142 return getEdescriptor(); 143 } 144 145 152 public MethodDescriptor[] getMethodDescriptors() { 153 return getMdescriptor(); 154 } 155 156 164 public int getDefaultPropertyIndex() { 165 return defaultPropertyIndex; 166 } 167 168 175 public int getDefaultEventIndex() { 176 return defaultEventIndex; 177 } 178 179 public java.awt.Image getIcon(int type) { 180 String res = "org/netbeans/tests/j2eeserver/plugin/registry/manager.gif"; 181 return org.openide.util.Utilities.loadImage (res); 182 } 183 } 184 185 | Popular Tags |