Package org.apache.tuscany.sca.databinding

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


* @version $Rev: 629687 $ $Date: 2008-02-20 20:11:14 -0800 (Wed, 20 Feb 2008) $
*/
public class DataBindingModuleActivator implements ModuleActivator {

    public void start(ExtensionPointRegistry registry) {
        DataBindingExtensionPoint dataBindings = registry.getExtensionPoint(DataBindingExtensionPoint.class);
        TransformerExtensionPoint transformers = registry.getExtensionPoint(TransformerExtensionPoint.class);
        FaultExceptionMapper faultExceptionMapper = new JAXWSFaultExceptionMapper(dataBindings);
        registry.addExtensionPoint(faultExceptionMapper);
       
        MediatorImpl mediator = new MediatorImpl(dataBindings, transformers);
View Full Code Here


public class XQueryImplementationProviderFactory implements ImplementationProviderFactory<XQueryImplementation> {

    private JavaPropertyValueObjectFactory javaFactory;

    public XQueryImplementationProviderFactory(ExtensionPointRegistry registry) {
        DataBindingExtensionPoint dataBindings = registry.getExtensionPoint(DataBindingExtensionPoint.class);
        TransformerExtensionPoint transformers = registry.getExtensionPoint(TransformerExtensionPoint.class);
        MediatorImpl mediator = new MediatorImpl(dataBindings, transformers);
        this.javaFactory = new JavaPropertyValueObjectFactory(mediator);
    }
View Full Code Here

                                        new PolicyProcessor(assemblyFactory, policyFactory)};
        for (JavaClassVisitor extension : extensions) {
            javaImplementationFactory.addClassVisitor(extension);
        }

        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

* @version $Rev: 830026 $ $Date: 2009-10-26 16:44:59 -0700 (Mon, 26 Oct 2009) $
*/
public class DataBindingModuleActivator implements ModuleActivator {

    public void start(ExtensionPointRegistry registry) {
        DataBindingExtensionPoint dataBindings = registry.getExtensionPoint(DataBindingExtensionPoint.class);
        TransformerExtensionPoint transformers = registry.getExtensionPoint(TransformerExtensionPoint.class);

        XMLAdapterExtensionPoint xmlAdapterExtensionPoint = registry.getExtensionPoint(XMLAdapterExtensionPoint.class);
        xmlAdapterExtensionPoint.addAdapter(CallableReference.class, CallableReferenceXMLAdapter.class);
        xmlAdapterExtensionPoint.addAdapter(OMElement.class, OMElementXMLAdapter.class);
        FaultExceptionMapper faultExceptionMapper = registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(FaultExceptionMapper.class);
       
        Mediator mediator = registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(Mediator.class);

        Input2InputTransformer input2InputTransformer = new Input2InputTransformer();
        input2InputTransformer.setMediator(mediator);
        transformers.addTransformer(input2InputTransformer, true);

        Output2OutputTransformer output2OutputTransformer = new Output2OutputTransformer();
        output2OutputTransformer.setMediator(mediator);
        transformers.addTransformer(output2OutputTransformer, true);

        Exception2ExceptionTransformer exception2ExceptionTransformer = new Exception2ExceptionTransformer(mediator, faultExceptionMapper);
        transformers.addTransformer(exception2ExceptionTransformer, false);

        Array2ArrayTransformer array2ArrayTransformer = new Array2ArrayTransformer();
        array2ArrayTransformer.setMediator(mediator);
        transformers.addTransformer(array2ArrayTransformer, true);

        Group2GroupTransformer group2GroupTransformer = new Group2GroupTransformer();
        group2GroupTransformer.setMediator(mediator);
        transformers.addTransformer(group2GroupTransformer, true);

        dataBindings.addDataBinding(new CallableReferenceDataBinding());
        transformers.addTransformer(new CallableReference2XMLStreamReader(), true);
        transformers.addTransformer(new XMLStreamReader2CallableReference(), false);

        ModelFactoryExtensionPoint modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
        JavaInterfaceFactory javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);
View Full Code Here

    /**
     * @throws InvalidServiceContractException
     */
    public final void testVisitInterface() throws InvalidInterfaceException {
        DataBindingExtensionPoint registry = new DefaultDataBindingExtensionPoint();
        DataBindingJavaInterfaceProcessor processor = new DataBindingJavaInterfaceProcessor(registry);
        JavaInterfaceFactory javaFactory = new DefaultJavaInterfaceFactory();
       
        JavaInterface contract = javaFactory.createJavaInterface();
        contract.setJavaClass(MockInterface.class);
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);
        PropertyValueFactory factory = utilities.getUtility(PropertyValueFactory.class);

        ContextFactoryExtensionPoint contextFactories = registry.getExtensionPoint(ContextFactoryExtensionPoint.class);
        ComponentContextFactory componentContextFactory = contextFactories.getFactory(ComponentContextFactory.class);
        RequestContextFactory requestContextFactory = contextFactories.getFactory(RequestContextFactory.class);
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

    @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

     * @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

     */
    @BeforeClass
    public static void setup() {
        // Create the factory
        Mediator mediator = EasyMock.createNiceMock(Mediator.class);
        DataBindingExtensionPoint dpep = new DefaultDataBindingExtensionPoint();
        EasyMock.expect(mediator.getDataBindings()).andReturn(dpep).anyTimes();
        EasyMock.replay(mediator);
        factory = new JavaPropertyValueObjectFactory(mediator);
       
        // Create the AssemblyFactory we should use
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.