io.vertx.ext.web.templ

## Interface TemplateEngine

- All Superinterfaces:
    TemplateEngine

  Deprecated.

      @Deprecated
      public interface TemplateEngine
      extends TemplateEngine

  A template engine uses a specific template and the data in a routing context to render a resource into a buffer.

  Concrete implementations exist for several well-known template engines.

  Author:
    Tim Fox

- - ### Method Summary

    All Methods Instance Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `default boolean` | `isCachingEnabled()` Deprecated. Returns true if the template engine caches template files.
    `default void` | `render(RoutingContext context, String templateFileName, Handler<AsyncResult<Buffer>> handler)` Deprecated. use `render(RoutingContext, String, String, Handler)`
    `default void` | `render(RoutingContext context, String templateDirectory, String templateFileName, Handler<AsyncResult<Buffer>> handler)` Deprecated.

    - ### Methods inherited from interface io.vertx.ext.web.common.template.TemplateEngine

      `render, render`

- - ### Method Detail

    - #### render

          @Deprecated
          default void render(RoutingContext context,
                                          String templateFileName,
                                          Handler<AsyncResult<Buffer>> handler)

      Deprecated. use `render(RoutingContext, String, String, Handler)`
      Render the template
      Parameters:
        `context` - the routing context
        `templateFileName` - the template file name to use
        `handler` - the handler that will be called with a result containing the buffer or a failure.

    - #### render

          @Deprecated
          default void render(RoutingContext context,
                                          String templateDirectory,
                                          String templateFileName,
                                          Handler<AsyncResult<Buffer>> handler)

      Deprecated.
      Render the template

      NOTE if you call method directly (i.e. not using `TemplateHandler`) make sure that templateFileName is sanitized via `io.vertx.ext.web.impl.Utils#normalizePath(String)`

      Parameters:
        `context` - the routing context
        `templateDirectory` - the template directory to use
        `templateFileName` - the relative template file name to use
        `handler` - the handler that will be called with a result containing the buffer or a failure.

    - #### isCachingEnabled

          default boolean isCachingEnabled()

      Deprecated.
      Returns true if the template engine caches template files. If false, then template files are freshly loaded each time they are used.
      Specified by:
        `isCachingEnabled` in interface `TemplateEngine`
      Returns:
        True if template files are cached; otherwise, false.

Copyright © 2020 Eclipse. All rights reserved.