summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core/src
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-06-06 12:37:04 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-06-06 12:37:04 +0000
commit65d3b78452b39db0995d764db3dfef7b155fffa5 (patch)
tree943aefb48e73eb77279324e91fa6f8abe797184c /sca-java-2.x/trunk/modules/core/src
parent388acc32fce4bcfff3c1a5a3519dee1c4e5a7066 (diff)
Add a method to the DomainRegistry to get the contribution uri for the composite taht contains a running component
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1132612 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/DomainRegistryImpl.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
index 6344e5e906..b4f2b99f98 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
@@ -37,10 +37,10 @@ import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.LifeCycleListener;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.runtime.BaseDomainRegistry;
+import org.apache.tuscany.sca.runtime.ContributionDescription;
import org.apache.tuscany.sca.runtime.ContributionListener;
import org.apache.tuscany.sca.runtime.DomainRegistry;
import org.apache.tuscany.sca.runtime.EndpointListener;
-import org.apache.tuscany.sca.runtime.ContributionDescription;
import org.apache.tuscany.sca.runtime.RuntimeProperties;
/**
@@ -253,4 +253,16 @@ public class DomainRegistryImpl extends BaseDomainRegistry implements DomainRegi
// TODO or should it just ensure the member name is LocalOnly and the run the command locally?
throw new IllegalStateException("not supportted for " + LOCAL_MEMBER_NAME);
}
+
+ @Override
+ public String getContainingCompositesContributionURI(String componentName) {
+ for (Map<String, Composite> cs : runningComposites.values()) {
+ for (Composite c : cs.values()) {
+ if (c.getComponent(componentName) != null) {
+ return c.getContributionURI();
+ }
+ }
+ }
+ return null;
+ }
}