summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/assembly-xml/src/test/java
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/assembly-xml/src/test/java
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/assembly-xml/src/test/java')
-rw-r--r--java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.java32
1 files changed, 18 insertions, 14 deletions
diff --git a/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.java b/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.java
index d41881dc37..2f13eb8b6d 100644
--- a/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.java
+++ b/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/TestSCABindingImpl.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.assembly.xml;
@@ -36,18 +36,18 @@ import org.apache.tuscany.sca.policy.PolicySubject;
/**
* A test cheel for the SCA binding.
- *
+ *
* @version $Rev$ $Date$
*/
public class TestSCABindingImpl implements SCABinding, OptimizableBinding, PolicySubject {
private String name;
private String uri;
private List<Object> extensions = new ArrayList<Object>();
-
+
private Component targetComponent;
private ComponentService targetComponentService;
private Binding targetBinding;
-
+
private List<Intent> requiredIntents = new ArrayList<Intent>();
private List<PolicySet> policySets = new ArrayList<PolicySet>();
private ExtensionType bindingType = new TestSCABindingType();
@@ -57,7 +57,7 @@ public class TestSCABindingImpl implements SCABinding, OptimizableBinding, Polic
*/
protected TestSCABindingImpl() {
}
-
+
public String getName() {
return name;
}
@@ -77,11 +77,11 @@ public class TestSCABindingImpl implements SCABinding, OptimizableBinding, Polic
public List<Object> getExtensions() {
return extensions;
}
-
+
public boolean isUnresolved() {
return false;
}
-
+
public void setUnresolved(boolean unresolved) {
}
@@ -134,7 +134,7 @@ public class TestSCABindingImpl implements SCABinding, OptimizableBinding, Polic
public void setTargetBinding(Binding targetBinding) {
this.targetBinding = targetBinding;
}
-
+
public List<PolicySet> getPolicySets() {
// TODO Auto-generated method stub
return policySets;
@@ -145,15 +145,19 @@ public class TestSCABindingImpl implements SCABinding, OptimizableBinding, Polic
return requiredIntents;
}
- public ExtensionType getType() {
+ public ExtensionType getExtensionType() {
// TODO Auto-generated method stub
return bindingType;
}
- public void setType(ExtensionType type) {
+ public void setExtensionType(ExtensionType type) {
this.bindingType = type;
}
-
+
+ public QName getType() {
+ return TYPE;
+ }
+
private class TestSCABindingType implements ExtensionType {
private QName name = new QName("http://docs.oasis-open.org/ns/opencsa/sca/200903","binding");
public QName getBaseType() {
@@ -182,5 +186,5 @@ public class TestSCABindingImpl implements SCABinding, OptimizableBinding, Polic
public void setUnresolved(boolean unresolved) {
}
}
-
+
}