1 19 20 package org.netbeans.modules.xml.wsdl.model.impl; 21 22 import java.util.Collection ; 23 import java.util.List ; 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 ; 30 31 35 public abstract class OperationImpl extends NamedImpl implements Operation { 36 37 38 public OperationImpl(WSDLModel model, Element e) { 39 super(model, e); 40 } 41 42 public void setInput(Input input) { 43 throw new UnsupportedOperationException ( 44 "This operation does not support this message exchange pattern"); } 46 47 public Input getInput() { 48 return null; 49 } 50 51 public void setOutput(Output output) { 52 throw new UnsupportedOperationException ( 53 "This operation does not support this message exchange pattern"); } 55 56 public Output getOutput() { 57 return null; 58 } 59 60 public Collection <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 <String > getParameterOrder() { 73 String s = getAttribute(WSDLAttribute.PARAMETER_ORDER); 74 return Util.parse(s); 75 } 76 77 public void setParameterOrder(List <String > parameterOrder) { 78 setAttribute(PARAMETER_ORDER_PROPERTY, WSDLAttribute.PARAMETER_ORDER, 79 Util.toString(parameterOrder)); 80 } 81 82 protected Object getAttributeValueOf(WSDLAttribute attr, String 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 |