public interface TemplateHandler extends Handler<RoutingContext>
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CONTENT_TYPE
The default content type header to be used in the response
|
static String |
DEFAULT_INDEX_TEMPLATE
The default index page
|
static String |
DEFAULT_TEMPLATE_DIRECTORY
The default directory where templates will be looked for
|
Modifier and Type | Method and Description |
---|---|
static TemplateHandler |
create(TemplateEngine engine)
Create a handler
|
static TemplateHandler |
create(TemplateEngine engine,
String templateDirectory,
String contentType)
Create a handler
|
TemplateHandler |
setIndexTemplate(String indexTemplate)
Set the index template
|
static final String DEFAULT_TEMPLATE_DIRECTORY
static final String DEFAULT_CONTENT_TYPE
static final String DEFAULT_INDEX_TEMPLATE
TemplateHandler setIndexTemplate(String indexTemplate)
indexTemplate
- the index templatestatic TemplateHandler create(TemplateEngine engine)
engine
- the template enginestatic TemplateHandler create(TemplateEngine engine, String templateDirectory, String contentType)
engine
- the template enginetemplateDirectory
- the template directory where templates will be looked forcontentType
- the content type header to be used in the responseCopyright © 2022 Eclipse. All rights reserved.