Interface TemplateEngine

All Known Implementing Classes:
JavaScriptTemplateEngine, MustacheTemplateEngine, VelocityTemplateEngine

public interface TemplateEngine
Author:
jamesdbloom
  • Method Details

    • executeTemplate

      <T> T executeTemplate(String template, HttpRequest httpRequest, Class<? extends DTO<T>> dtoClass)
    • executeTemplate

      <T> T executeTemplate(String template, HttpRequest httpRequest, HttpResponse httpResponse, Class<? extends DTO<T>> dtoClass)
    • renderTemplate

      String renderTemplate(String template, HttpRequest httpRequest)
      Renders a template against the request and returns the raw rendered text, without attempting to deserialize it into an HttpResponse / HttpRequest. Used to template the contents of a FileBody so an externally stored response body can contain template placeholders. Supported by the text-based engines (Velocity, Mustache).