Package org.apache.tuscany.sca.definitions

Examples of org.apache.tuscany.sca.definitions.SCADefinitions


                   
                    // Add policy definitions to the list of policy definitions
                    if (model instanceof SCADefinitions) {
                        policyDefinitions.add(model);
                       
                        SCADefinitions definitions = (SCADefinitions)model;
                        for (Intent intent : definitions.getPolicyIntents() ) {
                            policyDefinitionsResolver.addModel(intent);
                        }
                       
                        for (PolicySet policySet : definitions.getPolicySets() ) {
                            policyDefinitionsResolver.addModel(policySet);
                        }
                       
                        for (IntentAttachPointType attachPointType : definitions.getBindingTypes() ) {
                            policyDefinitionsResolver.addModel(attachPointType);
                        }
                       
                        for (IntentAttachPointType attachPointType : definitions.getImplementationTypes() ) {
                            policyDefinitionsResolver.addModel(attachPointType);
                        }
                        for (Object binding : definitions.getBindings() ) {
                            policyDefinitionsResolver.addModel(binding);
                        }
                    }
                }
            }
View Full Code Here


        is.close();
        assertNotNull(composite);
       
        URL url = getClass().getResource("test_definitions.xml");
        URI uri = URI.create("test_definitions.xml");
        SCADefinitions scaDefns = (SCADefinitions)scaDefnDocProcessor.read(null, uri, url);
        assertNotNull(scaDefns);
       
        scaDefnDocProcessor.resolve(scaDefns, resolver);
       
        compositeReader.resolve(composite, resolver);
View Full Code Here

        Composite composite = compositeReader.read(reader);
        is.close();
       
        URL url = getClass().getResource("test_definitions.xml");
        URI uri = URI.create("test_definitions.xml");
        SCADefinitions scaDefns = (SCADefinitions)scaDefnDocProcessor.read(null, uri, url);
        assertNotNull(scaDefns);
       
        scaDefnDocProcessor.resolve(scaDefns, resolver);
       
        compositeReader.resolve(composite, resolver);
View Full Code Here

        InputStream is = getClass().getResourceAsStream("TestAllCalculator.composite");
        Composite composite = staxProcessor.read(is, Composite.class);
       
        URL url = getClass().getResource("test_definitions.xml");
        URI uri = URI.create("test_definitions.xml");
        SCADefinitions scaDefns = (SCADefinitions)scaDefnDocProcessor.read(null, uri, url);
        assertNotNull(scaDefns);
        scaDefnDocProcessor.resolve(scaDefns, resolver);
       
        staxProcessor.resolve(composite, resolver);
        compositeUtil.build(composite);
View Full Code Here

        Composite composite = (Composite)documentProcessor.read(null, uri, url);
        assertNotNull(composite);
       
        url = getClass().getResource("test_definitions.xml");
        uri = URI.create("test_definitions.xml");
        SCADefinitions scaDefns = (SCADefinitions)scaDefnDocProcessor.read(null, uri, url);
        assertNotNull(scaDefns);
       
        preResolvePolicyTests(composite);
        documentProcessor.resolve(scaDefns, resolver);
        documentProcessor.resolve(composite, resolver);
View Full Code Here

        composite = (Composite)documentProcessor.read(null, uri, url);
        assertNotNull(composite);
       
        url = getClass().getResource("another_test_definitions.xml");
        uri = URI.create("another_test_definitions.xml");
        SCADefinitions scaDefns = (SCADefinitions)scaDefnDocProcessor.read(null, uri, url);
        assertNotNull(scaDefns);
       
        //preResolvePolicyTests(composite);
        documentProcessor.resolve(scaDefns, resolver);
        documentProcessor.resolve(composite, resolver);
View Full Code Here

        Composite composite = (Composite)documentProcessor.read(null, uri, url);
        assertNotNull(composite);
       
        url = getClass().getResource("definitions.xml");
        uri = URI.create("definitions.xml");
        SCADefinitions scaDefns = (SCADefinitions)scaDefnDocProcessor.read(null, uri, url);
        assertNotNull(scaDefns);
       
        preResolvePolicyTests(composite);
        documentProcessor.resolve(scaDefns, resolver);
        documentProcessor.resolve(composite, resolver);
View Full Code Here

        composite = (Composite)documentProcessor.read(null, uri, url);
        assertNotNull(composite);
       
        url = getClass().getResource("AnotherDefinitions.xml");
        uri = URI.create("AnotherDefinitions.xml");
        SCADefinitions scaDefns = (SCADefinitions)scaDefnDocProcessor.read(null, uri, url);
        assertNotNull(scaDefns);
       
        //preResolvePolicyTests(composite);
        documentProcessor.resolve(scaDefns, resolver);
        documentProcessor.resolve(composite, resolver);
View Full Code Here

        startModules(registry, modules);

        // Load the definitions.xml
        URLArtifactProcessorExtensionPoint documentProcessors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
        SCADefinitionsDocumentProcessor definitionsProcessor = (SCADefinitionsDocumentProcessor)documentProcessors.getProcessor(SCADefinitions.class);
        SCADefinitions definitions = loadDomainDefinitions(definitionsProcessor);
        List<PolicySet> domainPolicySets;
        if ( definitions != null ) {
            domainPolicySets = definitions.getPolicySets();
        } else {
            domainPolicySets = null;
        }
       
        //Create a composite builder
View Full Code Here

        }
    }
   
    private SCADefinitions loadDomainDefinitions(SCADefinitionsDocumentProcessor definitionsProcessor) throws ActivationException {
        URL url = this.classLoader.getResource("definitions.xml");
        SCADefinitions definitions = null;
       
        if ( url != null ) {
            try {
                definitions = definitionsProcessor.read(null, null, url);
                definitionsProcessor.resolve(definitions, definitionsProcessor.getDomainModelResolver());
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.definitions.SCADefinitions

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.