KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > jaxws > spi > JAXWSSupportImpl


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.jaxws.spi;
21
22 import java.io.IOException JavaDoc;
23 import java.net.URL JavaDoc;
24 import java.util.List JavaDoc;
25 import org.netbeans.spi.project.support.ant.AntProjectHelper;
26 import org.openide.filesystems.FileObject;
27
28 /**
29  *
30  * @author Milan Kuchtiak
31  */

32
33 /** SPI for JAXWSSupport
34  */

35 public interface JAXWSSupportImpl {
36     
37     public static final String JavaDoc XML_RESOURCES_FOLDER="xml-resources"; //NOI18N
38
public static final String JavaDoc SERVICES_LOCAL_FOLDER="web-services"; //NOI18N
39
public static final String JavaDoc CATALOG_FILE="catalog.xml"; //NOI18N
40

41     /**
42      * Add web service to jax-ws.xml intended for web services from java
43      * @param serviceName service display name (name of the node ws will be presented in Netbeans), e.g. "SearchService"
44      * @param serviceImpl package name of the implementation class, e.g. "org.netbeans.SerchServiceImpl"
45      * @param isJsr109 Indicates if the web service is being created in a project that supports a JSR 109 container
46      */

47     public void addService(String JavaDoc serviceName, String JavaDoc serviceImpl, boolean isJsr109);
48     
49     /** Add web service to jax-ws.xml
50      * intended for web services from wsdl
51      * @param name service display name (name of the node ws will be presented in Netbeans), e.g. "SearchService"
52      * @param serviceImpl package name of the implementation class, e.g. "org.netbeans.SerchServiceImpl"
53      * @param wsdlUrl url of the local wsdl file, e.g. file:/home/userXY/documents/wsdl/SearchService.wsdl"
54      * @param serviceName service name (from service wsdl element), e.g. SearchService
55      * @param portName port name (from service:port element), e.g. SearchServicePort
56      * @param packageName package name where java artifacts will be generated
57      * @param isJsr109 Indicates if the web service is being created in a project that supports a JSR 109 container
58      * @return returns the unique IDE service name
59      */

60     public String JavaDoc addService(String JavaDoc name, String JavaDoc serviceImpl, String JavaDoc wsdlUrl, String JavaDoc serviceName,
61             String JavaDoc portName, String JavaDoc packageName, boolean isJsr109);
62     
63     /**
64      * Returns the list of web services in the project
65      * @return list of web services
66      */

67     public List JavaDoc/*Service*/ getServices();
68     
69     /**
70      * Remove the web service entries from the project properties
71      * @param serviceName service IDE name
72      * project.xml files
73      */

74     public void removeService(String JavaDoc serviceName);
75     
76     /**
77      * Notification when Service (created from java) is removed from jax-ws.xml
78      * (JAXWSSupport needs to react when @WebService annotation is removed
79      * or when impl.class is removed (manually from project)
80      * @param serviceName service IDE name
81      */

82     public void serviceFromJavaRemoved(String JavaDoc serviceName);
83     
84     /** Get the name of the implementation class
85      * given the service (ide) name
86      * @param serviceName service IDE name
87      * @return service implementation class package name
88      */

89     public String JavaDoc getServiceImpl(String JavaDoc serviceName);
90     
91     /** Determine if the web service was created from WSDL
92      * @param serviceName service name
93      */

94     public boolean isFromWSDL(String JavaDoc serviceName);
95     
96
97     /** Get WSDL folder for the project (folder containing wsdl files)
98      * The folder is used to save remote or local wsdl files to be available within the jar/war files.
99      * it is usually META-INF/wsdl folder (or WEB-INF/wsdl for web application)
100      * @param createFolder if (createFolder==true) the folder will be created (if not created before)
101      * @return the file object (folder) where wsdl files are located in project
102      */

103     public FileObject getWsdlFolder(boolean create) throws java.io.IOException JavaDoc;
104     
105     /** Get folder for local WSDL and XML artifacts for given service
106      * This is the location where wsdl/xml files are downloaded to the project.
107      * JAX-WS java artifacts will be generated from these local files instead of remote.
108      * @param serviceName service IDE name (the web service node display name)
109      * @param createFolder if (createFolder==true) the folder will be created (if not created before)
110      * @return the file object (folder) where wsdl files are located in project
111      */

112     public FileObject getLocalWsdlFolderForService(String JavaDoc serviceName, boolean createFolder);
113     
114     /** Get folder for local jaxb binding (xml) files for given service
115      * This is the location where external jaxb binding files are downloaded to the project.
116      * JAX-WS java artifacts will be generated using these local binding files instead of remote.
117      * @param serviceName service IDE name (the web service node display name)
118      * @param createFolder if (createFolder==true) the folder will be created (if not created before)
119      * @return the file object (folder) where jaxb binding files are located in project
120      */

121     public FileObject getBindingsFolderForService(String JavaDoc serviceName, boolean createFolder);
122     
123     /**
124      * Get the AntProjectHelper from the project
125      */

126     public AntProjectHelper getAntProjectHelper();
127     
128     /** Get EntityCatalog for local copies of wsdl and schema files
129      */

130     public URL JavaDoc getCatalog();
131     
132     /** Get wsdlLocation information
133      * Useful for web service from wsdl (the @WebService wsdlLocation attribute)
134      * @param serviceName service "display" name
135      */

136     public String JavaDoc getWsdlLocation(String JavaDoc serviceName);
137    
138     /**
139      * Remove all entries associated with a non-JSR 109 entries
140      * This may include entries in the module's deployment descriptor,
141      * and entries in the implementation-specific descriptor file, sun-jaxws.xml.
142      * This is provided as a service so that the node can also use it for cleanup.
143      */

144     public void removeNonJsr109Entries(String JavaDoc serviceName) throws IOException JavaDoc;
145     
146     /**
147      * Returns the directory that contains the deployment descriptor in the project
148      */

149     public FileObject getDeploymentDescriptorFolder();
150     
151 }
152
Popular Tags