public class TemplateManager extends Object
Constructor and Description |
---|
TemplateManager(AlertConfiguration alertCfg)
Construct new template manager object
|
Modifier and Type | Method and Description |
---|---|
String |
processTemplate(String templateName,
HashMap<String,Object> variables)
Create processed template using supplied template name and template variables
|
void |
validate()
Validate TemplateManager by checking that all registered templates can be found.
|
public TemplateManager(AlertConfiguration alertCfg)
alertCfg
- AlertConfigurationpublic String processTemplate(String templateName, HashMap<String,Object> variables) throws IOException, freemarker.template.MalformedTemplateNameException, freemarker.template.TemplateException, freemarker.template.TemplateNotFoundException
templateName
- Name of template filevariables
- Variables for templateIOException
- IOExceptionfreemarker.template.MalformedTemplateNameException
- MalformedTemplateNameExceptionfreemarker.template.TemplateException
- TemplateExceptionfreemarker.template.TemplateNotFoundException
- TemplateNotFoundExceptionpublic void validate() throws freemarker.template.TemplateNotFoundException, freemarker.template.MalformedTemplateNameException, IOException
freemarker.template.TemplateNotFoundException
- TemplateNotFoundExceptionfreemarker.template.MalformedTemplateNameException
- MalformedTemplateNameExceptionIOException
- IOExceptionCopyright © 2022. All rights reserved.