1 19 20 24 25 package org.netbeans.modules.j2ee.sun.ws7.serverresources.dd; 26 import org.netbeans.modules.j2ee.sun.dd.api.CommonDDBean; 27 28 32 public class WS70ResourcesProxy implements WS70Resources { 33 34 private WS70Resources resourcesRoot; 35 private java.util.List listeners; 36 37 40 public WS70ResourcesProxy(WS70Resources resourcesRoot) { 41 this.resourcesRoot = resourcesRoot; 42 } 43 44 public void write(java.io.Writer w) throws java.io.IOException , org.netbeans.modules.j2ee.sun.dd.api.DDException { 45 if (resourcesRoot!=null) resourcesRoot.write(w); 46 } 47 48 public void setWS70JdbcResource(int index, WS70JdbcResource value) { 49 if (resourcesRoot!=null) resourcesRoot.setWS70JdbcResource(index, value); 50 } 51 52 public int addWS70ExternalJndiResource(WS70ExternalJndiResource value) { 53 return resourcesRoot==null?-1:resourcesRoot.addWS70ExternalJndiResource(value); 54 } 55 56 public int removeWS70ExternalJndiResource(WS70ExternalJndiResource value) { 57 return resourcesRoot==null?-1:resourcesRoot.removeWS70ExternalJndiResource(value); 58 } 59 60 public int size(String name) { 61 return resourcesRoot==null?-1:resourcesRoot.size(name); 62 } 63 64 public Object [] getValues(String name) { 65 return resourcesRoot==null?null:resourcesRoot.getValues(name); 66 } 67 68 public Object getValue(String propertyName) { 69 return resourcesRoot==null?null:resourcesRoot.getValue(propertyName); 70 } 71 72 public org.netbeans.modules.j2ee.sun.dd.api.CommonDDBean getPropertyParent(String name) { 73 return resourcesRoot==null?null:resourcesRoot.getPropertyParent(name); 74 } 75 76 public String getAttributeValue(String name) { 77 return resourcesRoot==null?null:resourcesRoot.getAttributeValue(name); 78 } 79 public WS70MailResource getWS70MailResource(int index) { 80 return resourcesRoot==null?null:resourcesRoot.getWS70MailResource(index); 81 } 82 83 84 public WS70JdbcResource getWS70JdbcResource(int index) { 85 return resourcesRoot==null?null:resourcesRoot.getWS70JdbcResource(index); 86 } 87 88 89 public WS70ExternalJndiResource getWS70ExternalJndiResource(int index) { 90 return resourcesRoot==null?null:resourcesRoot.getWS70ExternalJndiResource(index); 91 } 92 93 public WS70CustomResource getWS70CustomResource(int index) { 94 return resourcesRoot==null?null:resourcesRoot.getWS70CustomResource(index); 95 } 96 97 public void setValue(String name, int index, Object value) { 98 if (resourcesRoot!=null) resourcesRoot.setValue(name, index, value); 99 } 100 101 public int addValue(String name, Object value) { 102 return resourcesRoot==null?-1:resourcesRoot.addValue(name, value); 103 } 104 105 public String [] findPropertyValue(String propName, Object value) { 106 return resourcesRoot==null?null:resourcesRoot.findPropertyValue(propName, value); 107 } 108 109 public int removeValue(String name, Object value) { 110 return resourcesRoot==null?-1:resourcesRoot.removeValue(name, value); 111 } 112 113 public void setValue(String name, Object value) { 114 if (resourcesRoot!=null) resourcesRoot.setValue(name, value); 115 } 116 117 118 public void setWS70CustomResource(int index, WS70CustomResource value) { 119 if (resourcesRoot!=null) resourcesRoot.setWS70CustomResource(index, value); 120 } 121 122 123 public void setValue(String name, Object [] value) { 124 if (resourcesRoot!=null) resourcesRoot.setValue(name, value); 125 } 126 127 public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl) { 128 if (resourcesRoot != null) 129 resourcesRoot.addPropertyChangeListener(pcl); 130 listeners.add(pcl); 131 } 132 133 public void removePropertyChangeListener(java.beans.PropertyChangeListener pcl) { 134 if (resourcesRoot != null) 135 resourcesRoot.removePropertyChangeListener(pcl); 136 listeners.remove(pcl); 137 } 138 139 public void setWS70MailResource(int index, WS70MailResource value) { 140 if (resourcesRoot!=null) resourcesRoot.setWS70MailResource(index, value); 141 } 142 143 public int addWS70MailResource(WS70MailResource value) { 144 return resourcesRoot==null?-1:resourcesRoot.addWS70MailResource(value); 145 } 146 147 public int removeWS70MailResource(WS70MailResource value) { 148 return resourcesRoot==null?-1:resourcesRoot.removeWS70MailResource(value); 149 } 150 151 public void setWS70ExternalJndiResource(WS70ExternalJndiResource[] value) { 152 if (resourcesRoot!=null) resourcesRoot.setWS70ExternalJndiResource(value); 153 } 154 155 156 public int addWS70CustomResource(WS70CustomResource value) { 157 return resourcesRoot==null?-1:resourcesRoot.addWS70CustomResource(value); 158 } 159 160 public int removeWS70CustomResource(WS70CustomResource value) { 161 return resourcesRoot==null?-1:resourcesRoot.removeWS70CustomResource(value); 162 } 163 164 public int addWS70JdbcResource(WS70JdbcResource value) { 165 return resourcesRoot==null?-1:resourcesRoot.addWS70JdbcResource(value); 166 } 167 168 public int removeWS70JdbcResource(WS70JdbcResource value) { 169 return resourcesRoot==null?-1:resourcesRoot.removeWS70JdbcResource(value); 170 } 171 172 173 public void setWS70ExternalJndiResource(int index, WS70ExternalJndiResource value) { 174 if (resourcesRoot!=null) resourcesRoot.setWS70ExternalJndiResource(index, value); 175 } 176 177 public void setWS70CustomResource(WS70CustomResource[] value) { 178 if (resourcesRoot!=null) resourcesRoot.setWS70CustomResource(value); 179 } 180 181 public void setWS70JdbcResource(WS70JdbcResource[] value) { 182 if (resourcesRoot!=null) resourcesRoot.setWS70JdbcResource(value); 183 } 184 185 public void setWS70MailResource(WS70MailResource[] value) { 186 if (resourcesRoot!=null) resourcesRoot.setWS70MailResource(value); 187 } 188 189 public void write(java.io.OutputStream os) throws java.io.IOException { 190 if (resourcesRoot != null) { 191 resourcesRoot.write(os); 192 } 193 } 194 195 public void merge(org.netbeans.modules.j2ee.sun.dd.api.CommonDDBean root, int mode) { 196 if (root != null) { 197 if (root instanceof WS70ResourcesProxy) 198 resourcesRoot.merge(((WS70ResourcesProxy)root).getOriginal(), mode); 199 else resourcesRoot.merge(root, mode); 200 } 201 } 202 203 public WS70Resources getOriginal() { 204 return resourcesRoot; 205 } 206 207 public Object getValue(String name, int index) { 208 return resourcesRoot==null?null:resourcesRoot.getValues(name); 209 } 210 211 public void removeValue(String name, int index) { 212 if (resourcesRoot!=null) resourcesRoot.removeValue(name, index); 213 } 214 215 216 public int sizeWS70MailResource() { 217 return resourcesRoot==null?-1:resourcesRoot.sizeWS70MailResource(); 218 } 219 220 221 public int sizeWS70JdbcResource() { 222 return resourcesRoot==null?-1:resourcesRoot.sizeWS70JdbcResource(); 223 } 224 225 226 public int sizeWS70ExternalJndiResource() { 227 return resourcesRoot==null?-1:resourcesRoot.sizeWS70ExternalJndiResource(); 228 } 229 230 public int sizeWS70CustomResource() { 231 return resourcesRoot==null?-1:resourcesRoot.sizeWS70CustomResource(); 232 } 233 234 public WS70CustomResource newWS70CustomResource() { 235 return resourcesRoot==null?null:resourcesRoot.newWS70CustomResource(); 236 } 237 238 239 240 public WS70MailResource[] getWS70MailResource() { 241 return resourcesRoot==null?null:resourcesRoot.getWS70MailResource(); 242 } 243 244 245 246 public WS70JdbcResource[] getWS70JdbcResource() { 247 return resourcesRoot==null?null:resourcesRoot.getWS70JdbcResource(); 248 } 249 250 251 252 public WS70ExternalJndiResource[] getWS70ExternalJndiResource() { 253 return resourcesRoot==null?null:resourcesRoot.getWS70ExternalJndiResource(); 254 } 255 256 public String dumpBeanNode() { 257 return resourcesRoot==null?null:resourcesRoot.dumpBeanNode(); 258 } 259 260 261 public String getAttributeValue(String propName, String name) { 262 return resourcesRoot==null?null:resourcesRoot.getAttributeValue(propName, name); 263 } 264 265 public String getAttributeValue(String propName, int index, String name) { 266 return resourcesRoot==null?null:resourcesRoot.getAttributeValue(propName, index, name); 267 } 268 269 270 271 public WS70CustomResource[] getWS70CustomResource() { 272 return resourcesRoot==null?null:resourcesRoot.getWS70CustomResource(); 273 } 274 275 public WS70ExternalJndiResource newWS70ExternalJndiResource() { 276 return resourcesRoot==null?null:resourcesRoot.newWS70ExternalJndiResource(); 277 } 278 279 public WS70JdbcResource newWS70JdbcResource() { 280 return resourcesRoot==null?null:resourcesRoot.newWS70JdbcResource(); 281 } 282 283 284 285 public WS70MailResource newWS70MailResource() { 286 return resourcesRoot==null?null:resourcesRoot.newWS70MailResource(); 287 } 288 289 public void setAttributeValue(String name, String value) { 290 if (resourcesRoot!=null) resourcesRoot.setAttributeValue(name, value); 291 } 292 293 public void setAttributeValue(String propName, String name, String value) { 294 if (resourcesRoot!=null) resourcesRoot.setAttributeValue(propName, name, value); 295 } 296 297 public void setAttributeValue(String propName, int index, String name, String value) { 298 if (resourcesRoot!=null) resourcesRoot.setAttributeValue(propName, index, name, value); 299 } 300 301 public Object clone() { 302 WS70ResourcesProxy proxy = null; 303 if (resourcesRoot==null) 304 proxy = new WS70ResourcesProxy(null); 305 else { 306 WS70Resources clonedResources=(WS70Resources)resourcesRoot.clone(); 307 proxy = new WS70ResourcesProxy(clonedResources); 308 } 309 return proxy; 310 } 311 316 public CommonDDBean cloneVersion(String version) { 317 return (CommonDDBean) clone(); 318 } 319 320 321 public void write(java.io.File f) throws java.io.IOException , org.netbeans.modules.schema2beans.Schema2BeansRuntimeException { 322 if (resourcesRoot!=null) resourcesRoot.write(f); 323 } 324 325 } 326 | Popular Tags |