Package net.pterodactylus.util.template

Examples of net.pterodactylus.util.template.Template.render()


      templateContext.set("currentEdition", core.getUpdateChecker().getLatestEdition());
      templateContext.set("version", SonePlugin.VERSION);
      StringWriter writer = new StringWriter();
      StringBucket bucket = null;
      try {
        template.render(templateContext, writer);
        bucket = new StringBucket(writer.toString(), utf8Charset);
        return new ManifestElement(name, bucket, contentType, bucket.size());
      } catch (TemplateException te1) {
        logger.log(Level.SEVERE, String.format("Could not render template ā€œ%sā€!", templateName), te1);
        return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.