From 90ba7b1a18706b434520d531358619438a43b4f0 Mon Sep 17 00:00:00 2001 From: rfeng Date: Tue, 23 Jun 2009 22:48:13 +0000 Subject: 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 --- .../implementation/bpel/BPELImplementation.java | 40 +++++++++++----------- .../bpel/impl/BPELImplementationImpl.java | 24 +++++++------ 2 files changed, 34 insertions(+), 30 deletions(-) (limited to 'java/sca/modules/implementation-bpel/src') diff --git a/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java b/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java index d54add5391..f8f7ee0ae2 100644 --- a/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java +++ b/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.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.implementation.bpel; @@ -26,57 +26,57 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver; /** * The model representing the BPEL implementation in an SCA assembly model. - * + * * @version $Rev$ $Date$ */ public interface BPELImplementation extends Implementation { - + QName TYPE = new QName(SCA11_NS, "implementation.bpel"); /** * Get the BPEL process Name - * + * * @return */ QName getProcess(); - + /** * Set the BPEL process Name - * + * * @param processName process QName */ void setProcess(QName processName); - + /** * Get the BPEL process definition - * + * * @return */ BPELProcessDefinition getProcessDefinition(); - + /** * Set the BPEL process definition - * + * * @param processDefinition */ void setProcessDefinition(BPELProcessDefinition processDefinition); - - /** + + /** * Returns the componentType for this implementation. - * + * * @return */ - public ComponentType getComponentType(); + public ComponentType getComponentType(); /** * Sets the componentType for this implementation - * + * * @param componentType the component type to set */ - public void setComponentType(ComponentType componentType); + public void setComponentType(ComponentType componentType); /** * Returns the model resolver that can be used to resolve WSDLs and XSDs * referenced by the BPEL process. - * + * * @return */ ModelResolver getModelResolver(); @@ -84,7 +84,7 @@ public interface BPELImplementation extends Implementation { /** * Sets the model resolver that can be used to resolve WSDLs and XSDs referenced * by the BPEL process. - * + * * @param modelResolver */ void setModelResolver(ModelResolver modelResolver); diff --git a/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java b/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java index f1c943e49c..59e29fb579 100644 --- a/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java +++ b/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.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.implementation.bpel.impl; @@ -35,7 +35,7 @@ import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition; /** * The model representing a BPEL implementation in an SCA assembly model. - * + * * @version $Rev$ $Date$ */ class BPELImplementationImpl extends ImplementationImpl implements BPELImplementation { @@ -45,10 +45,14 @@ class BPELImplementationImpl extends ImplementationImpl implements BPELImplement private ComponentType componentType; private ModelResolver modelResolver; + protected BPELImplementationImpl() { + super(TYPE); + } + public QName getProcess() { return processName; } - + public void setProcess(QName processName) { this.processName = processName; } @@ -83,7 +87,7 @@ class BPELImplementationImpl extends ImplementationImpl implements BPELImplement // The BPEL implementation does not support properties return Collections.emptyList(); } - + public ComponentType getComponentType() { return componentType; } @@ -91,15 +95,15 @@ class BPELImplementationImpl extends ImplementationImpl implements BPELImplement public void setComponentType(ComponentType componentType) { this.componentType = componentType; } - + public ModelResolver getModelResolver() { return modelResolver; } - + public void setModelResolver(ModelResolver modelResolver) { this.modelResolver = modelResolver; } - + @Override public List getServices() { return componentType.getServices(); @@ -109,7 +113,7 @@ class BPELImplementationImpl extends ImplementationImpl implements BPELImplement public List getReferences() { return componentType.getReferences(); } - + @Override public int hashCode() { return String.valueOf(this.getProcess()).hashCode(); -- cgit v1.2.3