tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1125270 - in /tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca: Node.java impl/NodeImpl.java
Date Fri, 20 May 2011 08:06:52 GMT
Author: antelder
Date: Fri May 20 08:06:51 2011
New Revision: 1125270

URL: http://svn.apache.org/viewvc?rev=1125270&view=rev
Log:
Move the getInstalledContribution method to the Node interface

Modified:
    tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java
    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/Node.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java?rev=1125270&r1=1125269&r2=1125270&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java
Fri May 20 08:06:51 2011
@@ -31,6 +31,7 @@ import org.apache.tuscany.sca.contributi
 import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
 import org.apache.tuscany.sca.monitor.ValidationException;
 import org.apache.tuscany.sca.runtime.ActivationException;
+import org.apache.tuscany.sca.runtime.InstalledContribution;
 import org.oasisopen.sca.NoSuchServiceException;
 
 /**
@@ -237,6 +238,8 @@ public interface Node {
     String getDomainName();
 
     List<String> getDeployableCompositeURIs(String contributionURI);
+    // TODO: should this be exposed on the interface?
+    public InstalledContribution getInstalledContribution(String contributionURI);
 
     void validateContribution(String string) throws ContributionReadException, ValidationException;
 

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=1125270&r1=1125269&r2=1125270&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
Fri May 20 08:06:51 2011
@@ -106,7 +106,7 @@ public class NodeImpl implements Node {
     }
 
     public String installContribution(String uri, String contributionURL, String metaDataURL,
List<String> dependentContributionURIs) throws ContributionReadException, ValidationException
{
-        InstalledContribution ic = new InstalledContribution(uri, contributionURL);
+        InstalledContribution ic = new InstalledContribution(uri, IOHelper.getLocationAsURL(contributionURL).toString());
 
         if (dependentContributionURIs != null) {
             ic.getDependentContributionURIs().addAll(dependentContributionURIs);
@@ -287,8 +287,7 @@ public class NodeImpl implements Node {
         return ServiceHelper.getService(interfaze, serviceURI, domainRegistry, extensionPointRegistry,
deployer);
     }
 
-    // TODO: should this be exposed on the interface?
-    protected InstalledContribution getInstalledContribution(String contributionURI) {
+    public InstalledContribution getInstalledContribution(String contributionURI) {
         InstalledContribution ic = domainRegistry.getInstalledContribution(contributionURI);
         if (ic == null) {
             throw new IllegalArgumentException("Contribution not installed: " + contributionURI);



Mime
View raw message