KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > wsdl > model > impl > OperationImpl


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.xml.wsdl.model.impl;
21
22 import java.util.Collection JavaDoc;
23 import java.util.List JavaDoc;
24 import org.netbeans.modules.xml.wsdl.model.Fault;
25 import org.netbeans.modules.xml.wsdl.model.Input;
26 import org.netbeans.modules.xml.wsdl.model.Operation;
27 import org.netbeans.modules.xml.wsdl.model.Output;
28 import org.netbeans.modules.xml.wsdl.model.WSDLModel;
29 import org.w3c.dom.Element JavaDoc;
30
31 /**
32  *
33  * @author nn136682
34  */

35 public abstract class OperationImpl extends NamedImpl implements Operation {
36     
37     /** Creates a new instance of OperationImpl */
38     public OperationImpl(WSDLModel model, Element JavaDoc e) {
39         super(model, e);
40     }
41
42     public void setInput(Input input) {
43         throw new UnsupportedOperationException JavaDoc(
44                 "This operation does not support this message exchange pattern"); //NOI18N
45
}
46   
47     public Input getInput() {
48         return null;
49     }
50     
51     public void setOutput(Output output) {
52         throw new UnsupportedOperationException JavaDoc(
53                 "This operation does not support this message exchange pattern");//NOI18N
54
}
55
56     public Output getOutput() {
57         return null;
58     }
59     
60     public Collection JavaDoc<Fault> getFaults() {
61         return getChildren(Fault.class);
62     }
63
64     public void addFault(Fault fault) {
65         appendChild(Operation.FAULT_PROPERTY, fault);
66     }
67
68     public void removeFault(Fault fault) {
69         removeChild(Operation.FAULT_PROPERTY, fault);
70     }
71
72     public List JavaDoc<String JavaDoc> getParameterOrder() {
73         String JavaDoc s = getAttribute(WSDLAttribute.PARAMETER_ORDER);
74         return Util.parse(s);
75     }
76
77     public void setParameterOrder(List JavaDoc<String JavaDoc> parameterOrder) {
78         setAttribute(PARAMETER_ORDER_PROPERTY, WSDLAttribute.PARAMETER_ORDER,
79                 Util.toString(parameterOrder));
80     }
81     
82     protected Object JavaDoc getAttributeValueOf(WSDLAttribute attr, String JavaDoc s) {
83         if (attr == WSDLAttribute.PARAMETER_ORDER) {
84             return Util.parse(s);
85         } else {
86             return super.getAttributeValueOf(attr, s);
87         }
88     }
89
90 }
91
Popular Tags