summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/binding-ws/src/main
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-06-23 22:48:13 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-06-23 22:48:13 +0000
commit90ba7b1a18706b434520d531358619438a43b4f0 (patch)
tree4c571d7829da8a0df07368ac51292bc07db5526e /java/sca/modules/binding-ws/src/main
parent40ddf83655bc926c1babc72ba36a1c658eadb516 (diff)
Add a QName as the type for binding/implementation and use it to compare model types instead of class
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@787865 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-ws/src/main')
-rw-r--r--java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBinding.java61
-rw-r--r--java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java50
2 files changed, 58 insertions, 53 deletions
diff --git a/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBinding.java b/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBinding.java
index 0d07a55a14..83b66aa5ad 100644
--- a/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBinding.java
+++ b/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/WebServiceBinding.java
@@ -6,15 +6,15 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.tuscany.sca.binding.ws;
@@ -32,13 +32,14 @@ import org.w3c.dom.Element;
/**
* Represents a WebService binding.
- *
+ *
* @version $Rev$ $Date$
*/
public interface WebServiceBinding extends Binding, BindingBuilderExtension {
+ QName TYPE = new QName(SCA11_NS, "binding.ws");
/**
- * Sets the WSDL location.
+ * Sets the WSDL location.
* @param location the WSDL location
*/
void setLocation(String location);
@@ -48,59 +49,59 @@ public interface WebServiceBinding extends Binding, BindingBuilderExtension {
* @return the WSDL location
*/
String getLocation();
-
+
/**
* Returns the name of the WSDL service.
- *
+ *
* @return the name of the WSDL service
*/
QName getServiceName();
/**
* Sets the name of the WSDL service.
- *
+ *
* @param serviceName the name of the WSDL service
*/
void setServiceName(QName serviceName);
/**
* Returns the name of the WSDL port.
- *
+ *
* @return the name of the WSDL port
*/
String getPortName();
/**
* Sets the name of the WSDL port.
- *
+ *
* @param portName the name of the WSDL port
*/
void setPortName(String portName);
/**
* Returns the name of the WSDL binding.
- *
+ *
* @return the name of the WSDL binding
*/
QName getBindingName();
/**
* Sets the name of the WSDL binding.
- *
+ *
* @param bindingName the name of the WSDL binding
*/
void setBindingName(QName bindingName);
/**
* Returns the name of the WSDL endpoint.
- *
+ *
* @return the name of the WSDL endpoint
*/
String getEndpointName();
/**
* Sets the name of the WSDL endpoint.
- *
+ *
* @param endpointName the name of the WSDL endpoint
*/
void setEndpointName(String endpointName);
@@ -110,43 +111,43 @@ public interface WebServiceBinding extends Binding, BindingBuilderExtension {
* @return the WSDL service
*/
Service getService();
-
+
/**
* Sets the WSDL service.
* @param service the WSDL service
*/
void setService(Service service);
-
+
/**
* Returns the WSDL port
* @return the WSDL port
*/
Port getPort();
-
+
/**
* Sets the WSDL endpoint
* @param endpoint the WSDL endpoint
*/
void setEndpoint(Port endpoint);
-
+
/**
* Returns the WSDL endpoint
* @return the WSDL endpoint
*/
Port getEndpoint();
-
+
/**
* Sets the WSDL port
* @param port the WSDL port
*/
void setPort(Port port);
-
+
/**
* Returns the WSDL binding.
* @return the WSDL binding
*/
javax.wsdl.Binding getBinding();
-
+
/**
* Sets the WSDL binding
* @param binding the WSDL binding
@@ -158,7 +159,7 @@ public interface WebServiceBinding extends Binding, BindingBuilderExtension {
* @return the WSDL definition
*/
WSDLDefinition getWSDLDefinition();
-
+
/**
* Sets the WSDL definition.
* @param wsdlDefinition the WSDL definition
@@ -170,33 +171,33 @@ public interface WebServiceBinding extends Binding, BindingBuilderExtension {
* @return the WSDL namespace
*/
String getNamespace();
-
+
/**
* Sets the WSDL namespace
* @param namespace the WSDL namespace
*/
void setNamespace(String namespace);
-
+
/**
* Returns true if the model element is unresolved.
- *
+ *
* @return true if the model element is unresolved.
*/
boolean isUnresolved();
/**
* Sets whether the model element is unresolved.
- *
+ *
* @param unresolved whether the model element is unresolved
*/
void setUnresolved(boolean unresolved);
-
+
InterfaceContract getBindingInterfaceContract();
-
+
void setBindingInterfaceContract(InterfaceContract bindingInterfaceContract);
-
+
Element getEndPointReference();
-
+
void setEndPointReference(Element element);
/**
diff --git a/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java b/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java
index 45a421e5ff..c8c4d5a7bb 100644
--- a/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java
+++ b/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java
@@ -6,15 +6,15 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.tuscany.sca.binding.ws.impl;
@@ -55,7 +55,7 @@ class WebServiceBindingImpl implements WebServiceBinding, PolicySubject, Extensi
private List<Extension> attributeExtensions = new ArrayList<Extension>();
private List<Intent> requiredIntents = new ArrayList<Intent>();
private List<PolicySet> policySets = new ArrayList<PolicySet>();
- private ExtensionType intentAttachPointType;
+ private ExtensionType extensionType;
private String location;
private Binding binding;
private Service service;
@@ -71,17 +71,17 @@ class WebServiceBindingImpl implements WebServiceBinding, PolicySubject, Extensi
private Element endPointReference;
private Definition generatedWSDLDocument;
private BindingBuilder builder;
-
+
protected WebServiceBindingImpl() {
}
-
+
/**
* Provide a meaningful representation of this Binding
*/
public String toString() {
return "Web Service Binding: " + name;
} // end method toString
-
+
public String getName() {
return name;
}
@@ -101,7 +101,7 @@ class WebServiceBindingImpl implements WebServiceBinding, PolicySubject, Extensi
public boolean isUnresolved() {
return unresolved;
}
-
+
public void setUnresolved(boolean unresolved) {
this.unresolved = unresolved;
}
@@ -109,20 +109,20 @@ class WebServiceBindingImpl implements WebServiceBinding, PolicySubject, Extensi
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
- }
-
+ }
+
public List<Object> getExtensions() {
return extensions;
}
-
+
public List<Extension> getAttributeExtensions() {
return attributeExtensions;
- }
-
+ }
+
public String getLocation() {
return location;
}
-
+
public void setLocation(String location) {
this.location = location;
}
@@ -156,7 +156,7 @@ class WebServiceBindingImpl implements WebServiceBinding, PolicySubject, Extensi
return null;
}
}
-
+
public Port getEndpoint() {
return endpoint;
}
@@ -199,7 +199,7 @@ class WebServiceBindingImpl implements WebServiceBinding, PolicySubject, Extensi
}
this.bindingName = bindingName;
}
-
+
public void setEndpoint(Port endpoint) {
this.endpoint = endpoint;
}
@@ -262,21 +262,21 @@ class WebServiceBindingImpl implements WebServiceBinding, PolicySubject, Extensi
public void setBindingInterfaceContract(InterfaceContract bindingInterfaceContract) {
this.bindingInterfaceContract = bindingInterfaceContract;
}
-
+
public List<PolicySet> getPolicySets() {
return policySets;
}
-
+
public List<Intent> getRequiredIntents() {
return requiredIntents;
}
- public ExtensionType getType() {
- return intentAttachPointType;
+ public ExtensionType getExtensionType() {
+ return extensionType;
}
-
- public void setType(ExtensionType intentAttachPointType) {
- this.intentAttachPointType = intentAttachPointType;
+
+ public void setExtensionType(ExtensionType intentAttachPointType) {
+ this.extensionType = intentAttachPointType;
}
public Element getEndPointReference() {
@@ -302,4 +302,8 @@ class WebServiceBindingImpl implements WebServiceBinding, PolicySubject, Extensi
public void setBuilder(BindingBuilder builder) {
this.builder = builder;
}
+
+ public QName getType() {
+ return TYPE;
+ }
}