Interface TemplateEngine

All Known Implementing Classes:
FreemarkerEngine

public interface TemplateEngine
  • Method Details

    • process

      String process(Nice2Template template) throws TemplateException
      process a Nice2Template
      Parameters:
      template - a fully configured Nice2Template
      Returns:
      a String containing the processed template.
      Throws:
      TemplateException
    • createTemplate

      Nice2Template createTemplate()
      Returns:
      create a new Template for the Template Engine
    • stream

      com.google.common.io.FileBackedOutputStream stream(Nice2Template nice2Template) throws TemplateException
      stream the output of a processed Nice2Template into a new FileBackedOutputStream
      Parameters:
      nice2Template - a fully configured Nice2Template
      Throws:
      TemplateException
    • stream

      void stream(Nice2Template nice2Template, OutputStream stream) throws TemplateException
      Stream the output of a processed Nice2Template into a provided OutputStream
      Parameters:
      nice2Template - a fully configured Nice2Template
      stream - an OutputStream to write to
      Throws:
      TemplateException