001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common Development
008: * and Distribution License("CDDL") (collectively, the "License"). You
009: * may not use this file except in compliance with the License. You can obtain
010: * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
011: * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
012: * language governing permissions and limitations under the License.
013: *
014: * When distributing the software, include this License Header Notice in each
015: * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
016: * Sun designates this particular file as subject to the "Classpath" exception
017: * as provided by Sun in the GPL Version 2 section of the License file that
018: * accompanied this code. If applicable, add the following below the License
019: * Header, with the fields enclosed by brackets [] replaced by your own
020: * identifying information: "Portions Copyrighted [year]
021: * [name of copyright owner]"
022: *
023: * Contributor(s):
024: *
025: * If you wish your version of this file to be governed by only the CDDL or
026: * only the GPL Version 2, indicate your decision by adding "[Contributor]
027: * elects to include this software in this distribution under the [CDDL or GPL
028: * Version 2] license." If you don't indicate a single choice of license, a
029: * recipient has the option to distribute your version of this file under
030: * either the CDDL, the GPL Version 2 or to extend the choice of license to
031: * its licensees as provided above. However, if you add GPL Version 2 code
032: * and therefore, elected the GPL Version 2 license, then the option applies
033: * only if the new code is made subject to such option by the copyright
034: * holder.
035: */
036:
037: package com.sun.xml.ws.wsdl.parser;
038:
039: import com.sun.xml.ws.api.model.wsdl.*;
040: import com.sun.xml.ws.api.wsdl.parser.WSDLParserExtension;
041: import com.sun.xml.ws.api.wsdl.parser.WSDLParserExtensionContext;
042:
043: import javax.xml.stream.XMLStreamReader;
044:
045: /**
046: * Delegate to another {@link WSDLParserExtension}
047: * useful for the base class for filtering.
048: *
049: * @author Kohsuke Kawaguchi
050: */
051: class DelegatingParserExtension extends WSDLParserExtension {
052: protected final WSDLParserExtension core;
053:
054: public DelegatingParserExtension(WSDLParserExtension core) {
055: this .core = core;
056: }
057:
058: public void start(WSDLParserExtensionContext context) {
059: core.start(context);
060: }
061:
062: public void serviceAttributes(WSDLService service,
063: XMLStreamReader reader) {
064: core.serviceAttributes(service, reader);
065: }
066:
067: public boolean serviceElements(WSDLService service,
068: XMLStreamReader reader) {
069: return core.serviceElements(service, reader);
070: }
071:
072: public void portAttributes(WSDLPort port, XMLStreamReader reader) {
073: core.portAttributes(port, reader);
074: }
075:
076: public boolean portElements(WSDLPort port, XMLStreamReader reader) {
077: return core.portElements(port, reader);
078: }
079:
080: public boolean portTypeOperationInput(WSDLOperation op,
081: XMLStreamReader reader) {
082: return core.portTypeOperationInput(op, reader);
083: }
084:
085: public boolean portTypeOperationOutput(WSDLOperation op,
086: XMLStreamReader reader) {
087: return core.portTypeOperationOutput(op, reader);
088: }
089:
090: public boolean portTypeOperationFault(WSDLOperation op,
091: XMLStreamReader reader) {
092: return core.portTypeOperationFault(op, reader);
093: }
094:
095: public boolean definitionsElements(XMLStreamReader reader) {
096: return core.definitionsElements(reader);
097: }
098:
099: public boolean bindingElements(WSDLBoundPortType binding,
100: XMLStreamReader reader) {
101: return core.bindingElements(binding, reader);
102: }
103:
104: public void bindingAttributes(WSDLBoundPortType binding,
105: XMLStreamReader reader) {
106: core.bindingAttributes(binding, reader);
107: }
108:
109: public boolean portTypeElements(WSDLPortType portType,
110: XMLStreamReader reader) {
111: return core.portTypeElements(portType, reader);
112: }
113:
114: public void portTypeAttributes(WSDLPortType portType,
115: XMLStreamReader reader) {
116: core.portTypeAttributes(portType, reader);
117: }
118:
119: public boolean portTypeOperationElements(WSDLOperation operation,
120: XMLStreamReader reader) {
121: return core.portTypeOperationElements(operation, reader);
122: }
123:
124: public void portTypeOperationAttributes(WSDLOperation operation,
125: XMLStreamReader reader) {
126: core.portTypeOperationAttributes(operation, reader);
127: }
128:
129: public boolean bindingOperationElements(
130: WSDLBoundOperation operation, XMLStreamReader reader) {
131: return core.bindingOperationElements(operation, reader);
132: }
133:
134: public void bindingOperationAttributes(
135: WSDLBoundOperation operation, XMLStreamReader reader) {
136: core.bindingOperationAttributes(operation, reader);
137: }
138:
139: public boolean messageElements(WSDLMessage msg,
140: XMLStreamReader reader) {
141: return core.messageElements(msg, reader);
142: }
143:
144: public void messageAttributes(WSDLMessage msg,
145: XMLStreamReader reader) {
146: core.messageAttributes(msg, reader);
147: }
148:
149: public boolean portTypeOperationInputElements(WSDLInput input,
150: XMLStreamReader reader) {
151: return core.portTypeOperationInputElements(input, reader);
152: }
153:
154: public void portTypeOperationInputAttributes(WSDLInput input,
155: XMLStreamReader reader) {
156: core.portTypeOperationInputAttributes(input, reader);
157: }
158:
159: public boolean portTypeOperationOutputElements(WSDLOutput output,
160: XMLStreamReader reader) {
161: return core.portTypeOperationOutputElements(output, reader);
162: }
163:
164: public void portTypeOperationOutputAttributes(WSDLOutput output,
165: XMLStreamReader reader) {
166: core.portTypeOperationOutputAttributes(output, reader);
167: }
168:
169: public boolean portTypeOperationFaultElements(WSDLFault fault,
170: XMLStreamReader reader) {
171: return core.portTypeOperationFaultElements(fault, reader);
172: }
173:
174: public void portTypeOperationFaultAttributes(WSDLFault fault,
175: XMLStreamReader reader) {
176: core.portTypeOperationFaultAttributes(fault, reader);
177: }
178:
179: public boolean bindingOperationInputElements(
180: WSDLBoundOperation operation, XMLStreamReader reader) {
181: return core.bindingOperationInputElements(operation, reader);
182: }
183:
184: public void bindingOperationInputAttributes(
185: WSDLBoundOperation operation, XMLStreamReader reader) {
186: core.bindingOperationInputAttributes(operation, reader);
187: }
188:
189: public boolean bindingOperationOutputElements(
190: WSDLBoundOperation operation, XMLStreamReader reader) {
191: return core.bindingOperationOutputElements(operation, reader);
192: }
193:
194: public void bindingOperationOutputAttributes(
195: WSDLBoundOperation operation, XMLStreamReader reader) {
196: core.bindingOperationOutputAttributes(operation, reader);
197: }
198:
199: public boolean bindingOperationFaultElements(WSDLBoundFault fault,
200: XMLStreamReader reader) {
201: return core.bindingOperationFaultElements(fault, reader);
202: }
203:
204: public void bindingOperationFaultAttributes(WSDLBoundFault fault,
205: XMLStreamReader reader) {
206: core.bindingOperationFaultAttributes(fault, reader);
207: }
208:
209: public void finished(WSDLParserExtensionContext context) {
210: core.finished(context);
211: }
212:
213: public void postFinished(WSDLParserExtensionContext context) {
214: core.postFinished(context);
215: }
216: }
|