summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-03-10 12:51:39 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-03-10 12:51:39 +0000
commit8120d943322aa1094e88a0820e91e050a5e5a856 (patch)
treea0127ada7732fb8af8a386d3737844f7a92def76 /java/sca
parent4002ae4c824434345485f9f2825e4b5fcce730e2 (diff)
Add spec version number to composite model
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@752096 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/modules/assembly-xml-osoa/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java1
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java1
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Composite.java14
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java9
4 files changed, 25 insertions, 0 deletions
diff --git a/java/sca/modules/assembly-xml-osoa/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java b/java/sca/modules/assembly-xml-osoa/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
index 6feadbd751..6b79c77428 100644
--- a/java/sca/modules/assembly-xml-osoa/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
+++ b/java/sca/modules/assembly-xml-osoa/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
@@ -182,6 +182,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
// Read a <composite>
composite = assemblyFactory.createComposite();
+ composite.setSpecVersion(Constants.SCA10_NS);
composite.setName(new QName(getString(reader, TARGET_NAMESPACE), getString(reader, NAME)));
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
index ececdee2a6..0a7df27b1f 100644
--- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
@@ -184,6 +184,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
// Read a <composite>
composite = assemblyFactory.createComposite();
+ composite.setSpecVersion(Constants.SCA11_NS);
composite.setName(new QName(getString(reader, TARGET_NAMESPACE), getString(reader, NAME)));
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Composite.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Composite.java
index fe5cbc9484..12542297b3 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Composite.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Composite.java
@@ -33,6 +33,20 @@ import org.apache.tuscany.sca.policy.PolicySubject;
public interface Composite extends Implementation, Extensible, Cloneable, PolicySubject {
/**
+ * Returns the spec version of the composite used to build this model
+ *
+ * @return the spec version used to build this model
+ */
+ String getSpecVersion();
+
+ /**
+ * Sets the spec version of the composite used to build this model
+ *
+ * @param specVersion the spec version used to build this model
+ */
+ void setSpecVersion(String specVersion);
+
+ /**
* Returns the name of the composite.
*
* @return the name of the composite
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java
index 9dd26b5e8e..4e14cf0e53 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java
@@ -39,6 +39,7 @@ import org.apache.tuscany.sca.assembly.Wire;
* @version $Rev$ $Date$
*/
public class CompositeImpl extends ImplementationImpl implements Composite, Cloneable {
+ private String specVersion = "undefined";
private List<Component> components = new ArrayList<Component>();
private List<Composite> includes = new ArrayList<Composite>();
private QName name;
@@ -85,6 +86,14 @@ public class CompositeImpl extends ImplementationImpl implements Composite, Clon
}
return clone;
}
+
+ public String getSpecVersion() {
+ return specVersion;
+ }
+
+ public void setSpecVersion(String specVersion) {
+ this.specVersion = specVersion;
+ }
public List<Component> getComponents() {
return components;