Examples of AssemblyFactory


Examples of org.apache.tuscany.sca.assembly.AssemblyFactory

                    }
                }
            }
           
            // Create an in-memory domain level management composite
            AssemblyFactory assemblyFactory = domainManagementRuntime.getAssemblyFactory();
            domainManagementComposite = assemblyFactory.createComposite();
            domainManagementComposite.setName(new QName(Constants.SCA10_NS, "domainManagement"));
            domainManagementComposite.setURI(domainModel.getDomainURI() + "/management");  
           
            // Create an in-memory domain level composite
            domainComposite = assemblyFactory.createComposite();
            domainComposite.setName(new QName(Constants.SCA10_NS, "domain"));
            domainComposite.setURI(domainModel.getDomainURI() + "/domain")
           
            domainModel.setDomainLeveComposite(domainComposite);
           
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.AssemblyFactory

   
    protected <B> ServiceReference<B> createServiceReference(Class<B> businessInterface, String targetURI, ReallySmallRuntime runtime, Composite domainComposite) {
        try {
         
            AssemblyFactory assemblyFactory = runtime.getAssemblyFactory();
            Composite composite = assemblyFactory.createComposite();
            composite.setName(new QName(Constants.SCA10_TUSCANY_NS, "default"));
            RuntimeComponent component = (RuntimeComponent)assemblyFactory.createComponent();
            component.setName("default");
            component.setURI("default");
            runtime.getCompositeActivator().configureComponentContext(component);
            composite.getComponents().add(component);
            RuntimeComponentReference reference = (RuntimeComponentReference)assemblyFactory.createComponentReference();
            reference.setName("default");
            ModelFactoryExtensionPoint factories =
                runtime.getExtensionPointRegistry().getExtensionPoint(ModelFactoryExtensionPoint.class);
            JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class);
            InterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract();
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.AssemblyFactory

    }

    public void testRead() throws Exception {
        XMLStreamReader reader = xmlInputFactory.createXMLStreamReader(new StringReader(VALID_XML));

        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
        ContributionFactory contributionFactory = new DefaultContributionFactory();
        ContributionMetadataProcessor processor =
            new ContributionMetadataProcessor(assemblyFactory, contributionFactory, null);
        Contribution contribution = contributionFactory.createContribution();
        contribution.setModelResolver(new TestModelResolver(contribution, null));
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.AssemblyFactory

        assertEquals(2, contribution.getDeployables().size());
  }

    public void testReadInvalid() throws Exception {
        XMLStreamReader reader = xmlInputFactory.createXMLStreamReader(new StringReader(INVALID_XML));
        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
        ContributionFactory contributionFactory = new DefaultContributionFactory();
        ContributionMetadataProcessor processor =
            new ContributionMetadataProcessor(assemblyFactory, contributionFactory, null);
        Contribution contribution = contributionFactory.createContribution();
        contribution.setModelResolver(new TestModelResolver(contribution, null));
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.AssemblyFactory

    public void start(ExtensionPointRegistry registry) {

        // Create the test  implementation factory
        ModelFactoryExtensionPoint factories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
        AssemblyFactory assemblyFactory = factories.getFactory(AssemblyFactory.class);
        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory();
        TestImplementationFactory testFactory = new DefaultTestImplementationFactory(assemblyFactory, javaFactory);
        factories.addFactory(testFactory);

        // Add the test implementation extension to the StAXArtifactProcessor
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.AssemblyFactory

    public void testWrite() throws Exception {
        XMLStreamReader reader = xmlInputFactory.createXMLStreamReader(new StringReader(VALID_XML));

        //read the original contribution metadata file
        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
        ContributionFactory contributionFactory = new DefaultContributionFactory();
        ContributionMetadataProcessor processor =
            new ContributionMetadataProcessor(assemblyFactory, contributionFactory, null);
        Contribution contribution = contributionFactory.createContribution();
        contribution.setModelResolver(new TestModelResolver(contribution, null));
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.AssemblyFactory

    private XMLInputFactory inputFactory;
    private ExtensibleStAXArtifactProcessor staxProcessor;

    @Override
    public void setUp() throws Exception {
        AssemblyFactory factory = new DefaultAssemblyFactory();
        PolicyFactory policyFactory = new DefaultPolicyFactory();
       
        URLArtifactProcessorExtensionPoint documentProcessors = new DefaultURLArtifactProcessorExtensionPoint(new DefaultModelFactoryExtensionPoint());
        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors);
       
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.AssemblyFactory

                ModelFactoryExtensionPoint factories = domainManagementRuntime.getExtensionPointRegistry().getExtensionPoint(ModelFactoryExtensionPoint.class);
                nodeFactory = new NodeFactoryImpl(node);
                factories.addFactory(nodeFactory);               

                // Create an in-memory domain level management composite
                AssemblyFactory assemblyFactory = domainManagementRuntime.getAssemblyFactory();
                domainManagementComposite = assemblyFactory.createComposite();
                domainManagementComposite.setName(new QName(Constants.SCA10_NS, "domainManagement"));
                domainManagementComposite.setURI(domainModel.getDomainURI() + "/Management");
               
               
            } else {
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.AssemblyFactory

    SCADefinitionsDocumentProcessor scaDefnDocProcessor;

    @Override
    public void setUp() throws Exception {
        List scaDefnSink = new ArrayList();
        AssemblyFactory factory = new DefaultAssemblyFactory();
        PolicyFactory policyFactory = new DefaultPolicyFactory();
        resolver = new TestModelResolver();
       
        URLArtifactProcessorExtensionPoint documentProcessors = new DefaultURLArtifactProcessorExtensionPoint(new DefaultModelFactoryExtensionPoint());
        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors);
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.AssemblyFactory

    private Composite composite;

    @Override
    public void setUp() throws Exception {
        List scaDefnSink = new ArrayList();
        AssemblyFactory factory = new DefaultAssemblyFactory();
        PolicyFactory policyFactory = new DefaultPolicyFactory();
        resolver = new TestModelResolver();
        compositeBuilder = new CompositeBuilderImpl(factory, new TestSCABindingFactoryImpl(), new DefaultIntentAttachPointTypeFactory(), new InterfaceContractMapperImpl(), null);
        URLArtifactProcessorExtensionPoint documentProcessors = new DefaultURLArtifactProcessorExtensionPoint(new DefaultModelFactoryExtensionPoint());
        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.