001: /**
002: * $Id: BindingOperationDescriptorImpl.java,v 1.6 2003/06/03 10:49:23 sy131129 Exp $
003: * Copyright 2002-2003 Sun Microsystems, Inc. All
004: * rights reserved. Use of this product is subject
005: * to license terms. Federal Acquisitions:
006: * Commercial Software -- Government Users
007: * Subject to Standard License Terms and
008: * Conditions.
009: *
010: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
011: * are trademarks or registered trademarks of Sun Microsystems,
012: * Inc. in the United States and other countries.
013: */package com.sun.portal.providers.simplewebservice.wsdl.impl;
014:
015: import java.util.List;
016: import java.util.Map;
017:
018: import com.sun.portal.providers.simplewebservice.wsdl.OperationDescriptor;
019: import com.sun.portal.providers.simplewebservice.wsdl.BindingOperationDescriptor;
020: import com.sun.portal.providers.simplewebservice.wsdl.BindingOperationInputDescriptor;
021: import com.sun.portal.providers.simplewebservice.wsdl.BindingOperationOutputDescriptor;
022:
023: /**
024: * This class represents a WSDL operation BindingDescriptor.
025: * That is, it holds the information that would be
026: * specified in the operation element contained within
027: * a BindingDescriptor element.
028: *
029: */
030: public class BindingOperationDescriptorImpl implements
031: BindingOperationDescriptor {
032:
033: private String name = null;
034: private String soapAction = null;
035: private OperationDescriptor operationDescriptor = null;
036: private BindingOperationInputDescriptor bindingOperationInputDescriptor;
037: private BindingOperationOutputDescriptor bindingOperationOutputDescriptor;
038:
039: /**
040: * Default constructor.
041: *
042: * @param name the name of the BindingOperationInputDescriptor.
043: * @param soapAction the soapAction (if one exists) associated with this BindingOperation.
044: * @param bindingOperationInputDescriptor the InputDescriptor associated with this BindingOperationDescriptor.
045: * @param bindingOperationOutputDescriptor the OutputDescriptor associated with this BindingOperationDescriptor.
046: */
047: public BindingOperationDescriptorImpl(
048: String name,
049: String soapAction,
050: BindingOperationInputDescriptor bindingOperationInputDescriptor,
051: BindingOperationOutputDescriptor bindingOperationOutputDescriptor) {
052: this .name = name;
053: this .soapAction = soapAction;
054: this .bindingOperationInputDescriptor = bindingOperationInputDescriptor;
055: this .bindingOperationOutputDescriptor = bindingOperationOutputDescriptor;
056: }
057:
058: /**
059: * Get the name of this BindingOperationDescriptor.
060: *
061: * @return the BindingOperationDescriptor name.
062: */
063: public String getName() {
064: return name;
065: }
066:
067: /**
068: * Get the soapAction for this BindingOperationDescriptor.
069: *
070: * @return the soapAction.
071: */
072: public String getSOAPAction() {
073: return soapAction;
074: }
075:
076: /**
077: * Get the OperationDescriptor that this BindingOperationDescriptor binds.
078: *
079: * @return the OperationDescriptor that this operation binding binds
080: */
081: public OperationDescriptor getOperationDescriptor() {
082: return operationDescriptor;
083: }
084:
085: /**
086: * Get the BindingOperationInputDescriptor for this BindingOperationDescriptor.
087: *
088: * @return the BindingOperationInputDescriptor.
089: */
090: public BindingOperationInputDescriptor getBindingOperationInputDescriptor() {
091: return bindingOperationInputDescriptor;
092: }
093:
094: /**
095: * Get the BindingOperationOutputDescriptor for this BindingOperationDescriptor.
096: *
097: * @return the BindingOperationOutputDescriptor.
098: */
099: public BindingOperationOutputDescriptor getBindingOperationOutputDescriptor() {
100: return bindingOperationOutputDescriptor;
101: }
102:
103: /**
104: * Get the String representation of this BindingOperationDescriptorImpl.
105: *
106: * @return the String representation of this BindingOperationDescriptorImpl.
107: */
108: public String toString() {
109: StringBuffer strBuf = new StringBuffer();
110:
111: strBuf.append("\nBindingOperationDescriptor: name=" + name);
112:
113: if (soapAction != null) {
114: strBuf.append("\nsoapAction =" + soapAction);
115: }
116:
117: if (bindingOperationInputDescriptor != null) {
118: strBuf.append("\n" + bindingOperationInputDescriptor);
119: }
120:
121: if (bindingOperationOutputDescriptor != null) {
122: strBuf.append("\n" + bindingOperationOutputDescriptor);
123: }
124:
125: return strBuf.toString();
126: }
127: }
|