Package org.apache.tuscany.sca.databinding

Examples of org.apache.tuscany.sca.databinding.DataBindingExtensionPoint


    @Override
    protected void setUp() throws Exception {
        super.setUp();

        DataBindingExtensionPoint dataBindingRegistry = new DefaultDataBindingExtensionPoint();
        TransformerExtensionPoint registry = new DefaultTransformerExtensionPoint();

        registry.addTransformer(new String2SAX(), true);
        registry.addTransformer(new SAX2DOMPipe(), true);
        registry.addTransformer(new Node2String(), true);
View Full Code Here


        assertTrue(binding1.introspect(dt1, null));
        DataType dt2 = new DataTypeImpl<Class>(String.class, null);
        assertFalse(binding1.introspect(dt2, null));
        assertNull(binding1.getWrapperHandler());
       
        DataBindingExtensionPoint registry = EasyMock.createMock(DataBindingExtensionPoint.class);
        registry.addDataBinding(binding1);
        EasyMock.expect(registry.getDataBinding(Node.class.getName())).andReturn(binding1);
        EasyMock.replay(registry);
       
        assertNotNull(registry.getDataBinding(Node.class.getName()));

        DataBinding1 binding2 = new DataBinding1("dom", Node.class);
        assertEquals("dom", binding2.getName());
    }
View Full Code Here

            logger.warning("Class proxys not supported due to NoClassDefFoundError:" + e.getMessage());
        }

        JavaInterfaceFactory javaFactory = factories.getFactory(JavaInterfaceFactory.class);

        DataBindingExtensionPoint dataBindings = registry.getExtensionPoint(DataBindingExtensionPoint.class);
        TransformerExtensionPoint transformers = registry.getExtensionPoint(TransformerExtensionPoint.class);
        MediatorImpl mediator = new MediatorImpl(dataBindings, transformers);
        JavaPropertyValueObjectFactory factory = new JavaPropertyValueObjectFactory(mediator);

        ContextFactoryExtensionPoint contextFactories = registry.getExtensionPoint(ContextFactoryExtensionPoint.class);
View Full Code Here

                                            List<PolicyHandlerTuple> policyHandlerClassnames) {

        ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class);
        ServletHost servletHost = servletHosts.getServletHosts().get(0);
        ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
        DataBindingExtensionPoint dataBindings = extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class);

        this.component = component;
        this.reference = reference;
        this.binding = binding.getSCABinding();
        wsBinding = modelFactories.getFactory(WebServiceBindingFactory.class).createWebServiceBinding();
View Full Code Here

        ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class);
        ServletHost servletHost = servletHosts.getServletHosts().get(0);
        ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
        MessageFactory messageFactory = modelFactories.getFactory(MessageFactory.class);
        DataBindingExtensionPoint dataBindings = extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class);

        this.binding = binding.getSCABinding();
        wsBinding = modelFactories.getFactory(WebServiceBindingFactory.class).createWebServiceBinding();
        wsBinding.setName(this.binding.getName());        
        wsBinding.setURI(this.binding.getURI());
View Full Code Here

     * @see junit.framework.TestCase#setUp()
     */
    @Override
    protected void setUp() throws Exception {
        super.setUp();
        DataBindingExtensionPoint db = new DefaultDataBindingExtensionPoint();
        XMLAdapterExtensionPoint xa = new DefaultXMLAdapterExtensionPoint();
        interfaceProcessor = new JAXWSJavaInterfaceProcessor(db, new JAXWSFaultExceptionMapper(db, xa), xa);
    }
View Full Code Here

                                           Contract contract,
                                           WebServiceBinding wsBinding,
                                           ExtensionPointRegistry extensionPoints,
                                           Monitor monitor) {
        FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
        DataBindingExtensionPoint dataBindings = extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class);
        WSDLFactory wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
        XSDFactory xsdFactory = modelFactories.getFactory(XSDFactory.class);
        DocumentBuilderFactory documentBuilderFactory = modelFactories.getFactory(DocumentBuilderFactory.class);

        if (((Contract)contract).getInterfaceContract(wsBinding) == null) {
View Full Code Here

        assertTrue(binding1.introspect(dt1, null));
        DataType dt2 = new DataTypeImpl<Class>(String.class, null);
        assertFalse(binding1.introspect(dt2, null));
        assertNull(binding1.getWrapperHandler());
       
        DataBindingExtensionPoint registry = new DefaultDataBindingExtensionPoint(new DefaultExtensionPointRegistry());
        registry.addDataBinding(binding1);
       
        assertNotNull(registry.getDataBinding(Node.class.getName()));

        DataBinding1 binding2 = new DataBinding1("dom", Node.class);
        assertEquals("dom", binding2.getName());
    }
View Full Code Here

    private MediatorImpl mediator;

    @Before
    public void setUp() throws Exception {
        ExtensionPointRegistry extensionPointRegistry = new DefaultExtensionPointRegistry();
        DataBindingExtensionPoint dataBindingRegistry = new DefaultDataBindingExtensionPoint(extensionPointRegistry);
        TransformerExtensionPoint registry = new DefaultTransformerExtensionPoint(extensionPointRegistry);

        registry.addTransformer(new String2SAX(), true);
        registry.addTransformer(new SAX2DOMPipe(extensionPointRegistry), true);
        registry.addTransformer(new Node2String(extensionPointRegistry), true);
View Full Code Here

* @version $Rev: 601501 $ $Date: 2007-12-05 20:23:21 +0000 (Wed, 05 Dec 2007) $
*/
public class DataBindingModuleActivator implements ModuleActivator {

    public void start(ExtensionPointRegistry registry) {
        DataBindingExtensionPoint dataBindings = registry.getExtensionPoint(DataBindingExtensionPoint.class);
        TransformerExtensionPoint transformers = registry.getExtensionPoint(TransformerExtensionPoint.class);
       
        MediatorImpl mediator = new MediatorImpl(dataBindings, transformers);
        Input2InputTransformer input2InputTransformer = new Input2InputTransformer();
        input2InputTransformer.setMediator(mediator);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.databinding.DataBindingExtensionPoint

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.