Interface TemplateProcessor

All Known Implementing Classes:
AbstractTemplateProcessor, FTLTemplateProcessor

public interface TemplateProcessor
Web Script Template Processor
Author:
davidc
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the default encoding
    boolean
    hasTemplate(String template)
    Determines if a template exists
    void
    process(String template, Object model, Writer out)
    Process a template against the supplied data model and write to the out.
    void
    processString(String template, Object model, Writer out)
    Process a string template against the supplied data model and write to the out.
    void
    Reset the Template Processor
  • Method Details

    • hasTemplate

      boolean hasTemplate(String template)
      Determines if a template exists
      Parameters:
      template - String
      Returns:
      true => exists
    • process

      void process(String template, Object model, Writer out)
      Process a template against the supplied data model and write to the out.
      Parameters:
      template - Template name/path
      model - Object model to process template against
      out - Writer object to send output too
    • processString

      void processString(String template, Object model, Writer out)
      Process a string template against the supplied data model and write to the out.
      Parameters:
      template - Template string
      model - Object model to process template against
      out - Writer object to send output too
    • getDefaultEncoding

      String getDefaultEncoding()
      Gets the default encoding
      Returns:
      default encoding
    • reset

      void reset()
      Reset the Template Processor