public interface TemplateEngine
Concrete implementations exist for several well-known template engines.
| Modifier and Type | Method and Description |
|---|---|
default boolean |
isCachingEnabled()
Returns true if the template engine caches template files.
|
default void |
render(RoutingContext context,
String templateFileName,
Handler<AsyncResult<Buffer>> handler)
Deprecated.
|
void |
render(RoutingContext context,
String templateDirectory,
String templateFileName,
Handler<AsyncResult<Buffer>> handler)
Render the template
|
@Deprecated default void render(RoutingContext context, String templateFileName, Handler<AsyncResult<Buffer>> handler)
render(RoutingContext, String, String, Handler)context - the routing contexttemplateFileName - the template file name to usehandler - the handler that will be called with a result containing the buffer or a failure.void render(RoutingContext context, String templateDirectory, String templateFileName, Handler<AsyncResult<Buffer>> handler)
NOTE if you call method directly (i.e. not using TemplateHandler) make sure
that templateFileName is sanitized via Utils.normalizePath(String)
context - the routing contexttemplateDirectory - the template directory to usetemplateFileName - the relative template file name to usehandler - the handler that will be called with a result containing the buffer or a failure.default boolean isCachingEnabled()
Copyright © 2017. All rights reserved.