public class TemplateService
extends java.lang.Object
This class provides the webpage templates for the business logic for various views such as table, forms and views. A template file is located within the business logic under [root]/resources/template/[filename].ftl. Each template file contains a single part of a webpage, e.g. you can have a template file for navigation (nav.ftl), header (header.ftl), footer (footer.ftl), and content (table.ftl). The template definition follows the syntax of the Apache Freemarker. See Apache FreeMarker Manual.
Modifier and Type | Field and Description |
---|---|
static freemarker.template.Configuration |
freemarkerConfig |
java.util.HashMap<java.lang.String,java.lang.String> |
pluginMap |
Constructor and Description |
---|
TemplateService(java.util.HashMap<java.lang.String,java.lang.String> pluginMap)
Private constructor
|
Modifier and Type | Method and Description |
---|---|
freemarker.template.Configuration |
getInstance()
Get instance
|
freemarker.template.Template |
getTemplate(java.lang.String templateName)
Get template instance
|
public static freemarker.template.Configuration freemarkerConfig
public java.util.HashMap<java.lang.String,java.lang.String> pluginMap
public TemplateService(java.util.HashMap<java.lang.String,java.lang.String> pluginMap)
pluginMap
- the plugin mappublic freemarker.template.Configuration getInstance()
Configuration
instancepublic freemarker.template.Template getTemplate(java.lang.String templateName)
templateName
- the template nameTemplate
object if exists; otherwise null
Copyright © 2019 Citunius GmbH. All Rights Reserved.