KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > wsdl > impl > WSDLBindingImpl


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.impl;
17
18 import org.apache.wsdl.WSDLBinding;
19 import org.apache.wsdl.WSDLBindingFault;
20 import org.apache.wsdl.WSDLBindingOperation;
21 import org.apache.wsdl.WSDLInterface;
22
23 import javax.xml.namespace.QName JavaDoc;
24 import java.util.HashMap JavaDoc;
25
26 /**
27  * @author chathura@opensource.lk
28  */

29 public class WSDLBindingImpl extends ExtensibleComponentImpl
30         implements WSDLBinding {
31     /**
32      * Field name
33      */

34     private QName JavaDoc name;
35
36     /**
37      * Field boundInterface
38      */

39     private WSDLInterface boundInterface;
40
41     /**
42      * Field bindingFaults
43      */

44     private HashMap JavaDoc bindingFaults = new HashMap JavaDoc();
45
46     /**
47      * Field bindingOperations
48      */

49     private HashMap JavaDoc bindingOperations = new HashMap JavaDoc();
50
51     /**
52      * Method getBoundInterface
53      *
54      * @return
55      */

56     public WSDLInterface getBoundInterface() {
57         return boundInterface;
58     }
59
60     /**
61      * Method setBoundInterface
62      *
63      * @param boundInterface
64      */

65     public void setBoundInterface(WSDLInterface boundInterface) {
66         this.boundInterface = boundInterface;
67     }
68
69     /**
70      * Method getName
71      *
72      * @return
73      */

74     public QName JavaDoc getName() {
75         return name;
76     }
77
78     /**
79      * Method setName
80      *
81      * @param name
82      */

83     public void setName(QName JavaDoc name) {
84         this.name = name;
85     }
86
87     /**
88      * Method getTargetNameSpace
89      *
90      * @return
91      */

92     public String JavaDoc getTargetNameSpace() {
93         return this.name.getNamespaceURI();
94     }
95
96     /**
97      * Method getBindingFaults
98      *
99      * @return
100      */

101     public HashMap JavaDoc getBindingFaults() {
102         return bindingFaults;
103     }
104
105     /**
106      * Method setBindingFaults
107      *
108      * @param bindingFaults
109      */

110     public void setBindingFaults(HashMap JavaDoc bindingFaults) {
111         this.bindingFaults = bindingFaults;
112     }
113
114     /**
115      * Method getBindingOperations
116      *
117      * @return
118      */

119     public HashMap JavaDoc getBindingOperations() {
120         return bindingOperations;
121     }
122
123     /**
124      * Method setBindingOperations
125      *
126      * @param bindingOperations
127      */

128     public void setBindingOperations(HashMap JavaDoc bindingOperations) {
129         this.bindingOperations = bindingOperations;
130     }
131
132     /**
133      * Method addBindingOperation
134      *
135      * @param bindingOperation
136      */

137     public void addBindingOperation(WSDLBindingOperation bindingOperation) {
138         if (null != bindingOperation) {
139             this.bindingOperations.put(bindingOperation.getName(),
140                     bindingOperation);
141         }
142     }
143
144     /**
145      * Method getBindingOperation
146      *
147      * @param qName
148      * @return
149      */

150     public WSDLBindingOperation getBindingOperation(QName JavaDoc qName) {
151         return (WSDLBindingOperation) this.bindingOperations.get(qName);
152     }
153
154     /**
155      * Method addBindingFaults
156      *
157      * @param bindingFault
158      */

159     public void addBindingFaults(WSDLBindingFault bindingFault) {
160         if (null != bindingFault) {
161             this.bindingFaults.put(bindingFault.getRef(), bindingFault);
162         }
163     }
164
165     /**
166      * Method getBindingFault
167      *
168      * @param ref
169      * @return
170      */

171     public WSDLBindingFault getBindingFault(QName JavaDoc ref) {
172         return (WSDLBindingFault) this.bindingFaults.get(ref);
173     }
174 }
175
Popular Tags