KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > wsdl > WSDLDescription


1 /*
2  * Copyright 2004,2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.wsdl;
17
18 import org.apache.axis2.wsdl.builder.WSDLComponentFactory;
19
20 import javax.xml.namespace.QName JavaDoc;
21 import java.util.ArrayList JavaDoc;
22 import java.util.Map JavaDoc;
23
24 /**
25  * @author chathura@opensource.lk
26  */

27 public interface WSDLDescription extends Component, WSDLComponentFactory {
28     /**
29      * Returns a Map of <code>WSDLBindings</code> Objects keyed by the <code>QName</code>
30      * of the Binding.
31      *
32      * @return
33      */

34     public Map JavaDoc getBindings();
35
36     /**
37      * Sets the whole new set of Bindings to the WSDLDefinition.
38      *
39      * @param bindings
40      */

41     public void setBindings(Map JavaDoc bindings);
42
43     /**
44      * The WSDLBinding Will be added to the map keyed with its own QName.
45      * If the WSDLBinding is null it will not be added.
46      * If the WSDLBinding is not null and Binding name is null then
47      * WSDLProcessingException will be thrown
48      *
49      * @param binding <code>WSDLBinding</code> Object
50      */

51     public void addBinding(WSDLBinding binding);
52
53     /**
54      * Retrives the <code>WSDLBinding</code> by its QName. Wil return null
55      * if <code>WSDLBinding</code> is not found.
56      *
57      * @param qName The QName of the Binding.
58      * @return
59      */

60     public WSDLBinding getBinding(QName JavaDoc qName);
61
62     /**
63      * The Interface component will be added to the map keyed with its own name.
64      * If the Interface is null it will not be added.
65      * If the interface name is null an WSDLProcessingException will be thrown
66      *
67      * @param interfaceComponent
68      */

69     public void addInterface(WSDLInterface interfaceComponent);
70
71     /**
72      * The Interface Component will be returned if it exsists,
73      * otherwise null will be returned.
74      *
75      * @param qName qName of the Interface.
76      * @return The Interface Component with the relavent QName
77      */

78     public WSDLInterface getInterface(QName JavaDoc qName);
79
80     /**
81      * Method getServices
82      *
83      * @return
84      */

85     public Map JavaDoc getServices();
86
87     /**
88      * Method setServices
89      *
90      * @param services
91      */

92     public void setServices(Map JavaDoc services);
93
94     /**
95      * Will return the <code>WSDLService </code> if found otherwise return null.
96      *
97      * @param qName <code>QName</code> of the Service
98      * @return The Service with the relavent QName
99      */

100     public WSDLService getService(QName JavaDoc qName);
101
102     /**
103      * Will add the <code>WSDLService</code> to the Map.
104      * If object is null it will not be added.
105      * If the <code>WSDLService</code> name is null a <code>WSDLProcessingException</code>
106      * will be thrown.(its required)
107      *
108      * @param service
109      */

110     public void addService(WSDLService service);
111
112     /**
113      * Method getTargetNameSpace
114      *
115      * @return
116      */

117     public String JavaDoc getTargetNameSpace();
118
119     /**
120      * Method setTargetNameSpace
121      *
122      * @param targetNameSpace
123      */

124     public void setTargetNameSpace(String JavaDoc targetNameSpace);
125
126     /**
127      * Method getWsdlInterfaces
128      *
129      * @return
130      */

131     public Map JavaDoc getWsdlInterfaces();
132
133     /**
134      * Method setWsdlInterfaces
135      *
136      * @param wsdlInterfaces
137      */

138     public void setWsdlInterfaces(Map JavaDoc wsdlInterfaces);
139
140     /**
141      * Method getTypes
142      *
143      * @return
144      */

145     public WSDLTypes getTypes();
146
147     /**
148      * Method setTypes
149      *
150      * @param types
151      */

152     public void setTypes(WSDLTypes types);
153
154     /**
155      * Gets the name attribute of the WSDL 1.1 Definitions Element
156      *
157      * @return
158      */

159     public QName JavaDoc getWSDL1DefinitionName();
160
161     /**
162      * Sets the name attribute of the WSDL 1.1 Definitions Element
163      *
164      * @param wsdl1DefinitionName
165      */

166     public void setWSDL1DefinitionName(QName JavaDoc wsdl1DefinitionName);
167
168     /**
169      * Will return all the Namespaces associated with the Definition
170      * Component and will be keyed by the Napespace Prefix.
171      *
172      * @return
173      */

174     public Map JavaDoc getNamespaces();
175
176     /**
177      * Sets the Namespaces associated with the Difinition Component
178      * and they should be keyed by its Namespace Prefix.
179      *
180      * @param namespaces
181      */

182     public void setNamespaces(Map JavaDoc namespaces);
183
184     /**
185      * Will return the Namespace URI as a String if there exists an
186      * Namespace URI associated with the given prefix, in the Definition
187      * Component, Will return null if not found.
188      *
189      * @param prefix Prefix defined in the Definitions elemet in the WSDL file
190      * @return The Namespace URI for the prefix.
191      */

192     public String JavaDoc getNamespace(String JavaDoc prefix);
193
194     /**
195      * Returns the WSDL Imports in an <code>ArrayList</code>
196      *
197      * @return
198      */

199     public ArrayList JavaDoc getImports();
200
201     /**
202      * Sets the imports as an <code>ArrayList</code>
203      *
204      * @param imports
205      */

206     public void setImports(ArrayList JavaDoc imports);
207
208     /**
209      * Adds an import to the list.
210      *
211      * @param wsdlImport
212      */

213     public void addImports(WSDLImport wsdlImport);
214
215     /**
216      * Returns the Includes as an <code>ArrayList</code>
217      *
218      * @return
219      */

220     public ArrayList JavaDoc getIncludes();
221
222     /**
223      * Sets the includes as an <code>Arraylist</code>
224      *
225      * @param includes
226      */

227     public void setIncludes(ArrayList JavaDoc includes);
228
229     /**
230      * Adds the WSDL Include to the list.
231      *
232      * @param wsdlInclude
233      */

234     public void addInclude(WSDLInclude wsdlInclude);
235
236     /**
237      * @return A new instance of type <code>WSDLDescription</code>
238      */

239     public WSDLDescription createDescription();
240
241     /**
242      * @return A new instance of type <code>WSDLService</code>
243      */

244     public WSDLService createService();
245
246     /**
247      * @return A new instance of type <code>WSDLInterface</code>
248      */

249     public WSDLInterface createInterface();
250
251     /**
252      * @return A new instance of type <code>WSDLTypes</code>
253      */

254     public WSDLTypes createTypes();
255
256     /**
257      * @return A new instance of type <code>WSDLBinding</code>
258      */

259     public WSDLBinding createBinding();
260
261     /**
262      * @return A new instance of type <code>WSDLOperation</code>
263      */

264     public WSDLOperation createOperation();
265
266     /**
267      * @return A new instance of type <code>WSDLEndpoint</code>
268      */

269     public WSDLEndpoint createEndpoint();
270
271     /**
272      * @return A new instance of type <code>WSDLFeature</code>
273      */

274     public WSDLFeature createFeature();
275
276     /**
277      * @return A new instance of type <code>WSDLImport</code>
278      */

279     public WSDLImport createImport();
280
281     /**
282      * @return A new instance of type <code>WSDLInclude</code>
283      */

284     public WSDLInclude createInclude();
285
286     /**
287      * Method createProperty
288      *
289      * @return
290      */

291     public WSDLProperty createProperty();
292     
293     /**
294      * Will return the first binding component the collection returned by the
295      * <code>Map</code>.
296      * @return
297      */

298     public WSDLBinding getFirstBinding();
299 }
300
Popular Tags