tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1132612 - /tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
Date Mon, 06 Jun 2011 12:37:04 GMT
Author: antelder
Date: Mon Jun  6 12:37:04 2011
New Revision: 1132612

URL: http://svn.apache.org/viewvc?rev=1132612&view=rev
Log:
Add a method to the DomainRegistry to get the contribution uri for the composite taht contains
a running component

Modified:
    tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java

Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java?rev=1132612&r1=1132611&r2=1132612&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
Mon Jun  6 12:37:04 2011
@@ -37,10 +37,10 @@ import org.apache.tuscany.sca.core.Exten
 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 
         // 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;
+    }
 }



Mime
View raw message