diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-05-19 12:59:50 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-05-19 12:59:50 +0000 |
commit | d3c3c29329142b6f05b22c141ae616bb42c773ed (patch) | |
tree | 07b62089e3b14b6140442a6658065c52acf4767e /sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca | |
parent | f20ddb18c5425b2dae9abc90a8a1c0f3f1d7b71a (diff) |
Move the code for getDomainComposite from NodeImpl to the domain registry
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1124724 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java | 20 |
1 files changed, 5 insertions, 15 deletions
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 7cfe60a543..2682ec493b 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 @@ -265,20 +265,7 @@ public class NodeImpl implements Node { } public Composite getDomainComposite() { - FactoryExtensionPoint factories = extensionPointRegistry.getExtensionPoint(FactoryExtensionPoint.class); - AssemblyFactory assemblyFactory = factories.getFactory(AssemblyFactory.class); - Composite domainComposite = assemblyFactory.createComposite(); - domainComposite.setName(new QName(Base.SCA11_TUSCANY_NS, domainName)); - domainComposite.setAutowire(false); - domainComposite.setLocal(false); - List<Composite> domainIncludes = domainComposite.getIncludes(); - Map<String, List<String>> runningCompositeURIs = domainRegistry.getRunningCompositeURIs(); - for (String curi : runningCompositeURIs.keySet()) { - for (String compositeURI : runningCompositeURIs.get(curi)) { - domainIncludes.add(domainRegistry.getRunningComposite(curi, compositeURI)); - } - } - return domainComposite; + return domainRegistry.getDomainComposite(); } public <T> T getService(Class<T> interfaze, String serviceURI) throws NoSuchServiceException { @@ -374,10 +361,13 @@ public class NodeImpl implements Node { return dcURIs; } - // TODO: this is used by the shell to endpoint detail, should it be on the Node interface? + // TODO: these are used by the shell, should they be on the Node interface? public DomainRegistry getEndpointRegistry() { return domainRegistry; } + public ExtensionPointRegistry getExtensionPointRegistry() { + return extensionPointRegistry; + } public void stop() { for (DeployedComposite dc : startedComposites.values()) { |