KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > api > registry > WebServicesRegistryView


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.api.registry;
21
22 import java.beans.PropertyChangeListener JavaDoc;
23
24 import org.openide.nodes.Node;
25 import org.openide.filesystems.FileObject;
26
27 /** Retrieve an implementation of this instance via Global Lookup to obtain
28  * access to the registry of web services within the IDE.
29  *
30  * !! This is not a supported API. Rather, it exists in it's current form
31  * to allow other webservices modules to utilize the registry. It should
32  * be redone to have a service interface and iterate/search through the
33  * registered services. It will also need to allow external modules to
34  * register a WSDL, bypassing the UI, but doing the rest.
35  *
36  * @author Peter Williams
37  */

38 public interface WebServicesRegistryView {
39     
40     /** Retrieve the root node of the registry view on the runtime tab.
41      *
42      * !PW used by the webservice core to relate the client view to the registered
43      * services. Not stable, as this will be replaced with a search mechanism.
44      */

45     public Node getRegistryRootNode();
46     
47
48     /** Retrieve the node(s) representing the services present in the specified
49      * wsdl file.
50      *
51      * !PW we may need to add the name of the WSDL file here, or other identifying
52      * information, as the name of the registered service can be changed by
53      * the user and is not necessarily present in the WSDL file that was originally
54      * installed. For now, we'll assume the WSDL file has only one service
55      * and that the name has not been changed.
56      */

57     public Node[] getWebServiceNodes(FileObject wsdlFile);
58     
59     
60     /** Checks to see if the service specified has been registered.
61      *
62      * !PW This assumes that the serviceName and displayName of the installed
63      * service (if any) match. This is the default, but the user is allowed
64      * to change the name of an installed service added manually so we will
65      * need to enhance the backend and possible this method to allow better
66      * matching.
67      */

68     public boolean isServiceRegistered(String JavaDoc serviceName);
69     
70     
71     /** Registers the services in the specified WSDL file.
72      *
73      * !PW the user can change the package in the project view, but what about
74      * the name, as displayed in the registry? Maybe add a 'Rename...'
75      * action to service nodes.
76      *
77      * !PW what exception(s) should this throw if any?
78      */

79     public boolean registerService(FileObject wsdlFile, boolean replaceService);
80     
81     
82     /** Registers the service running on the specifiedl URL. All this means is
83      * that the implementation will access [wsdlUrl]?WSDL and process the result
84      * as if it were a WSDL file (which it will be if this is a valid service.)
85      *
86      * !PW the user can change the package in the project view, but what about
87      * the name, as displayed in the registry? Maybe add a 'Rename...'
88      * action to service nodes.
89      *
90      * !PW what exception(s) should this throw if any?
91      */

92     public boolean registerService(java.net.URL JavaDoc wsdlUrl, boolean replaceService);
93
94     /** Event notification of services being added and removed.
95      *
96      * !PW Probably should define my own event harness.
97      */

98     public static final String JavaDoc WEB_SERVICE_ADDED = "webServiceAdded";
99     public static final String JavaDoc WEB_SERVICE_REMOVED = "webServiceRemoved";
100     
101     public void addPropertyChangeListener(PropertyChangeListener JavaDoc listener);
102     public void removePropertyChangeListener(PropertyChangeListener JavaDoc listener);
103 }
104
Popular Tags