tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1126327 - /tuscany/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
Date Mon, 23 May 2011 06:28:01 GMT
Author: antelder
Date: Mon May 23 06:28:01 2011
New Revision: 1126327

URL: http://svn.apache.org/viewvc?rev=1126327&view=rev
Log:
Set the Composites contribution URI when its being read

Modified:
    tuscany/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java

Modified: tuscany/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java?rev=1126327&r1=1126326&r2=1126327&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
Mon May 23 06:28:01 2011
@@ -66,12 +66,10 @@ import java.util.List;
 import java.util.StringTokenizer;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.dom.DOMSource;
 import javax.xml.xpath.XPathExpressionException;
 
 import org.apache.tuscany.sca.assembly.Binding;
@@ -186,6 +184,7 @@ public class CompositeProcessor extends 
         Callback callback = null;
         QName name = null;
         Monitor monitor = context.getMonitor();
+        Contribution contribution = context.getContribution();
         try {
             // Read the composite document
             while (reader.hasNext()) {
@@ -199,6 +198,9 @@ public class CompositeProcessor extends 
                             // Read a <composite>
                             composite = assemblyFactory.createComposite();
                             composite.setSpecVersion(Constants.SCA11_NS);
+                            if (contribution != null) {
+                                composite.setContributionURI(contribution.getURI());
+                            }
 
                             composite.setName(new QName(getURIString(reader, TARGET_NAMESPACE),
getString(reader, NAME)));
 



Mime
View raw message