Examples of DefaultContributionFactory


Examples of org.apache.tuscany.sca.contribution.DefaultContributionFactory

        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors);
       
        // Create Stax processors
        DefaultStAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(new DefaultModelFactoryExtensionPoint());
        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance());
        staxProcessors.addArtifactProcessor(new CompositeProcessor(new DefaultContributionFactory(), factory, policyFactory, staxProcessor));
        staxProcessors.addArtifactProcessor(new ComponentTypeProcessor(factory, policyFactory, staxProcessor));
        staxProcessors.addArtifactProcessor(new ConstrainingTypeProcessor(factory, policyFactory, staxProcessor));
       
        inputFactory = XMLInputFactory.newInstance();
        documentProcessors.addArtifactProcessor(new CompositeDocumentProcessor(staxProcessor, inputFactory, null));
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.DefaultContributionFactory

    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));
        contribution = processor.read(reader);
        assertNotNull(contribution);
        assertEquals(2, contribution.getDeployables().size());
  }
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.DefaultContributionFactory

  }

    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));
        try {
            processor.read(reader);
            fail("InvalidException should have been thrown");
        } catch (ContributionReadException e) {
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.DefaultContributionFactory

    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));
        contribution = processor.read(reader);

        validateContribution(contribution);
       
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.DefaultContributionFactory

    @Override
    public void tearDown() throws Exception {
    }

    public void testReadComposite() throws Exception {
        CompositeProcessor compositeProcessor = new CompositeProcessor(new DefaultContributionFactory(), assemblyFactory, policyFactory, staxProcessor);
        InputStream is = getClass().getResourceAsStream("TestEJB.composite");
        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
        Composite composite = compositeProcessor.read(reader);
        assertNotNull(composite);
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.DefaultContributionFactory

        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance());
       
        EJBImplementationFactory nodeFactory = new EJBImplementationFactoryImpl();
        factories.addFactory(nodeFactory);
       
        staxProcessors.addArtifactProcessor(new CompositeProcessor(new DefaultContributionFactory(), factory, policyFactory, staxProcessor));
        staxProcessors.addArtifactProcessor(new ComponentTypeProcessor(factory, policyFactory, staxProcessor));
        staxProcessors.addArtifactProcessor(new ConstrainingTypeProcessor(factory, policyFactory, staxProcessor));

        EJBImplementationProcessor ejbProcessor = new EJBImplementationProcessor(factories);
        staxProcessors.addArtifactProcessor(ejbProcessor);
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.DefaultContributionFactory

        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance());
       
        NodeImplementationFactory nodeFactory = new NodeImplementationFactoryImpl();
        factories.addFactory(nodeFactory);
       
        staxProcessors.addArtifactProcessor(new CompositeProcessor(new DefaultContributionFactory(), factory, policyFactory, staxProcessor));
        staxProcessors.addArtifactProcessor(new ComponentTypeProcessor(factory, policyFactory, staxProcessor));
        staxProcessors.addArtifactProcessor(new ConstrainingTypeProcessor(factory, policyFactory, staxProcessor));

        NodeImplementationProcessor nodeProcessor = new NodeImplementationProcessor(factories);
        staxProcessors.addArtifactProcessor(nodeProcessor);
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.DefaultContributionFactory

        policyFactory = new DefaultPolicyFactory();
        mapper = new InterfaceContractMapperImpl();
        compositeUtil = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, new DefaultIntentAttachPointTypeFactory(), mapper, null);
        staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(new DefaultModelFactoryExtensionPoint());
        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance());
        staxProcessors.addArtifactProcessor(new CompositeProcessor(new DefaultContributionFactory(), assemblyFactory, policyFactory, staxProcessor));
        staxProcessors.addArtifactProcessor(new ComponentTypeProcessor(assemblyFactory, policyFactory, staxProcessor));
        staxProcessors.addArtifactProcessor(new ConstrainingTypeProcessor(assemblyFactory, policyFactory, staxProcessor));
        staxProcessors.addArtifactProcessor(new WSPolicyProcessor());
        resolver = new TestModelResolver();
        scaDefnDocProcessor = new SCADefinitionsDocumentProcessor(staxProcessors, staxProcessor, XMLInputFactory.newInstance(), policyFactory);
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.DefaultContributionFactory

        intentAttachPointTypeFactory = new DefaultIntentAttachPointTypeFactory();
       
        JavaImplementationFactory javaImplementationFactory = new DefaultJavaImplementationFactory();
        modelFactories.addFactory(javaImplementationFactory);
       
        CompositeProcessor compositeProcessor = new CompositeProcessor(new DefaultContributionFactory(), assemblyFactory, policyFactory, staxProcessor);
        staxProcessors.addArtifactProcessor(compositeProcessor);

        JavaImplementationProcessor javaProcessor = new JavaImplementationProcessor(modelFactories);
        staxProcessors.addArtifactProcessor(javaProcessor)
       
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.DefaultContributionFactory

        assemblyFactory = null;
        mapper = null;
    }

    public void testReadComposite() throws Exception {
        CompositeProcessor compositeProcessor = new CompositeProcessor(new DefaultContributionFactory(), assemblyFactory, policyFactory, staxProcessor);
        InputStream is = getClass().getResourceAsStream("Calculator.composite");
        XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
        Composite composite = compositeProcessor.read(reader);
        assertNotNull(composite);
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.