KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > registry > netbeans > RegisterViewImplNetBeansSide


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 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.websvc.registry.netbeans;
21 import java.net.URL JavaDoc;
22 import java.beans.PropertyChangeListener JavaDoc;
23
24 import org.openide.ErrorManager;
25 import org.openide.nodes.Node;
26 import org.openide.filesystems.FileSystem;
27 import org.openide.filesystems.FileObject;
28 import org.openide.filesystems.FileStateInvalidException;
29 import org.openide.filesystems.Repository;
30 import org.openide.loaders.DataObject;
31 import org.openide.loaders.DataFolder;
32 import org.openide.loaders.FolderLookup;
33 import org.openide.loaders.DataObjectNotFoundException;
34
35 import org.netbeans.modules.websvc.api.registry.WebServicesRegistryView;
36 /**
37  *
38  * @author ludo
39  */

40 public class RegisterViewImplNetBeansSide implements WebServicesRegistryView/*, PropertyChangeListener*/ {
41     
42     WebServicesRegistryView delegate;
43
44     /** Creates a new instance of RegisterViewImplNetBeansSide */
45     public RegisterViewImplNetBeansSide() {
46 // WebServiceModuleInstaller.findObject(WebServiceModuleInstaller.class).addPropertyChangeListener(this);
47
try{
48             delegate = (WebServicesRegistryView) WebServiceModuleInstaller.getExtensionClassLoader().loadClass("org.netbeans.modules.websvc.registry.RegistryViewImpl").newInstance();//NOI18N
49
} catch (Exception JavaDoc e) {
50           // System.out.println("----- lacking app server classes");
51
delegate = null;
52         }
53     }
54     public Node getRegistryRootNode() {
55         if(delegate != null) {
56             return delegate.getRegistryRootNode();
57         }
58         return null;
59     }
60     
61     public Node[] getWebServiceNodes(FileObject wsdlFile) {
62         if(delegate != null) {
63             return delegate.getWebServiceNodes( wsdlFile);
64         }
65         return null;
66     }
67     
68     public boolean isServiceRegistered(String JavaDoc serviceName) {
69         if(delegate != null) {
70             return delegate.isServiceRegistered(serviceName);
71         }
72         return false;
73     }
74     
75     public boolean registerService(FileObject wsdlFile, boolean replaceService) {
76         if(delegate != null) {
77             return delegate.registerService( wsdlFile, replaceService) ;
78         }
79         return false;
80     }
81     
82     public boolean registerService(URL JavaDoc wsdlUrl, boolean replaceService) {
83         if(delegate != null) {
84             return delegate.registerService( wsdlUrl, replaceService);
85         }
86         return false;
87     }
88     
89     public void addPropertyChangeListener(PropertyChangeListener JavaDoc listener) {
90         if(delegate != null) {
91             delegate.addPropertyChangeListener(listener);
92         }
93     }
94     
95     public void removePropertyChangeListener(PropertyChangeListener JavaDoc listener) {
96         if(delegate != null) {
97             delegate.removePropertyChangeListener(listener);
98         }
99     }
100
101 // public void propertyChange(java.beans.PropertyChangeEvent evt) {
102
// // System.out.println("propertyChange RegisterViewImplNetBeansSide");
103
// try {
104
// delegate = (WebServicesRegistryView) WebServiceModuleInstaller.getExtensionClassLoader().loadClass("org.netbeans.modules.websvc.registry.RegistryViewImpl").newInstance();//NOI18N
105
// } catch (Exception e) {
106
// // System.out.println("----- lacking app server classes");
107
// delegate = null;
108
// }
109
// }
110

111 }
112
Popular Tags