TemplateService

public interface TemplateService

Template service, manages SMS Templates. A template represents the way all users connect to an SMS provider. See org.motechproject.sms.templates.Template

Methods

allTemplatesForWeb

Map<String, TemplateForWeb> allTemplatesForWeb()

Retrieves all templates as objects for the UI display.

Returns:map of the template representations, where keys are the names of the templates

getTemplate

Template getTemplate(String name)

Retrieves the template with the given name.

Parameters:
  • name – the name of the template
Throws:
Returns:

the template with the matching name, never null

importTemplate

void importTemplate(Template template)

Imports the custom provider template provided by the user. This template will be added to the additional templates configuration.

Parameters:
  • template – the template to import

importTemplates

void importTemplates(List<Template> templateList)

Imports the custom provider templates provided by the user. These templates will be added to the additional templates configuration.

Parameters:
  • templateList – the templates to import