Package org.apache.tuscany.sca.assembly.builder.impl

Examples of org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl


        InputStream is = getClass().getResourceAsStream("/Calculator.composite");
        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
        Composite composite = compositeProcessor.read(reader);
        assertNotNull(composite);

        CompositeBuilderImpl compositeUtil = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, new DefaultIntentAttachPointTypeFactory(), mapper, null);
        compositeUtil.build(composite);
       
        SCABinding referenceSCABinding = (SCABinding) composite.getComponents().get(0).getReferences().get(0).getBindings().get(0);
        SCABinding serviceSCABinding   = (SCABinding) composite.getComponents().get(1).getServices().get(0).getBindings().get(0);
       
        Assert.assertNotNull(referenceSCABinding);
View Full Code Here


    public static CompositeBuilder createCompositeBuilder(AssemblyFactory assemblyFactory,
                                                          SCABindingFactory scaBindingFactory,
                                                          IntentAttachPointTypeFactory intentAttachPointTypeFactory,
                                                          InterfaceContractMapper interfaceContractMapper) {
        return new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, intentAttachPointTypeFactory, interfaceContractMapper, null);
    }
View Full Code Here

        InputStream is = getClass().getResourceAsStream("Calculator.composite");
        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
        Composite composite = compositeProcessor.read(reader);
        assertNotNull(composite);

        CompositeBuilderImpl compositeUtil = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, new DefaultIntentAttachPointTypeFactory(), mapper, null);
        compositeUtil.build(composite);

        //new PrintUtil(System.out).print(composite);
    }
View Full Code Here

        InputStream is = getClass().getResourceAsStream("Calculator.composite");
        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
        Composite composite = compositeProcessor.read(reader);
        assertNotNull(composite);

        CompositeBuilderImpl compositeUtil = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, new DefaultIntentAttachPointTypeFactory(), mapper, null);
        compositeUtil.build(composite);

    }
View Full Code Here

            try {
                composite.getComponents().remove(toRemove);
                CompositeActivatorImpl impl = (CompositeActivatorImpl) compositeActivator;
                impl.stop(toRemove);
                impl.deactivateComponent(toRemove);
                CompositeBuilderImpl builder = (CompositeBuilderImpl) compositeBuilder;
                builder.detach(composite, toRemove);
            } catch (Exception e) {
                throw new CompositeUpdaterException(
                        "Cannot remove composite from the contribution"
                                + contribURI);
            }
View Full Code Here

        InputStream is = getClass().getResourceAsStream("Calculator.composite");
        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
        Composite composite = compositeProcessor.read(reader);
        assertNotNull(composite);

        CompositeBuilderImpl compositeUtil = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, new DefaultIntentAttachPointTypeFactory(), mapper, null);
        compositeUtil.build(composite);

        //new PrintUtil(System.out).print(composite);
    }
View Full Code Here

        InputStream is = getClass().getResourceAsStream("PoliciedCalculator.composite");
        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
        Composite composite = compositeProcessor.read(reader);
        assertNotNull(composite);

        CompositeBuilderImpl compositeUtil = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, new DefaultIntentAttachPointTypeFactory(), mapper, null);
        compositeUtil.build(composite);

        assertEquals(((OperationsConfigurator)composite.getServices().get(0).getBindings().get(0))
            .getConfiguredOperations().get(0).getRequiredIntents().size(), 2);
        //new PrintUtil(System.out).print(composite);
    }
View Full Code Here

    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);
       
        // Create Stax processors
        DefaultStAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(new DefaultModelFactoryExtensionPoint());
View Full Code Here

        assertNotNull(scaDefns);
       
        scaDefnDocProcessor.resolve(scaDefns, resolver);
       
        compositeReader.resolve(composite, resolver);
        CompositeBuilderImpl compositeUtil = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, new DefaultIntentAttachPointTypeFactory(), mapper, null);
        compositeUtil.build(composite);
       
        assertEquals(composite.getConstrainingType(), constrainingType);
        assertEquals(composite.getComponents().get(0).getConstrainingType(), constrainingType);
    }
View Full Code Here

        assertNotNull(scaDefns);
       
        scaDefnDocProcessor.resolve(scaDefns, resolver);
       
        compositeReader.resolve(composite, resolver);
        CompositeBuilderImpl compositeUtil = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, new DefaultIntentAttachPointTypeFactory(), mapper, null);
        compositeUtil.build(composite);
       
        assertEquals(composite.getComponents().get(2).getImplementation(), nestedComposite);
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl

Copyright © 2018 www.massapicom. 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.