Package org.apache.tuscany.sca.contribution.resolver

Examples of org.apache.tuscany.sca.contribution.resolver.ModelResolver.addModel()


    public void resolve(Contribution contribution, ModelResolver resolver) throws ContributionResolveException {
       
        // Resolve the contribution model itself
        ModelResolver contributionResolver = contribution.getModelResolver();
        contribution.setUnresolved(false);
        contributionResolver.addModel(contribution);
       
        // Resolve imports and exports
        for (Export export: contribution.getExports()) {
            if (export instanceof DefaultExport) {
               
View Full Code Here


    public void resolve(Contribution contribution, ModelResolver resolver) throws ContributionResolveException {
       
        // Mark the contribution model resolved
        ModelResolver contributionResolver = contribution.getModelResolver();
        contribution.setUnresolved(false);
        contributionResolver.addModel(contribution);
       
        // Resolve imports and exports
        for (Export export: contribution.getExports()) {
            if (export instanceof DefaultExport) {
               
View Full Code Here

            // Add the deployed artifact model to the resolver
            DeployedArtifact artifact = this.contributionFactory.createDeployedArtifact();
            artifact.setURI(a.toString());
            artifact.setLocation(artifactURL.toString());
            contribution.getArtifacts().add(artifact);
            modelResolver.addModel(artifact);

            // Let the artifact processor read the artifact into a model
            Object model = this.artifactProcessor.read(contributionURL, a, artifactURL);
            if (model != null) {
                artifact.setModel(model);
View Full Code Here

            Object model = this.artifactProcessor.read(contributionURL, a, artifactURL);
            if (model != null) {
                artifact.setModel(model);
               
                // Add the loaded model to the model resolver
                modelResolver.addModel(model);
            }
        }
    }

    /**
 
View Full Code Here

    public void resolve(Contribution contribution, ModelResolver resolver) throws ContributionResolveException {

        // Mark the contribution model resolved
        ModelResolver contributionResolver = contribution.getModelResolver();
        contribution.setUnresolved(false);
        contributionResolver.addModel(contribution);

        // Resolve imports and exports
        for (Export export: contribution.getExports()) {
            if (export instanceof DefaultExport) {
View Full Code Here

        assertEquals("ABC", osgiProp2.getValue());
        assertEquals("prop2", osgiProp2.getName());

        ModelResolver resolver = new TestModelResolver(getClass().getClassLoader());
        staxProcessor.resolve(componentType, resolver);
        resolver.addModel(componentType);

        staxProcessor.resolve(composite, resolver);
    }

    @Test
View Full Code Here

            // Add the deployed artifact model to the contribution
            Artifact artifact = this.contributionFactory.createArtifact();
            artifact.setURI(artifactURI);
            artifact.setLocation(artifactURL.toString());
            artifacts.add(artifact);
            modelResolver.addModel(artifact);

            // Read each artifact
            Object model = artifactProcessor.read(contributionURL, URI.create(artifactURI), artifactURL);
            if (model != null) {
                artifact.setModel(model);
View Full Code Here

            Object model = artifactProcessor.read(contributionURL, URI.create(artifactURI), artifactURL);
            if (model != null) {
                artifact.setModel(model);

                // Add the loaded model to the model resolver
                modelResolver.addModel(model);

                // Merge contribution metadata into the contribution model
                if (model instanceof ContributionMetadata) {
                    contributionMetadata = true;
                    ContributionMetadata c = (ContributionMetadata)model;
View Full Code Here

     */
    public void preResolve(Contribution contribution, ModelResolver resolver) throws ContributionResolveException {
        // Resolve the contribution model itself
        ModelResolver contributionResolver = contribution.getModelResolver();
        contribution.setUnresolved(false);
        contributionResolver.addModel(contribution);

        // Resolve Exports
        resolveExports(contribution, contributionResolver);
        // Resolve Imports
        resolveImports(contribution, contributionResolver);
View Full Code Here

            // Add the deployed artifact model to the contribution
            Artifact artifact = this.contributionFactory.createArtifact();
            artifact.setURI(artifactURI);
            artifact.setLocation(artifactURL.toString());
            artifacts.add(artifact);
            modelResolver.addModel(artifact);
           
            // Read each artifact
            Object model = artifactProcessor.read(contributionURL, URI.create(artifactURI), artifactURL);
            if (model != null) {
                artifact.setModel(model);
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.