public class FreeMarkerEmailTemplateProvider extends Object implements EmailTemplateProvider
| Modifier and Type | Class and Description |
|---|---|
protected class |
FreeMarkerEmailTemplateProvider.EmailTemplate |
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
attributes |
protected FreeMarkerUtil |
freeMarker |
protected RealmModel |
realm |
protected KeycloakSession |
session |
protected UserModel |
user |
IDENTITY_PROVIDER_BROKER_CONTEXT| Constructor and Description |
|---|
FreeMarkerEmailTemplateProvider(KeycloakSession session,
FreeMarkerUtil freeMarker) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected String |
getRealmName() |
protected Theme |
getTheme() |
protected FreeMarkerEmailTemplateProvider.EmailTemplate |
processTemplate(String subjectKey,
List<Object> subjectAttributes,
String template,
Map<String,Object> attributes) |
protected void |
send(Map<String,String> config,
String subject,
String textBody,
String htmlBody) |
protected void |
send(String subjectKey,
List<Object> subjectAttributes,
String template,
Map<String,Object> attributes) |
protected void |
send(String subjectKey,
String template,
Map<String,Object> attributes) |
protected void |
send(String subject,
String textBody,
String htmlBody) |
void |
sendConfirmIdentityBrokerLink(String link,
long expirationInMinutes) |
void |
sendEvent(Event event) |
void |
sendExecuteActions(String link,
long expirationInMinutes) |
void |
sendPasswordReset(String link,
long expirationInMinutes) |
void |
sendSmtpTestEmail(Map<String,String> config,
UserModel user) |
void |
sendVerifyEmail(String link,
long expirationInMinutes) |
EmailTemplateProvider |
setAttribute(String name,
Object value) |
EmailTemplateProvider |
setRealm(RealmModel realm) |
EmailTemplateProvider |
setUser(UserModel user) |
protected String |
toCamelCase(EventType event) |
protected KeycloakSession session
protected FreeMarkerUtil freeMarker
protected RealmModel realm
protected UserModel user
public FreeMarkerEmailTemplateProvider(KeycloakSession session, FreeMarkerUtil freeMarker)
public EmailTemplateProvider setRealm(RealmModel realm)
setRealm in interface EmailTemplateProviderpublic EmailTemplateProvider setUser(UserModel user)
setUser in interface EmailTemplateProviderpublic EmailTemplateProvider setAttribute(String name, Object value)
setAttribute in interface EmailTemplateProviderprotected String getRealmName()
public void sendEvent(Event event) throws EmailException
sendEvent in interface EmailTemplateProviderEmailExceptionpublic void sendPasswordReset(String link, long expirationInMinutes) throws EmailException
sendPasswordReset in interface EmailTemplateProviderEmailExceptionpublic void sendSmtpTestEmail(Map<String,String> config, UserModel user) throws EmailException
sendSmtpTestEmail in interface EmailTemplateProviderEmailExceptionpublic void sendConfirmIdentityBrokerLink(String link, long expirationInMinutes) throws EmailException
sendConfirmIdentityBrokerLink in interface EmailTemplateProviderEmailExceptionpublic void sendExecuteActions(String link, long expirationInMinutes) throws EmailException
sendExecuteActions in interface EmailTemplateProviderEmailExceptionpublic void sendVerifyEmail(String link, long expirationInMinutes) throws EmailException
sendVerifyEmail in interface EmailTemplateProviderEmailExceptionprotected void send(String subjectKey, String template, Map<String,Object> attributes) throws EmailException
EmailExceptionprotected FreeMarkerEmailTemplateProvider.EmailTemplate processTemplate(String subjectKey, List<Object> subjectAttributes, String template, Map<String,Object> attributes) throws EmailException
EmailExceptionprotected Theme getTheme() throws IOException
IOExceptionprotected void send(String subjectKey, List<Object> subjectAttributes, String template, Map<String,Object> attributes) throws EmailException
EmailExceptionprotected void send(String subject, String textBody, String htmlBody) throws EmailException
EmailExceptionprotected void send(Map<String,String> config, String subject, String textBody, String htmlBody) throws EmailException
EmailExceptionCopyright © 2017 JBoss by Red Hat. All rights reserved.