|
1 /* |
|
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
|
3 * |
|
4 * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. |
|
5 * |
|
6 * The contents of this file are subject to the terms of either the GNU |
|
7 * General Public License Version 2 only ("GPL") or the Common Development |
|
8 * and Distribution License("CDDL") (collectively, the "License"). You |
|
9 * may not use this file except in compliance with the License. You can |
|
10 * obtain a copy of the License at |
|
11 * http://glassfish.java.net/public/CDDL+GPL_1_1.html |
|
12 * or packager/legal/LICENSE.txt. See the License for the specific |
|
13 * language governing permissions and limitations under the License. |
|
14 * |
|
15 * When distributing the software, include this License Header Notice in each |
|
16 * file and include the License file at packager/legal/LICENSE.txt. |
|
17 * |
|
18 * GPL Classpath Exception: |
|
19 * Oracle designates this particular file as subject to the "Classpath" |
|
20 * exception as provided by Oracle in the GPL Version 2 section of the License |
|
21 * file that accompanied this code. |
|
22 * |
|
23 * Modifications: |
|
24 * If applicable, add the following below the License Header, with the fields |
|
25 * enclosed by brackets [] replaced by your own identifying information: |
|
26 * "Portions Copyright [year] [name of copyright owner]" |
|
27 * |
|
28 * Contributor(s): |
|
29 * If you wish your version of this file to be governed by only the CDDL or |
|
30 * only the GPL Version 2, indicate your decision by adding "[Contributor] |
|
31 * elects to include this software in this distribution under the [CDDL or GPL |
|
32 * Version 2] license." If you don't indicate a single choice of license, a |
|
33 * recipient has the option to distribute your version of this file under |
|
34 * either the CDDL, the GPL Version 2 or to extend the choice of license to |
|
35 * its licensees as provided above. However, if you add GPL Version 2 code |
|
36 * and therefore, elected the GPL Version 2 license, then the option applies |
|
37 * only if the new code is made subject to such option by the copyright |
|
38 * holder. |
|
39 */ |
|
40 |
|
41 package com.oracle.webservices.internal.api.databinding; |
|
42 |
|
43 import javax.xml.transform.Result; |
|
44 import javax.xml.ws.Holder; |
|
45 |
|
46 /** |
|
47 * WSDLResolver is used by WSDLGenerator while generating WSDL and its associated |
|
48 * documents. It is used to control what documents need to be generated and what |
|
49 * documents need to be picked from metadata. If endpont's document metadata |
|
50 * already contains some documents, their systemids may be used for wsdl:import, |
|
51 * and schema:import. The suggested filenames are relative urls(for e.g: EchoSchema1.xsd) |
|
52 * The Result object systemids are also relative urls(for e.g: AbsWsdl.wsdl). |
|
53 * |
|
54 * @author Jitendra Kotamraju |
|
55 */ |
|
56 public interface WSDLResolver { |
|
57 /** |
|
58 * Create a Result object into which concrete WSDL is to be generated. |
|
59 * |
|
60 * @return Result for the concrete WSDL |
|
61 */ |
|
62 public Result getWSDL(String suggestedFilename); |
|
63 |
|
64 /** |
|
65 * Create a Result object into which abstract WSDL is to be generated. If the the |
|
66 * abstract WSDL is already in metadata, it is not generated. |
|
67 * |
|
68 * Update filename if the suggested filename need to be changed in wsdl:import. |
|
69 * This needs to be done if the metadata contains abstract WSDL, and that systemid |
|
70 * needs to be reflected in concrete WSDL's wsdl:import |
|
71 * |
|
72 * @return null if abstract WSDL need not be generated |
|
73 */ |
|
74 public Result getAbstractWSDL(Holder<String> filename); |
|
75 |
|
76 /** |
|
77 * Create a Result object into which schema doc is to be generated. Typically if |
|
78 * there is a schema doc for namespace in metadata, then it is not generated. |
|
79 * |
|
80 * Update filename if the suggested filename need to be changed in xsd:import. This |
|
81 * needs to be done if the metadata contains the document, and that systemid |
|
82 * needs to be reflected in some other document's xsd:import |
|
83 * |
|
84 * @return null if schema need not be generated |
|
85 */ |
|
86 public Result getSchemaOutput(String namespace, Holder<String> filename); |
|
87 |
|
88 } |