summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core/src
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-11 09:11:40 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-11 09:11:40 +0000
commitc983386e8d1e329f8189edaa7a2435f88408cd9a (patch)
tree6efd7d14a027d1a925a74dfd17fc06947add39fd /sca-java-2.x/trunk/modules/core/src
parente4cee24b41a6ddbb8981c638fb444319e9401f11 (diff)
Update the registry to store info about a contributions deployables and exports so that distrubuted nodes are able to see what is available without having to actually go get and install a remote contribution. This is work in progress, an alternative is to just put the Contribution model object itself in the registry and have the registry impl hide the details, but this approach is easier for now as we see how things can work
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1101793 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core/src')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java
index 61514df01f..5ac0a6bc19 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java
@@ -33,6 +33,7 @@ import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.Binding;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.contribution.Export;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.LifeCycleListener;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
@@ -50,6 +51,8 @@ public class EndpointRegistryImpl extends BaseEndpointRegistry implements Endpoi
private List<Endpoint> endpoints = new ArrayList<Endpoint>();
private Map<QName, Composite> runningComposites = new HashMap<QName, Composite>();
private Map<String, String> installedContributions = new HashMap<String, String>();
+ private Map<String, List<QName>> installedContributionsDeployables = new HashMap<String, List<QName>>();
+ private Map<String, List<Export>> installedContributionsExports = new HashMap<String, List<Export>>();
protected boolean quietLogging;
@@ -182,8 +185,10 @@ public class EndpointRegistryImpl extends BaseEndpointRegistry implements Endpoi
return compositeNames;
}
- public void installContribution(String uri, String url) {
+ public void installContribution(String uri, String url, List<QName> deployables, List<Export> exports) {
installedContributions.put(uri, url);
+ installedContributionsDeployables.put(uri, deployables);
+ installedContributionsExports.put(uri, exports);
}
public List<String> getInstalledContributionURIs() {
@@ -194,8 +199,17 @@ public class EndpointRegistryImpl extends BaseEndpointRegistry implements Endpoi
return installedContributions.get(uri);
}
+ public List<QName> getInstalledContributionDeployables(String uri) {
+ return installedContributionsDeployables.get(uri);
+ }
+
+ public List<Export> getInstalledContributionExports(String uri) {
+ return installedContributionsExports.get(uri);
+ }
+
public void uninstallContribution(String uri) {
installedContributions.remove(uri);
+ installedContributionsDeployables.remove(uri);
+ installedContributionsExports.remove(uri);
}
-
}