public interface TemplateEngine
| Modifier and Type | Method and Description |
|---|---|
String |
getTemplateName(String templateName)
Checks if a given template name has the current suffix and sets is
if it does not exist
|
String |
render(Flash flash,
Session session,
Form form,
Messages messages,
String templatePath,
Map<String,Object> content)
Renders a template for a specific controller class and method
|
String |
render(String pathPrefix,
String templateName,
Map<String,Object> content)
Renders a template for a specific controller class and method
|
String |
renderException(io.undertow.server.HttpServerExchange exchange,
Throwable cause,
boolean templateException)
When in dev mode, this method is used to pass the framework exception to the frontend
|
String render(Flash flash, Session session, Form form, Messages messages, String templatePath, Map<String,Object> content) throws MangooTemplateEngineException
flash - The current flashsession - The current sessionform - The current Formmessages - The current messagestemplatePath - The path to the template to rendercontent - The content map which is passed to the templateMangooTemplateEngineException - MangooTemplateEngineExceptionString render(String pathPrefix, String templateName, Map<String,Object> content) throws MangooTemplateEngineException
pathPrefix - A path prefix for the templatetemplateName - The path to the template to rendercontent - The content map which is passed to the templateMangooTemplateEngineException - MangooTemplateEngineExceptionString renderException(io.undertow.server.HttpServerExchange exchange, Throwable cause, boolean templateException) throws MangooTemplateEngineException
exchange - A HttpServerExchange instancecause - The throwable causetemplateException - True if the exceptions occurs during exception rendering, false otherwiseMangooTemplateEngineException - MangooTemplateEngineExceptionCopyright © 2016. All rights reserved.