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

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


        }

        // First try to load the class using the Java import resolvers
        ModelResolver importResolver = importResolvers.get(packageName);
        if (importResolver != null) {
            ClassReference classReference = importResolver.resolveModel(ClassReference.class, new ClassReference(name), context);
            if (!classReference.isUnresolved()) {
                contributionContainingClass = classReference.getContributionContainingClass();
                return classReference.getJavaClass();
            }
        }
View Full Code Here


        }

        // First try to load the class using the Java import resolvers
        ModelResolver importResolver = importResolvers.get(packageName);
        if (importResolver != null) {
            ClassReference classReference = importResolver.resolveModel(ClassReference.class, new ClassReference(name), context);
            if (!classReference.isUnresolved()) {
                contributionContainingClass = classReference.getContributionContainingClass();
                return classReference.getJavaClass();
            }
        }
View Full Code Here

            Artifact oldArtifact = context.setArtifact(contribution);
            try {
                for (int i = 0, n = deployables.size(); i < n; i++) {
                    Composite deployable = deployables.get(i);
                    Composite resolved =
                        (Composite)contributionResolver.resolveModel(Composite.class, deployable, context);
                    if (resolved != deployable) {
                        deployables.set(i, resolved);
                    }
                } // end for
            } finally {
View Full Code Here

        ModelResolver modelResolver = contribution.getModelResolver();
       
        // Look for META-INF/sca-contribution.xml
        Artifact artifact = contributionFactory.createArtifact();
        artifact.setURI(Contribution.SCA_CONTRIBUTION_META);
        artifact = modelResolver.resolveModel(Artifact.class, artifact);
        if (artifact.getLocation() == null) {

            // Look for META-INF/sca-contribution-generated.xml
            artifact.setURI(Contribution.SCA_CONTRIBUTION_GENERATED_META);
            artifact = modelResolver.resolveModel(Artifact.class, artifact);
View Full Code Here

        artifact = modelResolver.resolveModel(Artifact.class, artifact);
        if (artifact.getLocation() == null) {

            // Look for META-INF/sca-contribution-generated.xml
            artifact.setURI(Contribution.SCA_CONTRIBUTION_GENERATED_META);
            artifact = modelResolver.resolveModel(Artifact.class, artifact);
            if (artifact.getLocation() == null) {
               
                // No contribution metadata file was found, default to export all the
                // Java packages found in the contribution
                Set<String> packages = new HashSet<String>();
View Full Code Here

        }
       
        // First try to load the class using the Java import resolvers
        ModelResolver importResolver = importResolvers.get(packageName);
        if (importResolver != null) {
            ClassReference classReference = importResolver.resolveModel(ClassReference.class, new ClassReference(name));
            if (!classReference.isUnresolved()) {
                return classReference.getJavaClass();
            }
        }
View Full Code Here

       
        // Resolve deployable composites
        List<Composite> deployables = contribution.getDeployables();
        for (int i = 0, n = deployables.size(); i < n; i++) {
            Composite deployable = deployables.get(i);
            Composite resolved = (Composite)contributionResolver.resolveModel(Composite.class, deployable);
            if (resolved != deployable) {
                deployables.set(i, resolved);
            }
        }
    }
View Full Code Here

        for (Contribution contribution: workspace.getContributions()) {
            ModelResolver resolver = contribution.getModelResolver();
//            for (Artifact artifact : contribution.getArtifacts()){
//                logger.log(Level.INFO,"artifact - " + artifact.getURI());
//            }
            Artifact resolvedArtifact = resolver.resolveModel(Artifact.class, compositeFile);
            if (!resolvedArtifact.isUnresolved() && resolvedArtifact.getModel() instanceof Composite) {
               
                if (!composite.isUnresolved()) {
                   
                    // The composite content was passed into the node and read into a composite model,
View Full Code Here

        }
       
        // First try to load the class using the Java import resolvers
        ModelResolver importResolver = importResolvers.get(packageName);
        if (importResolver != null) {
            ClassReference classReference = importResolver.resolveModel(ClassReference.class, new ClassReference(name));
            if (!classReference.isUnresolved()) {
                return classReference.getJavaClass();
            }
        }
View Full Code Here

        for (Contribution contribution : workspace.getContributions()) {
            ModelResolver resolver = contribution.getModelResolver();
            //            for (Artifact artifact : contribution.getArtifacts()){
            //                logger.log(Level.INFO,"artifact - " + artifact.getURI());
            //            }
            Artifact resolvedArtifact = resolver.resolveModel(Artifact.class, compositeFile);
            //            if (!resolvedArtifact.isUnresolved() && resolvedArtifact.getModel() instanceof Composite) {

            if (!composite.isUnresolved()) {

                // The composite content was passed into the node and read into a composite 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.