Package org.apache.tuscany.sca.databinding

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


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


* @version $Rev: 574294 $ $Date: 2007-09-10 09:22:04 -0700 (Mon, 10 Sep 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

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

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

        registry.addTransformer(new String2SAX());
        registry.addTransformer(new SAX2DOMPipe());
        registry.addTransformer(new Node2String());
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

                                            DistributedSCABinding binding,
                                            ExtensionPointRegistry extensionPoints,
                                            List<PolicyHandlerTuple> policyHandlerClassnames) {

        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

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

        if (((Contract)contract).getInterfaceContract(wsBinding) == null) {
            // can happen if incorrect component service name
View Full Code Here

* @version $Rev: 830026 $ $Date: 2009-10-26 23:44:59 +0000 (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

                                           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

        };
        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: 574294 $ $Date: 2007-09-10 17:22:04 +0100 (Mon, 10 Sep 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.