KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > sun > dd > impl > serverresources > ResourcesProxy


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 /*
20  * ResourcesProxy.java
21  *
22  * Created on August 17, 2005, 3:35 PM
23  *
24  */

25
26 package org.netbeans.modules.j2ee.sun.dd.impl.serverresources;
27
28 import org.netbeans.modules.j2ee.sun.dd.api.CommonDDBean;
29 import org.netbeans.modules.j2ee.sun.dd.api.serverresources.Resources;
30
31 /**
32  *
33  * @author Nitya Doraisamy
34  */

35 public class ResourcesProxy implements Resources {
36     
37     private Resources resourcesRoot;
38     private java.util.List JavaDoc listeners;
39     
40     /** Creates a new instance of ResourcesProxy */
41     public ResourcesProxy(Resources resourcesRoot) {
42         this.resourcesRoot = resourcesRoot;
43     }
44
45     public int addAdminObjectResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.AdminObjectResource value) {
46         return resourcesRoot==null?-1:resourcesRoot.addAdminObjectResource(value);
47     }
48
49     public int removeAdminObjectResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.AdminObjectResource value) {
50         return resourcesRoot==null?-1:resourcesRoot.removeAdminObjectResource(value);
51     }
52
53     public void write(java.io.Writer JavaDoc w) throws java.io.IOException JavaDoc, org.netbeans.modules.j2ee.sun.dd.api.DDException {
54         if (resourcesRoot!=null) resourcesRoot.write(w);
55     }
56
57     public void setPersistenceManagerFactoryResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.PersistenceManagerFactoryResource[] value) {
58         if (resourcesRoot!=null) resourcesRoot.setPersistenceManagerFactoryResource(value);
59     }
60
61     public void setPersistenceManagerFactoryResource(int index, org.netbeans.modules.j2ee.sun.dd.api.serverresources.PersistenceManagerFactoryResource value) {
62         if (resourcesRoot!=null) resourcesRoot.setPersistenceManagerFactoryResource(index, value);
63     }
64
65     public void setAdminObjectResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.AdminObjectResource[] value) {
66         if (resourcesRoot!=null) resourcesRoot.setAdminObjectResource(value);
67     }
68
69     public void setJdbcResource(int index, org.netbeans.modules.j2ee.sun.dd.api.serverresources.JdbcResource value) {
70         if (resourcesRoot!=null) resourcesRoot.setJdbcResource(index, value);
71     }
72
73     public int addConnectorResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.ConnectorResource value) {
74         return resourcesRoot==null?-1:resourcesRoot.addConnectorResource(value);
75     }
76
77     public int removeConnectorResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.ConnectorResource value) {
78         return resourcesRoot==null?-1:resourcesRoot.removeConnectorResource(value);
79     }
80
81     public void setJdbcConnectionPool(int index, org.netbeans.modules.j2ee.sun.dd.api.serverresources.JdbcConnectionPool value) {
82         if (resourcesRoot!=null) resourcesRoot.setJdbcConnectionPool(index, value);
83     }
84
85     public void setConnectorConnectionPool(int index, org.netbeans.modules.j2ee.sun.dd.api.serverresources.ConnectorConnectionPool value) {
86         if (resourcesRoot!=null) resourcesRoot.setConnectorConnectionPool(index, value);
87     }
88
89     public int addExternalJndiResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.ExternalJndiResource value) {
90         return resourcesRoot==null?-1:resourcesRoot.addExternalJndiResource(value);
91     }
92
93     public int removeExternalJndiResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.ExternalJndiResource value) {
94         return resourcesRoot==null?-1:resourcesRoot.removeExternalJndiResource(value);
95     }
96
97     public void setAdminObjectResource(int index, org.netbeans.modules.j2ee.sun.dd.api.serverresources.AdminObjectResource value) {
98         if (resourcesRoot!=null) resourcesRoot.setAdminObjectResource(index, value);
99     }
100
101     public int size(String JavaDoc name) {
102         return resourcesRoot==null?-1:resourcesRoot.size(name);
103     }
104
105     public Object JavaDoc[] getValues(String JavaDoc name) {
106         return resourcesRoot==null?null:resourcesRoot.getValues(name);
107     }
108
109     public Object JavaDoc getValue(String JavaDoc propertyName) {
110         return resourcesRoot==null?null:resourcesRoot.getValue(propertyName);
111     }
112
113     public org.netbeans.modules.j2ee.sun.dd.api.CommonDDBean getPropertyParent(String JavaDoc name) {
114         return resourcesRoot==null?null:resourcesRoot.getPropertyParent(name);
115     }
116
117     public String JavaDoc getAttributeValue(String JavaDoc name) {
118         return resourcesRoot==null?null:resourcesRoot.getAttributeValue(name);
119     }
120
121     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.ResourceAdapterConfig getResourceAdapterConfig(int index) {
122         return resourcesRoot==null?null:resourcesRoot.getResourceAdapterConfig(index);
123     }
124
125     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.PersistenceManagerFactoryResource getPersistenceManagerFactoryResource(int index) {
126         return resourcesRoot==null?null:resourcesRoot.getPersistenceManagerFactoryResource(index);
127     }
128
129     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.MailResource getMailResource(int index) {
130         return resourcesRoot==null?null:resourcesRoot.getMailResource(index);
131     }
132
133     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.JmsResource getJmsResource(int index) {
134         return resourcesRoot==null?null:resourcesRoot.getJmsResource(index);
135     }
136
137     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.JdbcResource getJdbcResource(int index) {
138         return resourcesRoot==null?null:resourcesRoot.getJdbcResource(index);
139     }
140
141     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.JdbcConnectionPool getJdbcConnectionPool(int index) {
142         return resourcesRoot==null?null:resourcesRoot.getJdbcConnectionPool(index);
143     }
144
145     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.ExternalJndiResource getExternalJndiResource(int index) {
146         return resourcesRoot==null?null:resourcesRoot.getExternalJndiResource(index);
147     }
148
149     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.CustomResource getCustomResource(int index) {
150         return resourcesRoot==null?null:resourcesRoot.getCustomResource(index);
151     }
152
153     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.AdminObjectResource getAdminObjectResource(int index) {
154         return resourcesRoot==null?null:resourcesRoot.getAdminObjectResource(index);
155     }
156
157     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.ConnectorConnectionPool getConnectorConnectionPool(int index) {
158         return resourcesRoot==null?null:resourcesRoot.getConnectorConnectionPool(index);
159     }
160
161     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.ConnectorResource getConnectorResource(int index) {
162         return resourcesRoot==null?null:resourcesRoot.getConnectorResource(index);
163     }
164
165     public void setValue(String JavaDoc name, int index, Object JavaDoc value) {
166         if (resourcesRoot!=null) resourcesRoot.setValue(name, index, value);
167     }
168
169     public int addValue(String JavaDoc name, Object JavaDoc value) {
170         return resourcesRoot==null?-1:resourcesRoot.addValue(name, value);
171     }
172
173     public String JavaDoc[] findPropertyValue(String JavaDoc propName, Object JavaDoc value) {
174         return resourcesRoot==null?null:resourcesRoot.findPropertyValue(propName, value);
175     }
176
177     public int removeValue(String JavaDoc name, Object JavaDoc value) {
178         return resourcesRoot==null?-1:resourcesRoot.removeValue(name, value);
179     }
180
181     public void setValue(String JavaDoc name, Object JavaDoc value) {
182         if (resourcesRoot!=null) resourcesRoot.setValue(name, value);
183     }
184
185     public void setJmsResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.JmsResource[] value) {
186         if (resourcesRoot!=null) resourcesRoot.setJmsResource(value);
187     }
188
189     public void setConnectorConnectionPool(org.netbeans.modules.j2ee.sun.dd.api.serverresources.ConnectorConnectionPool[] value) {
190         if (resourcesRoot!=null) resourcesRoot.setConnectorConnectionPool(value);
191     }
192
193     public void setJmsResource(int index, org.netbeans.modules.j2ee.sun.dd.api.serverresources.JmsResource value) {
194         if (resourcesRoot!=null) resourcesRoot.setJmsResource(index, value);
195     }
196
197     public void setResourceAdapterConfig(int index, org.netbeans.modules.j2ee.sun.dd.api.serverresources.ResourceAdapterConfig value) {
198         if (resourcesRoot!=null) resourcesRoot.setResourceAdapterConfig(index, value);
199     }
200
201     public void setCustomResource(int index, org.netbeans.modules.j2ee.sun.dd.api.serverresources.CustomResource value) {
202         if (resourcesRoot!=null) resourcesRoot.setCustomResource(index, value);
203     }
204
205     public int addJdbcConnectionPool(org.netbeans.modules.j2ee.sun.dd.api.serverresources.JdbcConnectionPool value) {
206         return resourcesRoot==null?-1:resourcesRoot.addJdbcConnectionPool(value);
207     }
208
209     public int removeJdbcConnectionPool(org.netbeans.modules.j2ee.sun.dd.api.serverresources.JdbcConnectionPool value) {
210         return resourcesRoot==null?-1:resourcesRoot.removeJdbcConnectionPool(value);
211     }
212
213     public void setValue(String JavaDoc name, Object JavaDoc[] value) {
214         if (resourcesRoot!=null) resourcesRoot.setValue(name, value);
215     }
216
217     public void addPropertyChangeListener(java.beans.PropertyChangeListener JavaDoc pcl) {
218         if (resourcesRoot != null)
219             resourcesRoot.addPropertyChangeListener(pcl);
220         listeners.add(pcl);
221     }
222
223     public void removePropertyChangeListener(java.beans.PropertyChangeListener JavaDoc pcl) {
224         if (resourcesRoot != null)
225             resourcesRoot.removePropertyChangeListener(pcl);
226         listeners.remove(pcl);
227     }
228
229     public void setMailResource(int index, org.netbeans.modules.j2ee.sun.dd.api.serverresources.MailResource value) {
230         if (resourcesRoot!=null) resourcesRoot.setMailResource(index, value);
231     }
232
233     public int addMailResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.MailResource value) {
234         return resourcesRoot==null?-1:resourcesRoot.addMailResource(value);
235     }
236
237     public int removeMailResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.MailResource value) {
238         return resourcesRoot==null?-1:resourcesRoot.removeMailResource(value);
239     }
240
241     public void setExternalJndiResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.ExternalJndiResource[] value) {
242         if (resourcesRoot!=null) resourcesRoot.setExternalJndiResource(value);
243     }
244
245     public void setConnectorResource(int index, org.netbeans.modules.j2ee.sun.dd.api.serverresources.ConnectorResource value) {
246         if (resourcesRoot!=null) resourcesRoot.setConnectorResource(index, value);
247     }
248
249     public int addCustomResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.CustomResource value) {
250         return resourcesRoot==null?-1:resourcesRoot.addCustomResource(value);
251     }
252
253     public int removeCustomResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.CustomResource value) {
254         return resourcesRoot==null?-1:resourcesRoot.removeCustomResource(value);
255     }
256
257     public int addJdbcResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.JdbcResource value) {
258         return resourcesRoot==null?-1:resourcesRoot.addJdbcResource(value);
259     }
260
261     public int removeJdbcResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.JdbcResource value) {
262         return resourcesRoot==null?-1:resourcesRoot.removeJdbcResource(value);
263     }
264
265     public int addJmsResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.JmsResource value) {
266         return resourcesRoot==null?-1:resourcesRoot.addJmsResource(value);
267     }
268
269     public int removeJmsResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.JmsResource value) {
270         return resourcesRoot==null?-1:resourcesRoot.removeJmsResource(value);
271     }
272
273     public void setExternalJndiResource(int index, org.netbeans.modules.j2ee.sun.dd.api.serverresources.ExternalJndiResource value) {
274         if (resourcesRoot!=null) resourcesRoot.setExternalJndiResource(index, value);
275     }
276
277     public int addPersistenceManagerFactoryResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.PersistenceManagerFactoryResource value) {
278         return resourcesRoot==null?-1:resourcesRoot.addPersistenceManagerFactoryResource(value);
279     }
280
281     public int removePersistenceManagerFactoryResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.PersistenceManagerFactoryResource value) {
282         return resourcesRoot==null?-1:resourcesRoot.removePersistenceManagerFactoryResource(value);
283     }
284
285     public void setCustomResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.CustomResource[] value) {
286         if (resourcesRoot!=null) resourcesRoot.setCustomResource(value);
287     }
288
289     public void setJdbcConnectionPool(org.netbeans.modules.j2ee.sun.dd.api.serverresources.JdbcConnectionPool[] value) {
290         if (resourcesRoot!=null) resourcesRoot.setJdbcConnectionPool(value);
291     }
292
293     public int addConnectorConnectionPool(org.netbeans.modules.j2ee.sun.dd.api.serverresources.ConnectorConnectionPool value) {
294         return resourcesRoot==null?-1:resourcesRoot.addConnectorConnectionPool(value);
295     }
296
297     public int removeConnectorConnectionPool(org.netbeans.modules.j2ee.sun.dd.api.serverresources.ConnectorConnectionPool value) {
298         return resourcesRoot==null?-1:resourcesRoot.removeConnectorConnectionPool(value);
299     }
300
301     public void setJdbcResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.JdbcResource[] value) {
302         if (resourcesRoot!=null) resourcesRoot.setJdbcResource(value);
303     }
304
305     public int addResourceAdapterConfig(org.netbeans.modules.j2ee.sun.dd.api.serverresources.ResourceAdapterConfig value) {
306         return resourcesRoot==null?-1:resourcesRoot.addResourceAdapterConfig(value);
307     }
308
309     public int removeResourceAdapterConfig(org.netbeans.modules.j2ee.sun.dd.api.serverresources.ResourceAdapterConfig value) {
310         return resourcesRoot==null?-1:resourcesRoot.removeResourceAdapterConfig(value);
311     }
312
313     public void setResourceAdapterConfig(org.netbeans.modules.j2ee.sun.dd.api.serverresources.ResourceAdapterConfig[] value) {
314         if (resourcesRoot!=null) resourcesRoot.setResourceAdapterConfig(value);
315     }
316
317     public void setMailResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.MailResource[] value) {
318         if (resourcesRoot!=null) resourcesRoot.setMailResource(value);
319     }
320
321     public void write(java.io.OutputStream JavaDoc os) throws java.io.IOException JavaDoc {
322         if (resourcesRoot != null) {
323             resourcesRoot.write(os);
324         }
325     }
326
327     public void setConnectorResource(org.netbeans.modules.j2ee.sun.dd.api.serverresources.ConnectorResource[] value) {
328         if (resourcesRoot!=null) resourcesRoot.setConnectorResource(value);
329     }
330
331     public void merge(org.netbeans.modules.j2ee.sun.dd.api.CommonDDBean root, int mode) {
332         if (root != null) {
333             if (root instanceof ResourcesProxy)
334                 resourcesRoot.merge(((ResourcesProxy)root).getOriginal(), mode);
335             else resourcesRoot.merge(root, mode);
336         }
337     }
338
339     public Resources getOriginal() {
340         return resourcesRoot;
341     }
342     
343     public Object JavaDoc getValue(String JavaDoc name, int index) {
344         return resourcesRoot==null?null:resourcesRoot.getValues(name);
345     }
346
347     public void removeValue(String JavaDoc name, int index) {
348         if (resourcesRoot!=null) resourcesRoot.removeValue(name, index);
349     }
350
351     public int sizeResourceAdapterConfig() {
352         return resourcesRoot==null?-1:resourcesRoot.sizeResourceAdapterConfig();
353     }
354
355     public int sizePersistenceManagerFactoryResource() {
356         return resourcesRoot==null?-1:resourcesRoot.sizePersistenceManagerFactoryResource();
357     }
358
359     public int sizeMailResource() {
360         return resourcesRoot==null?-1:resourcesRoot.sizeMailResource();
361     }
362
363     public int sizeJmsResource() {
364         return resourcesRoot==null?-1:resourcesRoot.sizeJmsResource();
365     }
366
367     public int sizeJdbcResource() {
368         return resourcesRoot==null?-1:resourcesRoot.sizeJdbcResource();
369     }
370
371     public int sizeJdbcConnectionPool() {
372         return resourcesRoot==null?-1:resourcesRoot.sizeJdbcConnectionPool();
373     }
374
375     public int sizeExternalJndiResource() {
376         return resourcesRoot==null?-1:resourcesRoot.sizeExternalJndiResource();
377     }
378
379     public int sizeCustomResource() {
380         return resourcesRoot==null?-1:resourcesRoot.sizeCustomResource();
381     }
382
383     public int sizeConnectorResource() {
384         return resourcesRoot==null?-1:resourcesRoot.sizeConnectorResource();
385     }
386
387     public int sizeConnectorConnectionPool() {
388         return resourcesRoot==null?-1:resourcesRoot.sizeConnectorConnectionPool();
389     }
390
391     public int sizeAdminObjectResource() {
392         return resourcesRoot==null?-1:resourcesRoot.sizeAdminObjectResource();
393     }
394
395     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.CustomResource newCustomResource() {
396         return resourcesRoot==null?null:resourcesRoot.newCustomResource();
397     }
398
399     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.ConnectorResource newConnectorResource() {
400         return resourcesRoot==null?null:resourcesRoot.newConnectorResource();
401     }
402
403     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.ConnectorConnectionPool newConnectorConnectionPool() {
404         return resourcesRoot==null?null:resourcesRoot.newConnectorConnectionPool();
405     }
406
407     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.AdminObjectResource newAdminObjectResource() {
408         return resourcesRoot==null?null:resourcesRoot.newAdminObjectResource();
409     }
410
411     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.ResourceAdapterConfig[] getResourceAdapterConfig() {
412         return resourcesRoot==null?null:resourcesRoot.getResourceAdapterConfig();
413     }
414
415     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.PersistenceManagerFactoryResource[] getPersistenceManagerFactoryResource() {
416         return resourcesRoot==null?null:resourcesRoot.getPersistenceManagerFactoryResource();
417     }
418
419     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.MailResource[] getMailResource() {
420         return resourcesRoot==null?null:resourcesRoot.getMailResource();
421     }
422
423     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.JmsResource[] getJmsResource() {
424         return resourcesRoot==null?null:resourcesRoot.getJmsResource();
425     }
426
427     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.JdbcResource[] getJdbcResource() {
428         return resourcesRoot==null?null:resourcesRoot.getJdbcResource();
429     }
430
431     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.JdbcConnectionPool[] getJdbcConnectionPool() {
432         return resourcesRoot==null?null:resourcesRoot.getJdbcConnectionPool();
433     }
434
435     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.ExternalJndiResource[] getExternalJndiResource() {
436         return resourcesRoot==null?null:resourcesRoot.getExternalJndiResource();
437     }
438
439     public String JavaDoc dumpBeanNode() {
440         return resourcesRoot==null?null:resourcesRoot.dumpBeanNode();
441     }
442
443     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.AdminObjectResource[] getAdminObjectResource() {
444         return resourcesRoot==null?null:resourcesRoot.getAdminObjectResource();
445     }
446
447     public String JavaDoc getAttributeValue(String JavaDoc propName, String JavaDoc name) {
448         return resourcesRoot==null?null:resourcesRoot.getAttributeValue(propName, name);
449     }
450
451     public String JavaDoc getAttributeValue(String JavaDoc propName, int index, String JavaDoc name) {
452         return resourcesRoot==null?null:resourcesRoot.getAttributeValue(propName, index, name);
453     }
454
455     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.ConnectorConnectionPool[] getConnectorConnectionPool() {
456         return resourcesRoot==null?null:resourcesRoot.getConnectorConnectionPool();
457     }
458
459     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.ConnectorResource[] getConnectorResource() {
460         return resourcesRoot==null?null:resourcesRoot.getConnectorResource();
461     }
462
463     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.CustomResource[] getCustomResource() {
464         return resourcesRoot==null?null:resourcesRoot.getCustomResource();
465     }
466
467     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.ExternalJndiResource newExternalJndiResource() {
468         return resourcesRoot==null?null:resourcesRoot.newExternalJndiResource();
469     }
470
471     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.JdbcConnectionPool newJdbcConnectionPool() {
472         return resourcesRoot==null?null:resourcesRoot.newJdbcConnectionPool();
473     }
474
475     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.JdbcResource newJdbcResource() {
476         return resourcesRoot==null?null:resourcesRoot.newJdbcResource();
477     }
478
479     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.JmsResource newJmsResource() {
480         return resourcesRoot==null?null:resourcesRoot.newJmsResource();
481     }
482
483     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.MailResource newMailResource() {
484         return resourcesRoot==null?null:resourcesRoot.newMailResource();
485     }
486
487     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.PersistenceManagerFactoryResource newPersistenceManagerFactoryResource() {
488         return resourcesRoot==null?null:resourcesRoot.newPersistenceManagerFactoryResource();
489     }
490
491     public org.netbeans.modules.j2ee.sun.dd.api.serverresources.ResourceAdapterConfig newResourceAdapterConfig() {
492         return resourcesRoot==null?null:resourcesRoot.newResourceAdapterConfig();
493     }
494
495     public void setAttributeValue(String JavaDoc name, String JavaDoc value) {
496         if (resourcesRoot!=null) resourcesRoot.setAttributeValue(name, value);
497     }
498
499     public void setAttributeValue(String JavaDoc propName, String JavaDoc name, String JavaDoc value) {
500         if (resourcesRoot!=null) resourcesRoot.setAttributeValue(propName, name, value);
501     }
502
503     public void setAttributeValue(String JavaDoc propName, int index, String JavaDoc name, String JavaDoc value) {
504         if (resourcesRoot!=null) resourcesRoot.setAttributeValue(propName, index, name, value);
505     }
506
507     public Object JavaDoc clone() {
508        ResourcesProxy proxy = null;
509         if (resourcesRoot==null)
510             proxy = new ResourcesProxy(null);
511         else {
512             Resources clonedResources=(Resources)resourcesRoot.clone();
513             proxy = new ResourcesProxy(clonedResources);
514         }
515         return proxy;
516     }
517
518     /** Resources have no version (at present) so we could throw UnsupportedOperationException
519      * but it's probably just better to clone it since that is what this method does anyway.
520      */

521     public CommonDDBean cloneVersion(String JavaDoc version) {
522         return (CommonDDBean) clone();
523     }
524    
525     public void write(java.io.File JavaDoc f) throws java.io.IOException JavaDoc, org.netbeans.modules.schema2beans.Schema2BeansRuntimeException {
526         if (resourcesRoot!=null) resourcesRoot.write(f);
527     }
528     
529 }
530
Popular Tags