src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java

changeset 408
b0610cd08440
parent 368
0989ad8c0860
child 637
9c07ef4934dd
equal deleted inserted replaced
405:cc682329886b 408:b0610cd08440
1 /* 1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
24 */ 24 */
25 25
26 package com.sun.xml.internal.ws.model.wsdl; 26 package com.sun.xml.internal.ws.model.wsdl;
27 27
28 import com.sun.istack.internal.NotNull; 28 import com.sun.istack.internal.NotNull;
29 import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundFault; 29 import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundFault;
30 import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault; 30 import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation;
31 import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation; 31 import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault;
32 import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; 32 import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
33 33
34 import javax.xml.stream.XMLStreamReader; 34 import javax.xml.stream.XMLStreamReader;
35 import javax.xml.namespace.QName; 35 import javax.xml.namespace.QName;
36 36
37 /** 37 /**
38 * @author Vivek Pandey 38 * @author Vivek Pandey
39 */ 39 */
40 public class WSDLBoundFaultImpl extends AbstractExtensibleImpl implements WSDLBoundFault { 40 public class WSDLBoundFaultImpl extends AbstractExtensibleImpl implements EditableWSDLBoundFault {
41 private final String name; 41 private final String name;
42 private WSDLFault fault; 42 private EditableWSDLFault fault;
43 private WSDLBoundOperationImpl owner; 43 private EditableWSDLBoundOperation owner;
44 44
45 public WSDLBoundFaultImpl(XMLStreamReader xsr, String name, WSDLBoundOperationImpl owner) { 45 public WSDLBoundFaultImpl(XMLStreamReader xsr, String name, EditableWSDLBoundOperation owner) {
46 super(xsr); 46 super(xsr);
47 this.name = name; 47 this.name = name;
48 this.owner = owner; 48 this.owner = owner;
49 } 49 }
50 50
59 return new QName(owner.getOperation().getName().getNamespaceURI(), name); 59 return new QName(owner.getOperation().getName().getNamespaceURI(), name);
60 } 60 }
61 return null; 61 return null;
62 } 62 }
63 63
64 public WSDLFault getFault() { 64 public EditableWSDLFault getFault() {
65 return fault; 65 return fault;
66 } 66 }
67 67
68 @NotNull 68 @NotNull
69 public WSDLBoundOperation getBoundOperation() { 69 public EditableWSDLBoundOperation getBoundOperation() {
70 return owner; 70 return owner;
71 } 71 }
72 72
73 void freeze(WSDLBoundOperationImpl root) { 73 public void freeze(EditableWSDLBoundOperation root) {
74 assert root != null; 74 assert root != null;
75 WSDLOperation op = root.getOperation(); 75 EditableWSDLOperation op = root.getOperation();
76 if (op != null) { 76 if (op != null) {
77 for (WSDLFault f : op.getFaults()) { 77 for (EditableWSDLFault f : op.getFaults()) {
78 if (f.getName().equals(name)) { 78 if (f.getName().equals(name)) {
79 this.fault = f; 79 this.fault = f;
80 break; 80 break;
81 } 81 }
82 } 82 }

mercurial