Package org.switchyard.internal.transform

Examples of org.switchyard.internal.transform.BaseTransformerRegistry$JavaSourceFallbackTransformer


    public static void init() throws Exception {
        final DefaultCamelContext camelContext = new DefaultCamelContext();
        _extractor = new CamelTypeConverterExtractor(camelContext);
        _extractor.init();
       
        _transformerRegistry = new BaseTransformerRegistry();
        new TransformerRegistryLoader(_transformerRegistry).loadOOTBTransforms();
    }
View Full Code Here


     */
    protected DomainImpl(QName name) {
        this(name,
            new DefaultServiceRegistry(),
            new LocalExchangeBus(),
            new BaseTransformerRegistry(),
            new BaseValidatorRegistry(),
            new EventManager(),
            new DefaultServiceDomainSecurity());
        init();
    }
View Full Code Here

     * @param domainName The domain name.
     * @param switchyardConfig The SwitchYard configuration.
     * @return The ServiceDomain instance.
     */
    public ServiceDomain createDomain(QName domainName, SwitchYardModel switchyardConfig) {
        TransformerRegistry transformerRegistry = new BaseTransformerRegistry();
        ValidatorRegistry validatorRegistry = new BaseValidatorRegistry();

        SwitchYardCamelContextImpl camelContext = new SwitchYardCamelContextImpl();
        CamelExchangeBus bus = new CamelExchangeBus(camelContext);

View Full Code Here

    @Test
    public void test() throws IOException {
        final QName A = new QName("a");
        final QName B = new QName("b");

        BaseTransformerRegistry xformReg = new BaseTransformerRegistry();
        TransformSequence transSequence = TransformSequence.from(A).to(B);

        DefaultMessage message = new DefaultMessage().setContent(A);
        Message2MessageTransformer transformer = new Message2MessageTransformer();

        xformReg.addTransformer(transformer, A, B);
        transSequence.apply(message, xformReg);

        Assert.assertEquals(message, transformer.getMessage());
    }
View Full Code Here

    @Test
    public void testNullOutputFromTransformation() throws IOException {
        final QName A = new QName("a");
        final QName B = new QName("b");

        BaseTransformerRegistry xformReg = new BaseTransformerRegistry();
        TransformSequence transSequence = TransformSequence.from(A).to(B);

        DefaultMessage message = new DefaultMessage().setContent("testNull");
        Message2NullTransformer transformer = new Message2NullTransformer();

        xformReg.addTransformer(transformer, A, B);
        transSequence.apply(message, xformReg);
        System.out.println(message.getContent());
        Assert.assertNull(message.getContent());
    }
View Full Code Here

    }

    @Test
    public void transformerClassNotFound() throws Exception {
        SwitchYardModel switchyard = _puller.pull(MISSING_TRANSFORM_XML, getClass());
        TransformerRegistryLoader loader = new TransformerRegistryLoader(new BaseTransformerRegistry());
        try {
            loader.newTransformers(switchyard.getTransforms().getTransforms().get(0));
            // the above should have resulted in an exception
            Assert.fail("missing transformer class should result in SwitchYardException");
        } catch (SwitchYardException syEx) {
View Full Code Here

        TransformModel transformModel = transforms.getTransforms().get(0);

        if (transformModel == null) {
            Assert.fail("No smooks config.");
        }
        TransformerRegistryLoader trl = new TransformerRegistryLoader(new BaseTransformerRegistry());
        return trl.newTransformer(transformModel);
    }
View Full Code Here

  private final static String JSON_USER = "{\"verified\":false,\"gender\":\"MALE\",\"name\":{\"first\":\"Joe\",\"last\":\"Sixpack\"}}";
  private final static String JSON_USER_LIST = "[{\"name\":{\"first\":\"Joe\",\"last\":\"Sixpack\"},\"gender\":\"MALE\",\"verified\":false}]";
    private TransformerRegistry xformReg;

    public JSONTransformerTest() {
        xformReg = new BaseTransformerRegistry();
        new TransformerRegistryLoader(xformReg).loadOOTBTransforms();
    }
View Full Code Here

            + "<td>Switchyard</td><td>http://www.jboss.org/switchyard</td></tr><tr><td>Arquillian</td><td>http://www.jboss.org/arquillian</td>"
            + "</tr><tr><td>Drools</td><td>http://www.jboss.org/drools</td></tr><tr><td>JBoss Tools</td><td>http://www.jboss.org/tools</td>"
            + "</tr></table></body></index>";

    public XsltTransformerTest() {
        xformReg = new BaseTransformerRegistry();
        new TransformerRegistryLoader(xformReg).loadOOTBTransforms();
    }
View Full Code Here

        model.setXsltFile("org/switchyard/transform/xslt/internal/topics.xslt");
        model.setFrom(new QName("A"));
        model.setTo(new QName("B"));

        TransformerRegistryLoader trl = new TransformerRegistryLoader(new BaseTransformerRegistry());
        Transformer<?,?> transformer = trl.newTransformer(model);

        Assert.assertTrue(transformer instanceof XsltTransformer);
    }
View Full Code Here

TOP

Related Classes of org.switchyard.internal.transform.BaseTransformerRegistry$JavaSourceFallbackTransformer

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.