src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.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
23 * questions. 23 * questions.
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.xml.internal.ws.api.model.wsdl.WSDLMessage; 28 import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
29 import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput; 29 import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
30 import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation; 30 import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
31 import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOutput;
31 import com.sun.istack.internal.NotNull; 32 import com.sun.istack.internal.NotNull;
32 33
33 import javax.xml.namespace.QName; 34 import javax.xml.namespace.QName;
34 import javax.xml.stream.XMLStreamReader; 35 import javax.xml.stream.XMLStreamReader;
35 36
36 /** 37 /**
37 * @author Vivek Pandey 38 * @author Vivek Pandey
38 */ 39 */
39 public final class WSDLOutputImpl extends AbstractExtensibleImpl implements WSDLOutput { 40 public final class WSDLOutputImpl extends AbstractExtensibleImpl implements EditableWSDLOutput {
40 private String name; 41 private String name;
41 private QName messageName; 42 private QName messageName;
42 private WSDLOperationImpl operation; 43 private EditableWSDLOperation operation;
43 private WSDLMessageImpl message; 44 private EditableWSDLMessage message;
44 private String action; 45 private String action;
45 private boolean defaultAction = true; 46 private boolean defaultAction = true;
46 public WSDLOutputImpl(XMLStreamReader xsr,String name, QName messageName, WSDLOperationImpl operation) { 47
48 public WSDLOutputImpl(XMLStreamReader xsr,String name, QName messageName, EditableWSDLOperation operation) {
47 super(xsr); 49 super(xsr);
48 this.name = name; 50 this.name = name;
49 this.messageName = messageName; 51 this.messageName = messageName;
50 this.operation = operation; 52 this.operation = operation;
51 } 53 }
52 54
53 public String getName() { 55 public String getName() {
54 return (name == null)?operation.getName().getLocalPart()+"Response":name; 56 return (name == null)?operation.getName().getLocalPart()+"Response":name;
55 } 57 }
56 58
57 public WSDLMessage getMessage() { 59 public EditableWSDLMessage getMessage() {
58 return message; 60 return message;
59 } 61 }
60 62
61 public String getAction() { 63 public String getAction() {
62 return action; 64 return action;
69 public void setDefaultAction(boolean defaultAction) { 71 public void setDefaultAction(boolean defaultAction) {
70 this.defaultAction = defaultAction; 72 this.defaultAction = defaultAction;
71 } 73 }
72 74
73 @NotNull 75 @NotNull
74 public WSDLOperation getOperation() { 76 public EditableWSDLOperation getOperation() {
75 return operation; 77 return operation;
76 } 78 }
77 79
78 @NotNull 80 @NotNull
79 public QName getQName() { 81 public QName getQName() {
82 84
83 public void setAction(String action) { 85 public void setAction(String action) {
84 this.action = action; 86 this.action = action;
85 } 87 }
86 88
87 void freeze(WSDLModelImpl root) { 89 public void freeze(EditableWSDLModel root) {
88 message = root.getMessage(messageName); 90 message = root.getMessage(messageName);
89 } 91 }
90 } 92 }

mercurial