Package groovy.text

Examples of groovy.text.SimpleTemplateEngine$SimpleTemplate


                String groovyClosures = new String(IOUtilities.inputStreamToBytes(in));

                cmd = "<% " + groovyClosures + " %>" + cmd;

                // Create Groovy Standard Template
                SimpleTemplateEngine engine = new SimpleTemplateEngine();
                resolvedTemplate = engine.createTemplate(cmd);
            }

            // Do normal Groovy substitutions.
            return resolvedTemplate.make(args).toString();
        }
View Full Code Here


        new HtmlAnalytics(new CsvReportLoader(input, new CsvReport()).load()).toHtmlReport(output);
    }

    public void toHtmlReport(Path filename) {
        SimpleTemplateEngine engine = new SimpleTemplateEngine();

        Path templatePath = ClasspathHelper.getFilesystemPathFromClasspathPath("/betsy/common/analytics/html/HtmlAnalytics.template");

        try {
            Writable template = engine.createTemplate(templatePath.toFile()).make(getTemplateBinding());
            FileTasks.createFile(filename, template.toString());
        } catch (ClassNotFoundException | IOException e) {
            throw new RuntimeException("could not load template", e);
        }
View Full Code Here

                IOUtilities.close(in);

                cmd = "<% " + groovyClosures + " %>" + cmd;

                // Create Groovy Standard Template
                SimpleTemplateEngine engine = new SimpleTemplateEngine();
                resolvedTemplate = engine.createTemplate(cmd);
            }

            // Do normal Groovy substitutions.
            return resolvedTemplate.make(args).toString();
        }
View Full Code Here

TOP

Related Classes of groovy.text.SimpleTemplateEngine$SimpleTemplate

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.