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