Interface MailGenerator
-
- All Known Implementing Classes:
FreemarkerMailGenerator
public interface MailGenerator
Mail generator component.- Author:
- Brett Porter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
generateMail(String templateName, Locale locale, AuthenticationKey authenticationKey, String baseUrl)
Generates a mail string from a template.String
generateMail(String templateName, Locale locale, AuthenticationKey authenticationKey, String baseUrl, Map<String,Object> templateData)
Generates a mail string from a template.String
generateMail(String templateName, AuthenticationKey authkey, String baseUrl)
Generates a mail string from a template.
-
-
-
Method Detail
-
generateMail
String generateMail(String templateName, AuthenticationKey authkey, String baseUrl)
Generates a mail string from a template. How the template will be located depends on the underlying implementation. It uses a default locale.- Parameters:
templateName
- the template name without extensionauthkey
- the authentication key of the current userbaseUrl
- the base url- Returns:
- A string for the mail body generated from the template
-
generateMail
String generateMail(String templateName, Locale locale, AuthenticationKey authenticationKey, String baseUrl)
Generates a mail string from a template. The given locale is used for retrieving the template. How the template will be located depends on the underlying implementation.- Parameters:
templateName
- the template name without extensionlocale
- the locale used to find the template fileauthenticationKey
- the authentication key of the current userbaseUrl
- the base url- Returns:
- a string for the mail body generated from the template
-
generateMail
String generateMail(String templateName, Locale locale, AuthenticationKey authenticationKey, String baseUrl, Map<String,Object> templateData)
Generates a mail string from a template. The given locale is used for retrieving the template. How the template will be located depends on the underlying implementation. The templateData is used as model data that is interpolated from the template.- Parameters:
templateName
- the template name without extensionlocale
- the locale used to find the template fileauthenticationKey
- the authentication key of the current userbaseUrl
- the base urltemplateData
- additional data used for interpolation in the template- Returns:
- a string for the mail body generated from the template
-
-