Package org.apache.tuscany.sca.contribution

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


                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


        }

        composite = configuration.getComposite();
       
        if(composite != null && composite.isUnresolved()) {
            ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
            Artifact compositeFile = contributionFactory.createArtifact();
            compositeFile.setUnresolved(true);
            compositeFile.setURI(composite.getURI());
            for (Contribution c : contributions) {
                ModelResolver resolver = c.getModelResolver();
                Artifact resolved = resolver.resolveModel(Artifact.class, compositeFile);
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

            composite.setURI(compositeURI);
            composite.setUnresolved(true);
            configuration.setComposite(composite);
           
            // Create contribution models
            ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
            for (SCAContribution c: contributions) {
                Contribution contribution = contributionFactory.createContribution();
                contribution.setURI(c.getURI());
                contribution.setLocation(c.getLocation());
                contribution.setUnresolved(true);
                configuration.getContributions().add(contribution);
            }
View Full Code Here

        ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
        ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.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, extensionPoints);
        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

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.