KickJava   Java API By Example, From Geeks To Geeks.

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


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.MessageReference;
19 import org.apache.wsdl.WSDLFaultReference;
20 import org.apache.wsdl.WSDLOperation;
21 import org.apache.wsdl.WSDLService;
22
23 import javax.xml.namespace.QName JavaDoc;
24 import java.util.LinkedList JavaDoc;
25 import java.util.List JavaDoc;
26
27 /**
28  * @author Chathura Herath
29  */

30 public class WSDLOperationImpl extends ExtensibleComponentImpl
31         implements WSDLOperation {
32     /**
33      * Field name
34      */

35     private QName JavaDoc name;
36
37     /**
38      * URI of the MEP
39      */

40     private String JavaDoc messageExchangePattern;
41
42     /**
43      * Field inputMessage
44      */

45     private MessageReference inputMessage;
46
47     /**
48      * Field outputMessage
49      */

50     private MessageReference outputMessage;
51
52     /**
53      * Field infaults
54      */

55     private List JavaDoc infaults = new LinkedList JavaDoc();
56
57     /**
58      * Field outfaults
59      */

60     private List JavaDoc outfaults = new LinkedList JavaDoc();
61
62     // value of parent if not specified
63

64     /**
65      * Field style
66      */

67     private String JavaDoc style = WSDLService.STYLE_DOC;
68
69     /**
70      * Field safety
71      */

72     private boolean safety = false;
73
74     /**
75      * Method getInfaults
76      *
77      * @return
78      */

79     public List JavaDoc getInfaults() {
80         return infaults;
81     }
82
83     /**
84      * Method setInfaults
85      *
86      * @param infaults
87      */

88     public void setInfaults(List JavaDoc infaults) {
89         this.infaults = infaults;
90     }
91
92     /**
93      * Method getInputMessage
94      *
95      * @return
96      */

97     public MessageReference getInputMessage() {
98         return inputMessage;
99     }
100
101     /**
102      * Method setInputMessage
103      *
104      * @param inputMessage
105      */

106     public void setInputMessage(MessageReference inputMessage) {
107         this.inputMessage = inputMessage;
108     }
109
110     /**
111      * Method getMessageExchangePattern
112      *
113      * @return
114      */

115     public String JavaDoc getMessageExchangePattern() {
116         return messageExchangePattern;
117     }
118
119     /**
120      * Method setMessageExchangePattern
121      *
122      * @param messageExchangePattern
123      */

124     public void setMessageExchangePattern(String JavaDoc messageExchangePattern) {
125         this.messageExchangePattern = messageExchangePattern;
126     }
127
128     /**
129      * Method getName
130      *
131      * @return
132      */

133     public QName JavaDoc getName() {
134         return name;
135     }
136
137     /**
138      * Method setName
139      *
140      * @param name
141      */

142     public void setName(QName JavaDoc name) {
143         this.name = name;
144     }
145
146     /**
147      * Method getOutfaults
148      *
149      * @return
150      */

151     public List JavaDoc getOutfaults() {
152         return outfaults;
153     }
154
155     /**
156      * Method setOutfaults
157      *
158      * @param outfaults
159      */

160     public void setOutfaults(List JavaDoc outfaults) {
161         this.outfaults = outfaults;
162     }
163
164     /**
165      * Method getOutputMessage
166      *
167      * @return
168      */

169     public MessageReference getOutputMessage() {
170         return outputMessage;
171     }
172
173     /**
174      * Method setOutputMessage
175      *
176      * @param outputMessage
177      */

178     public void setOutputMessage(MessageReference outputMessage) {
179         this.outputMessage = outputMessage;
180     }
181
182     /**
183      * Method isSafe
184      *
185      * @return
186      */

187     public boolean isSafe() {
188         return safety;
189     }
190
191     /**
192      * Method setSafety
193      *
194      * @param safe
195      */

196     public void setSafety(boolean safe) {
197         this.safety = safe;
198     }
199
200     public String JavaDoc getStyle() {
201         return style;
202     }
203
204     public void setStyle(String JavaDoc style) {
205         this.style = style;
206     }
207
208     /**
209      * Will return the Namespace of the QName of this <code>WSDLOperation</code>. Will return null if not set.
210      *
211      * @return
212      */

213     public String JavaDoc getTargetnamespace() {
214         if (null != this.name) {
215             return this.name.getNamespaceURI();
216         }
217         return null;
218     }
219     
220     /**
221      * Add the InFault to the Components InFaults
222      * @param inFault
223      */

224     public void addInFault(WSDLFaultReference inFault){
225         this.infaults.add(inFault);
226     }
227     
228     /**
229      * Add the OutFault to the Component OutFaults
230      * @param outFault
231      */

232     public void addOutFault(WSDLFaultReference outFault){
233         this.outfaults.add(outFault);
234     }
235 }
236
Popular Tags