Package org.apache.tuscany.sca.contribution

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


    @Override
    public void setUp() throws Exception {
        AssemblyFactory factory = new DefaultAssemblyFactory();
        PolicyFactory policyFactory = new DefaultPolicyFactory();
        InterfaceContractMapper mapper = new InterfaceContractMapperImpl();
        ContributionFactory  contributionFactory = new ContributionFactoryImpl();
       
        StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(new DefaultModelFactoryExtensionPoint());
        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance());
       
        staxProcessors.addArtifactProcessor(new CompositeProcessor(contributionFactory, factory, policyFactory, mapper, staxProcessor));
View Full Code Here


        factories.addFactory(assemblyFactory);
        PolicyFactory policyFactory = new DefaultPolicyFactory();
        factories.addFactory(policyFactory);
        SCABindingFactory scaBindingFactory = factories.getFactory(SCABindingFactory.class);
        factories.addFactory(scaBindingFactory);
        ContributionFactory contributionFactory = factories.getFactory(ContributionFactory.class);
       
        SCADefinitionsDocumentProcessor scaDocDefnProcessor =
            ReallySmallRuntimeBuilder.createSCADefinitionsDocProcessor(registry, policyFactory);
       
        // Create a contribution service
View Full Code Here

        ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
        FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
        wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
        xsdFactory = modelFactories.getFactory(XSDFactory.class);
       
        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
        Contribution contribution = contributionFactory.createContribution();
        ModelResolverExtensionPoint modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
        resolver = new ExtensibleModelResolver(contribution, modelResolvers, modelFactories);
        contribution.setModelResolver(resolver);
       
        URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
View Full Code Here

        startModules(registry, modules);
       
        SCABindingFactory scaBindingFactory = factories.getFactory(SCABindingFactory.class);
        IntentAttachPointTypeFactory intentAttachPointTypeFactory = new DefaultIntentAttachPointTypeFactory();
        factories.addFactory(intentAttachPointTypeFactory);
        ContributionFactory contributionFactory = factories.getFactory(ContributionFactory.class);
       
        // Create a monitor
        MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
       
        if (monitorFactory != null){
View Full Code Here

        startModules(registry, modules);

        SCABindingFactory scaBindingFactory = factories.getFactory(SCABindingFactory.class);
        IntentAttachPointTypeFactory intentAttachPointTypeFactory = new DefaultIntentAttachPointTypeFactory();
        factories.addFactory(intentAttachPointTypeFactory);
        ContributionFactory contributionFactory = factories.getFactory(ContributionFactory.class);

        // Create a monitor
        MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);

        if (monitorFactory != null) {
View Full Code Here

    }

    private Contribution getContribution(URL contributionArtifactURL, String contributionArtifactPath) {
        URL contributionURL = getContributionURL(contributionArtifactURL, contributionArtifactPath);

        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);

        SCAContribution contribution = new SCAContribution(contributionURL.toString(), contributionURL.toString());
        Contribution c = createContribution(contributionFactory, contribution);
        return c;
    }
View Full Code Here

                Composite composite = compositeURI == null ? null : createComposite(compositeURI);
                configuration.setComposite(composite);
 

                // Create contribution models
                ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
                for (SCAContribution c : contributions) {
                    Contribution contribution = createContribution(contributionFactory, c);
                    configuration.getContributions().add(contribution);
                }
            }
View Full Code Here

                analyzeProblems();

                configuration.setComposite(composite);

                // Create contribution models
                ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
                for (SCAContribution c : contributions) {
                    Contribution contribution = createContribution(contributionFactory, c);
                    configuration.getContributions().add(contribution);
                }
            }
View Full Code Here

     */
    private String location(Contribution contribution, String uri) {
        if (uri != null && uri.startsWith("/")) {
            uri = uri.substring(1);
        }
        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
        Artifact compositeFile = contributionFactory.createArtifact();
        compositeFile.setUnresolved(true);
        compositeFile.setURI(uri);
        ModelResolver resolver = contribution.getModelResolver();
        Artifact resolved = resolver.resolveModel(Artifact.class, compositeFile);
        if (resolved != null && !resolved.isUnresolved()) {
View Full Code Here

     */
    private Contribution contribution(List<Contribution> contributions, String compositeURI) {
        if (compositeURI != null && compositeURI.startsWith("/")) {
            compositeURI = compositeURI.substring(1);
        }
        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
        Artifact compositeFile = contributionFactory.createArtifact();
        compositeFile.setUnresolved(true);
        compositeFile.setURI(compositeURI);
        for (Contribution c : contributions) {
            ModelResolver resolver = c.getModelResolver();
            Artifact resolved = resolver.resolveModel(Artifact.class, compositeFile);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.contribution.ContributionFactory

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.