tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1103283 - /tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
Date Sun, 15 May 2011 06:58:46 GMT
Author: antelder
Date: Sun May 15 06:58:46 2011
New Revision: 1103283

URL: http://svn.apache.org/viewvc?rev=1103283&view=rev
Log:
Update to match the Contribution and InstalledContribution interface changes

Modified:
    tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java

Modified: tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java?rev=1103283&r1=1103282&r2=1103283&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
Sun May 15 06:58:46 2011
@@ -101,23 +101,18 @@ public class NodeImpl implements Node {
     }
 
     public String installContribution(String uri, String contributionURL, String metaDataURL,
List<String> dependentContributionURIs, boolean startDeployables) throws ContributionReadException,
ActivationException, ValidationException {
-        if (uri == null) {
-            uri = getDefaultContributionURI(contributionURL);
-        }
         // TODO: sort out deployables and exports
-        org.apache.tuscany.sca.runtime.InstalledContribution ic = new org.apache.tuscany.sca.runtime.InstalledContribution();
-        ic.setURI(uri);
-        ic.setURL(contributionURL);
+        org.apache.tuscany.sca.runtime.InstalledContribution ic = new org.apache.tuscany.sca.runtime.InstalledContribution(uri,
contributionURL);
         peekIntoContribution(ic);
         endpointRegistry.installContribution(ic);
         if (startDeployables) {
             for (String compositeURI : ic.getDeployables()) {
-                start(uri, compositeURI);
+                start(ic.getURI(), compositeURI);
             }
             // TODO: sort out metadata and dependents in distributed
-            localInstall(uri, contributionURL, metaDataURL, dependentContributionURIs, startDeployables);
+            localInstall(ic.getURI(), contributionURL, metaDataURL, dependentContributionURIs,
startDeployables);
         }
-        return uri;
+        return ic.getURI();
     }
 
     /**
@@ -161,9 +156,7 @@ public class NodeImpl implements Node {
             throw new ValidationException(e);
         }
         monitor.analyzeProblems();
-        contribution.getDeployables().addAll(metaData.getDeployables());
-        contribution.getImports().addAll(metaData.getImports());
-        contribution.getExports().addAll(metaData.getExports());
+        contribution.mergeMetaData(metaData);
     }
     
     public String installContribution(Contribution contribution, List<String> dependentContributionURIs,
boolean startDeployables) throws ContributionReadException, ActivationException, ValidationException
{



Mime
View raw message