On Thu, May 19, 2011 at 2:02 PM, ant elder <ant.el...@gmail.com> wrote:
> > > On Thu, May 19, 2011 at 1:41 PM, <sl...@apache.org> wrote: > >> Author: slaws >> Date: Thu May 19 12:41:09 2011 >> New Revision: 1124713 >> >> URL: http://svn.apache.org/viewvc?rev=1124713&view=rev >> Log: >> Bit of renaming to be clear this is about looking at the domain rather >> then being the domain. >> >> > >> + // copied from domain node >> >> + public Composite getDomainComposite(String domainName) { >> + FactoryExtensionPoint factories = >> DomainViewRunner.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 = >> DomainViewRunner.domainRegistry.getRunningCompositeURIs(); >> + for (String curi : runningCompositeURIs.keySet()) { >> + for (String compositeURI : runningCompositeURIs.get(curi)) { >> + >> domainIncludes.add(DomainViewRunner.domainRegistry.getRunningComposite(curi, >> compositeURI)); >> + } >> + } >> + return domainComposite; >> + } >> >> > So you don't have to copy it I've just moved this code from NodeImpl to be > in the DomainRegistry. > > Note also that the current code doesn't seem to work perfectly yet as its not including the xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" attribute, I've not debugged it so not sure it thats a problem in the getDomainComposite method or Utils.modelToXML. An example is: <composite autowire="false" name="DomainCompositeTestCase" targetNamespace=" http://tuscany.apache.org/xmlns/sca/1.1"> <include name="ns1:helloworld" xmlns:ns1="http://sample"/> </composite> ...ant