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: * @(#)Service.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;
030:
031: import javax.xml.namespace.QName;
032: import org.w3c.dom.DocumentFragment;
033:
034: /**
035: * API for WSDL 2.0 Service component.
036: *
037: * @author ApiGen AX.00
038: */
039: public interface Service extends ExtensibleDocumentedComponent {
040: /**
041: * Get target namespace of this binding.
042: *
043: * @return Target namespace of this binding
044: */
045: String getTargetNamespace();
046:
047: /**
048: * Get local name of this service component.
049: *
050: * @return Local name of this service component
051: */
052: String getName();
053:
054: /**
055: * Set local name of this service component.
056: *
057: * @param theName Local name of this service component
058: */
059: void setName(String theName);
060:
061: /**
062: * Get qualified name of this component.
063: *
064: * @return Qualified name of this component
065: */
066: QName getQName();
067:
068: /**
069: * Get interface provided by this service.
070: *
071: * @return Interface provided by this service
072: */
073: Interface getInterface();
074:
075: /**
076: * Set interface provided by this service.
077: *
078: * @param theInterface Interface provided by this service
079: */
080: void setInterface(Interface theInterface);
081:
082: /**
083: * Get the number of Endpoint items in endpoints.
084: *
085: * @return The number of Endpoint items in endpoints
086: */
087: int getEndpointsLength();
088:
089: /**
090: * Get endpoints for this service by indexed position.
091: *
092: * @param index Indexed position value 0..length-1
093: * @return Endpoints for this service at given <code>index</code>
094: * position.
095: */
096: Endpoint getEndpoint(int index);
097:
098: /**
099: * Set endpoints for this service by indexed position.
100: *
101: * @param index Indexed position value (0..length-1) of the item to set
102: * @param theEndpoint Item to add at position <code>index</code>.
103: */
104: void setEndpoint(int index, Endpoint theEndpoint);
105:
106: /**
107: * Append an item to endpoints for this service.
108: *
109: * @param theEndpoint Item to append to endpoints
110: */
111: void appendEndpoint(Endpoint theEndpoint);
112:
113: /**
114: * Remove endpoints for this service by index position.
115: *
116: * @param index The index position of the endpoint to remove
117: * @return The Endpoint removed, if any.
118: */
119: Endpoint removeEndpoint(int index);
120:
121: /**
122: * Create a new end point component, appending it to this service's
123: * endpoint list.
124: *
125: * @param name NC name for the new endpoint.
126: * @param binding Binding to which the endpoint refers.
127: * @return The newly created endpoint, appended to this service's
128: * endpoint list.
129: */
130: Endpoint addNewEndpoint(String name, Binding binding);
131:
132: /**
133: * Return this WSDL service as an XML string.
134: *
135: * @return This service, serialized as an XML string.
136: */
137: String toXmlString();
138:
139: /**
140: * Return this service as a DOM document fragment. The DOM subtree is a
141: * copy; altering it will not affect this service.
142: *
143: * @return This service, as a DOM document fragment.
144: */
145: DocumentFragment toXmlDocumentFragment();
146:
147: }
148:
149: // End-of-file: Service.java
|