Package org.apache.tuscany.sca.contribution.service

Examples of org.apache.tuscany.sca.contribution.service.ContributionService.contribute()


        url = url.substring(0, url.length()-8);
       
        // Contribute the SCA contribution
        TestModelResolver myResolver = new TestModelResolver(myClassLoader);
        ContributionService contributionService = domain.getContributionService();
        Contribution contribution = contributionService.contribute("http://test/contribution", new URL(url), myResolver, false);
        assertNotNull(contribution);
       
        // Decide which SCA composite I want to deploy
        Composite myComposite = myResolver.getComposite(new QName("http://sample/crud", "crud"));
       
View Full Code Here


        try {
            String contributionURI = FileHelper.getName(contributionURL.getPath());
            if(contributionURI == null || contributionURI.length() == 0) {
                contributionURI = contributionURL.toString();
            }
            contribution = contributionService.contribute(contributionURI, contributionURL, false);
        } catch (ContributionException e) {
            throw new ServiceRuntimeException(e);
        } catch (IOException e) {
            throw new ServiceRuntimeException(e);
        }
View Full Code Here

        // Contribute the SCA contribution
        ContributionService contributionService = domain.getContributionService();
       
        URL javaContribURL = getContributionURL(SavingsAccountService.class);
        Contribution bigbankAcContribution = contributionService.contribute("http://bigbank-account", javaContribURL, false);
        for (Composite deployable : bigbankAcContribution.getDeployables()) {
            domain.getDomainComposite().getIncludes().add(deployable);
            domain.buildComposite(deployable);
        }
       
View Full Code Here

            domain.getDomainComposite().getIncludes().add(deployable);
            domain.buildComposite(deployable);
        }
       
        URL bigbankContribUrl = getContributionURL(BigBankServer.class);
        Contribution bigbankContribution = contributionService.contribute("http://bigbank", bigbankContribUrl, false);
        for (Composite deployable : bigbankContribution.getDeployables()) {
            domain.getDomainComposite().getIncludes().add(deployable);
            domain.buildComposite(deployable);
        }
View Full Code Here

                }
            }

            // Load the contribution
            logger.log(Level.INFO, "Loading contribution: " + contributionURL);
            contributions.add(contributionService.contribute(contribution.getURI(), contributionURL, false));
            analyzeProblems();
        }

        composite = configuration.getComposite();
View Full Code Here

        url = url.substring(0, url.length()-8);
       
        // Contribute the SCA contribution
        TestModelResolver myResolver = new TestModelResolver(myClassLoader);
        ContributionService contributionService = domain.getContributionService();
        Contribution contribution = contributionService.contribute("http://test/contribution", new URL(url), myResolver, false);
        assertNotNull(contribution);
       
        // Decide which SCA composite I want to deploy
        Composite myComposite = myResolver.getComposite(new QName("http://test", "test"));
       
View Full Code Here

        url = url.substring(0, url.length()-8);
       
        // Contribute the SCA contribution
        TestModelResolver myResolver = new TestModelResolver(myClassLoader);
        ContributionService contributionService = domain.getContributionService();
        Contribution contribution = contributionService.contribute("http://test/contribution", new URL(url), myResolver, false);
        assertNotNull(contribution);
       
        // Decide which SCA composite I want to deploy
        Composite myComposite = myResolver.getComposite(new QName("http://test", "test"));
       
View Full Code Here

                modelResolver = new ModelResolverImpl(contributionClassLoader);
            }
           
            // Add the contribution to the node
            ContributionService contributionService = nodeRuntime.getContributionService();
            Contribution contribution = contributionService.contribute(contributionURI,
                                                                       contributionURL,
                                                                       modelResolver,
                                                                       false);
           
            // remember the contribution
View Full Code Here

            // find the current directory as a URL. This is where our contribution
            // will come from
            URL contributionURL = Thread.currentThread().getContextClassLoader().getResource(nodeName + "/");

            // Contribute the SCA application
            Contribution contribution = contributionService.contribute("http://calculator", contributionURL, null, //resolver,
                                                                       false);
            Composite composite = contribution.getDeployables().get(0);

            // Add the deployable composite to the domain
            nodeComposite.getIncludes().add(composite);
View Full Code Here

        try {
            String contributionURI = FileHelper.getName(contributionURL.getPath());
            if (contributionURI == null || contributionURI.length() == 0) {
                contributionURI = contributionURL.toString();
            }
            contribution = contributionService.contribute(contributionURI, contributionURL, false);
        } catch (ContributionException e) {
            throw new ServiceRuntimeException(e);
        } catch (IOException e) {
            throw new ServiceRuntimeException(e);
        }
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.