Package org.milyn.templating.freemarker

Examples of org.milyn.templating.freemarker.FreeMarkerTemplateProcessor$ContextClassLoaderTemplateLoader


        try {
            smooks.setFilterSettings(FilterSettings.DEFAULT_SAX);

            smooks.addVisitor(new Bean(HashMap.class, "object").bindTo("a", "a"));
            smooks.addVisitor(new FreeMarkerTemplateProcessor(new TemplatingConfiguration("${object.a}").setUsage(OutputTo.stream("fileOS"))), "a");
            smooks.addVisitor(new FileOutputStreamResource().setFileNamePattern("${object.a}.xml").setDestinationDirectoryPattern("target/config-01-test/${object.a}").setResourceName("fileOS"), "a");

            smooks.filterSource(new StringSource("<root><a>1</a><a>2</a><a>3</a></root>"));

            assertEquals("1", getFileContents(file1));
View Full Code Here


      final File outputFile = new File(destinationDir, outputFileName);

        try {
            smooks.setFilterSettings(FilterSettings.DEFAULT_SAX);
            smooks.addVisitor(new Bean(HashMap.class, "object").bindTo("a", "a"));
            smooks.addVisitor(new FreeMarkerTemplateProcessor(new TemplatingConfiguration("${object.a}")
                    .setUsage(OutputTo.stream(outputStreamRef))), "a");
            smooks.addVisitor(new FileOutputStreamResource()
                    .setAppend(true)
                    .setFileNamePattern(outputFileName)
                    .setDestinationDirectoryPattern(destinationDir.getAbsolutePath())
View Full Code Here

        // Create a HashMap, name it "object" and then bind the <a> data into it, keyed as "a"...
        smooks.addVisitor(new Bean(HashMap.class, "object").bindTo("a", "a"));

        // On every <a> fragment, apply a simple template and bind the templating result to
        // beanId "orderItem_xml" ...
        smooks.addVisitor(new FreeMarkerTemplateProcessor(new TemplatingConfiguration("${object.a}").setUsage(BindTo.beanId("orderItem_xml"))), "a");

        JMSRouter jmsRouter = new JMSRouter();
        jmsRouter.setDestinationName("objectAQueue");
        jmsRouter.setBeanId("orderItem_xml");
        jmsRouter.setCorrelationIdPattern("${object.a}");
View Full Code Here

TOP

Related Classes of org.milyn.templating.freemarker.FreeMarkerTemplateProcessor$ContextClassLoaderTemplateLoader

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.