001: /*
002: * BEGIN_HEADER - DO NOT EDIT
003: *
004: * The contents of this file are subject to the terms
005: * of the Common Development and Distribution License
006: * (the "License"). You may not use this file except
007: * in compliance with the License.
008: *
009: * You can obtain a copy of the license at
010: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011: * See the License for the specific language governing
012: * permissions and limitations under the License.
013: *
014: * When distributing Covered Code, include this CDDL
015: * HEADER in each file and include the License file at
016: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017: * If applicable add the following below this CDDL HEADER,
018: * with the fields enclosed by brackets "[]" replaced with
019: * your own identifying information: Portions Copyright
020: * [year] [name of copyright owner]
021: */
022:
023: /*
024: * @(#)Binding.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package com.sun.jbi.wsdl2.impl;
030:
031: import javax.xml.namespace.QName;
032: import org.w3c.dom.DocumentFragment;
033: import org.w3.ns.wsdl.BindingType;
034:
035: /**
036: * Abstract implementation of
037: * WSDL 2.0 Binding component.
038: *
039: * @author Sun Microsystems, Inc.
040: */
041: abstract class Binding extends ExtensibleDocumentedComponent implements
042: com.sun.jbi.wsdl2.Binding {
043: /**
044: * Get the BindingType XML bean behind this Binding component.
045: *
046: * @return The BindingType XML bean behind this component.
047: */
048: protected final BindingType getBean() {
049: return (BindingType) this .mXmlObject;
050: }
051:
052: /**
053: * Construct an abstract Binding implementation base component.
054: *
055: * @param bean The XML bean for this Binding component
056: */
057: Binding(BindingType bean) {
058: super (bean);
059: }
060:
061: /**
062: * Get local name of this binding component.
063: *
064: * @return Local name of this binding component
065: */
066: public String getName() {
067: return getBean().getName();
068: }
069:
070: /**
071: * Set local name of this binding component.
072: *
073: * @param theName Local name of this binding component
074: */
075: public void setName(String theName) {
076: getBean().setName(theName);
077: }
078:
079: /**
080: * Create a new operation, appending it to this binding's operations
081: * list.
082: *
083: * @return Newly created operation, appended to this binding's operation
084: * list.
085: */
086: public abstract com.sun.jbi.wsdl2.BindingOperation addNewOperation();
087:
088: /**
089: * Create a new binding fault, appending it to this binding's faults
090: * list.
091: *
092: * @param ref Interface fault to which the new binding fault adds binding
093: * information
094: * @return Newly created binding fault, appended to the faults list.
095: */
096: public abstract com.sun.jbi.wsdl2.BindingFault addNewBindingFault(
097: com.sun.jbi.wsdl2.InterfaceFault ref);
098:
099: /**
100: * Get URI indicating the type of this binding.
101: *
102: * @return URI indicating the type of this binding
103: */
104: public String getType() {
105: return getBean().getType();
106: }
107:
108: /**
109: * Set URI indicating the type of this binding
110: *
111: * @param theType URI indicating the type of this binding
112: */
113: public void setType(String theType) {
114: getBean().setType(theType);
115: }
116:
117: /**
118: * Return this WSDL binding as an XML string.
119: *
120: * @return This binding, serialized as an XML string.
121: */
122: public abstract String toXmlString();
123:
124: /**
125: * Return this binding as a DOM document fragment. The DOM subtree is a
126: * copy; altering it will not affect this binding.
127: *
128: * @return This binding, as a DOM document fragment.
129: */
130: public abstract DocumentFragment toXmlDocumentFragment();
131:
132: }
133:
134: // End-of-file: Binding.java
|