tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r983165 - /tuscany/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java
Date Sat, 07 Aug 2010 02:43:54 GMT
Author: antelder
Date: Sat Aug  7 02:43:54 2010
New Revision: 983165

URL: http://svn.apache.org/viewvc?rev=983165&view=rev
Log:
Ensure that the deployables are the correct Composite objects

Modified:
    tuscany/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java

Modified: tuscany/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java?rev=983165&r1=983164&r2=983165&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java
Sat Aug  7 02:43:54 2010
@@ -24,6 +24,7 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.List;
+import java.util.ListIterator;
 
 import org.apache.tuscany.sca.assembly.Composite;
 import org.apache.tuscany.sca.contribution.Artifact;
@@ -191,6 +192,19 @@ public class ContributionContentProcesso
                 contribution.getImports().add(defaultImport);
                 DefaultExport defaultExport = contributionFactory.createDefaultExport();
                 contribution.getExports().add(defaultExport);
+            } else {
+                if (contribution.getDeployables().size() > 0) {
+                    // Update the deployable Composite objects with the correct Composite
object for the artifact
+                    for (Artifact a : contribution.getArtifacts()) {
+                        if (a.getModel() instanceof Composite) {
+                            for (ListIterator<Composite> lit = contribution.getDeployables().listIterator();
lit.hasNext();) {
+                                if (lit.next().getName().equals(((Composite)a.getModel()).getName()))
{
+                                    lit.set((Composite)a.getModel());
+                                }
+                            }
+                        }
+                    }
+                }
             }
         } finally {
             monitor.popContext();



Mime
View raw message