summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java3
-rw-r--r--sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java5
2 files changed, 5 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java
index 9a1a8fe971..3a659f4f5a 100644
--- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java
+++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java
@@ -31,6 +31,7 @@ import org.apache.tuscany.sca.contribution.Contribution;
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;
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
index dcf243eab9..67fffd5698 100644
--- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
+++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
@@ -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);