Package org.apache.tuscany.spi.model

Examples of org.apache.tuscany.spi.model.ComponentType


       
     
    }

    protected RubyComponentType loadFromSidefile(URL url, DeploymentContext deploymentContext) throws LoaderException {
        ComponentType ct = loaderRegistry.load(null,
                                               url,
                                               ComponentType.class,
                                               deploymentContext);
        RubyComponentType jsct = new RubyComponentType(ct);
        return jsct;
View Full Code Here


                                       null,
                                       getClass().getClassLoader());
        RubySCAConfig scaConfig = new RubySCAConfig(rs.getRubyEngine().getGlobalVariables());
        RubyIntrospector introspector = new RubyIntrospector(null,
                                                             new JavaInterfaceProcessorRegistryImpl());
        ComponentType comonentType = introspector.introspectScript(scaConfig,
                                                                   rs.getClassLoader());
        assertNotNull(comonentType);
        Map services = comonentType.getServices();
        assertEquals(1,
                     services.size());
        ServiceDefinition serviceDefinition = (ServiceDefinition) services.values()
                                                                          .iterator()
                                                                          .next();
View Full Code Here

        wsdlReg.loadDefinition("http://helloworld",
                               wsdlURL);

        RubyIntrospector introspector = new RubyIntrospector(wsdlReg,
                                                             new JavaInterfaceProcessorRegistryImpl());
        ComponentType comonentType = introspector.introspectScript(scaConfig,
                                                                   rs.getClassLoader());
        assertNotNull(comonentType);
        Map services = comonentType.getServices();
        assertEquals(1,
                     services.size());
        ServiceDefinition serviceDefinition = (ServiceDefinition) services.values()
                                                                          .iterator()
                                                                          .next();
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    private void populatePropertyValues(ComponentDefinition<Implementation<?>> componentDefinition)
        throws MissingMustOverridePropertyException {
        ComponentType componentType = componentDefinition.getImplementation().getComponentType();
        if (componentType != null) {
            Map<String, Property<?>> properties = componentType.getProperties();
            Map<String, PropertyValue<?>> propertyValues = componentDefinition.getPropertyValues();

            for (Property<?> aProperty : properties.values()) {
                if (propertyValues.get(aProperty.getName()) == null) {
                    if (aProperty.getOverride() == OverrideOptions.MUST) {
View Full Code Here

        implementation.setComponentType(componentType);
    }

    protected JavaScriptComponentType loadFromSidefile(URL url, DeploymentContext deploymentContext)
        throws LoaderException {
        ComponentType ct = loaderRegistry.load(null, url, ComponentType.class, deploymentContext);
        JavaScriptComponentType jsct = new JavaScriptComponentType(ct);
        return jsct;
    }
View Full Code Here

            new RhinoScript("javaInterfaceTest", "SCA = { javaInterface : 'helloworld.HelloWorldService',};",
                null, getClass().getClassLoader());
        RhinoSCAConfig scaConfig = new RhinoSCAConfig(rs.getScriptScope());
        JavaScriptIntrospector introspector =
            new JavaScriptIntrospector(null, new JavaInterfaceProcessorRegistryImpl());
        ComponentType comonentType = introspector.introspectScript(scaConfig, rs.getClassLoader());
        assertNotNull(comonentType);
        Map services = comonentType.getServices();
        assertEquals(1, services.size());
        ServiceDefinition serviceDefinition = (ServiceDefinition) services.values().iterator().next();
        ServiceContract serviceContract = serviceDefinition.getServiceContract();
        assertTrue(serviceContract instanceof JavaServiceContract);
        JavaServiceContract javaServiceContract = (JavaServiceContract) serviceContract;
View Full Code Here

            getClass().getClassLoader().getResource("org/apache/tuscany/container/javascript/rhino/helloworld.wsdl");
        wsdlReg.loadDefinition("http://helloworld", wsdlURL);

        JavaScriptIntrospector introspector =
            new JavaScriptIntrospector(wsdlReg, new JavaInterfaceProcessorRegistryImpl());
        ComponentType comonentType = introspector.introspectScript(scaConfig, rs.getClassLoader());
        assertNotNull(comonentType);
        Map services = comonentType.getServices();
        assertEquals(1, services.size());
        ServiceDefinition serviceDefinition = (ServiceDefinition) services.values().iterator().next();
        ServiceContract serviceContract = serviceDefinition.getServiceContract();
        assertTrue(serviceContract instanceof WSDLServiceContract);
        WSDLServiceContract wsdlServiceContract = (WSDLServiceContract) serviceContract;
View Full Code Here

TOP

Related Classes of org.apache.tuscany.spi.model.ComponentType

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.