public class DefaultTemplateManager extends Object implements ITemplateManagement
| Constructor and Description |
|---|
DefaultTemplateManager(Properties pTemplates)
This class manages the different notice types and the templates to use
with each of these types
|
DefaultTemplateManager(Properties pTemplates,
String defaultTemplatePath,
String requestTemplatePath) |
DefaultTemplateManager(String propertiesPath) |
DefaultTemplateManager(String propertiesPath,
String defaultTemplatePath,
String requestTemplatePath) |
| Modifier and Type | Method and Description |
|---|---|
Vector |
getAllTypes()
Get all the defined notice types or null if do no exist types
|
String |
getRequestTemplate()
Get the template to use with the request notices without know the type
|
Object |
getTemplate(Object noticeType)
Gets the HTML template for the specified notice type
If this template is already loaded then return it else loads it first and then return it |
protected String |
loadTemplate(String templatePath) |
void |
setTemplate(Object noticeType,
Object template,
boolean override)
Sets a new template for the specified notice type
|
public DefaultTemplateManager(Properties pTemplates)
pTemplates - public DefaultTemplateManager(Properties pTemplates, String defaultTemplatePath, String requestTemplatePath)
public DefaultTemplateManager(String propertiesPath)
public Object getTemplate(Object noticeType)
getTemplate in interface ITemplateManagementpublic void setTemplate(Object noticeType, Object template, boolean override)
ITemplateManagementsetTemplate in interface ITemplateManagementoverride - If another template exist for this notice type and override is
true then replace the previous onepublic Vector getAllTypes()
getAllTypes in interface ITemplateManagementpublic String getRequestTemplate()
ITemplateManagementgetRequestTemplate in interface ITemplateManagementCopyright © 2016 Imatia Innovation S.L.. All rights reserved.