summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-20 08:06:51 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-20 08:06:51 +0000
commitc2ae99f1e72da5a4dcfa2e2f812b6e06064b564d (patch)
treed3802aa3485950965164dfcd466ec161af0f2181 /sca-java-2.x/trunk
parent6488c22f990bed4927c1ec089fffeb256da15b3a (diff)
Move the getInstalledContribution method to the Node interface
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1125270 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk')
-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);