01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */package org.apache.cxf.wsdl;
19:
20: import java.net.URL;
21: import java.util.Map;
22:
23: import javax.wsdl.Definition;
24: import javax.wsdl.WSDLException;
25: import javax.wsdl.extensions.ExtensionRegistry;
26: import javax.wsdl.factory.WSDLFactory;
27:
28: import org.w3c.dom.Element;
29:
30: /**
31: * WSDLManager
32: *
33: */
34: public interface WSDLManager {
35:
36: /**
37: * Returns the ExtensionRegistry that the WSDLManager
38: * uses when reading WSDL files. Users can use
39: * this to register their own extensors.
40: * @return the ExtensionRegistry
41: */
42: ExtensionRegistry getExtenstionRegistry();
43:
44: /**
45: * Returns the WSDLFactory that is used to read/write WSDL definitions
46: * @return the WSDLFactory
47: */
48: WSDLFactory getWSDLFactory();
49:
50: /**
51: * Get the WSDL definition for the given URL. Implementations
52: * may return a copy from a local cache or load a new copy
53: * from the URL.
54: * @param url - the location of the WSDL to load
55: * @return the wsdl definition
56: */
57: Definition getDefinition(URL url) throws WSDLException;
58:
59: /**
60: * Get the WSDL definition for the given URL. Implementations
61: * may return a copy from a local cache or load a new copy
62: * from the URL.
63: * @param url - the location of the WSDL to load
64: * @return the wsdl definition
65: */
66: Definition getDefinition(String url) throws WSDLException;
67:
68: /**
69: * Get the WSDL definition for the given Element. Implementations
70: * may return a copy from a local cache or load a new copy
71: * from the Element.
72: * @param element - the root element of the wsdl
73: * @return the wsdl definition
74: */
75: Definition getDefinition(Element element) throws WSDLException;
76:
77: /**
78: * Adds a definition into the cache for lookup later
79: * @param key
80: * @param wsdl
81: */
82: void addDefinition(Object key, Definition wsdl);
83:
84: /**
85: *
86: * @return all Definitions in the map
87: */
88: Map<Object, Definition> getDefinitions();
89:
90: }
|