Search in sources :

Example 1 with EventBean

use of org.keycloak.email.freemarker.beans.EventBean in project keycloak by keycloak.

the class FreeMarkerEmailTemplateProvider method sendEvent.

@Override
public void sendEvent(Event event) throws EmailException {
    Map<String, Object> attributes = new HashMap<>();
    attributes.put("user", new ProfileBean(user));
    attributes.put("event", new EventBean(event));
    send(toCamelCase(event.getType()) + "Subject", "event-" + event.getType().toString().toLowerCase() + ".ftl", attributes);
}
Also used : ProfileBean(org.keycloak.email.freemarker.beans.ProfileBean) EventBean(org.keycloak.email.freemarker.beans.EventBean) HashMap(java.util.HashMap)

Aggregations

HashMap (java.util.HashMap)1 EventBean (org.keycloak.email.freemarker.beans.EventBean)1 ProfileBean (org.keycloak.email.freemarker.beans.ProfileBean)1