public class TemplateManager extends Object
Constructor and Description |
---|
TemplateManager()
Create a new instance
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCoreTemplates(Map<String,String> templateMapping)
Add the core templates
|
String |
getTemplate(String templateName)
Return the location of the template file for a given template name
|
String[] |
getTemplateNames() |
void |
registerTemplate(String providerId,
String templateName,
String templateLocation)
Register a template.
|
void |
unregisterTemplates(String providerId)
Unregister all templates previously registered for a given provider.
|
protected void addCoreTemplates(Map<String,String> templateMapping)
templateMapping
- a mapping from template key to template file where the templates should be added
topublic String getTemplate(String templateName)
templateName
- the name of the template to retrievepublic String[] getTemplateNames()
public void registerTemplate(String providerId, String templateName, String templateLocation)
providerId
- ID that identifies the owner/provider of the template, this is usually the ID of a
plugin.templateName
- the template nametemplateLocation
- the file location of the template. The location can be relative if the template
rendering engine knows how to resolve the full path.public void unregisterTemplates(String providerId)
providerId
- ID that identifies the owner/provider of the templatesCopyright © 2019 Communote team. All rights reserved.