org.keycloak.email.freemarker

## Class FreeMarkerEmailTemplateProvider

- java.lang.Object
- - org.keycloak.email.freemarker.FreeMarkerEmailTemplateProvider

- All Implemented Interfaces:
    EmailTemplateProvider, Provider

      public class FreeMarkerEmailTemplateProvider
      extends Object
      implements EmailTemplateProvider

  Author:
    Stian Thorgersen

- - ### Field Summary

    - ### Fields inherited from interface org.keycloak.email.EmailTemplateProvider

      `IDENTITY_PROVIDER_BROKER_CONTEXT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FreeMarkerEmailTemplateProvider(KeycloakSession session, FreeMarkerUtil freeMarker)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `sendConfirmIdentityBrokerLink(String link, long expirationInMinutes)` Send to confirm that user wants to link his account with identity broker link
    `void` | `sendEvent(Event event)`
    `void` | `sendExecuteActions(String link, long expirationInMinutes)` Change password email requested by admin
    `void` | `sendPasswordReset(String link, long expirationInMinutes)` Reset password sent from forgot password link on login
    `void` | `sendVerifyEmail(String link, long expirationInMinutes)`
    `EmailTemplateProvider` | `setAttribute(String name, Object value)`
    `EmailTemplateProvider` | `setRealm(RealmModel realm)`
    `EmailTemplateProvider` | `setUser(UserModel user)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FreeMarkerEmailTemplateProvider

          public FreeMarkerEmailTemplateProvider(KeycloakSession session,
                                                 FreeMarkerUtil freeMarker)

  - ### Method Detail

    - #### setRealm

          public EmailTemplateProvider setRealm(RealmModel realm)

      Specified by:
        `setRealm` in interface `EmailTemplateProvider`

    - #### setUser

          public EmailTemplateProvider setUser(UserModel user)

      Specified by:
        `setUser` in interface `EmailTemplateProvider`

    - #### setAttribute

          public EmailTemplateProvider setAttribute(String name,
                                                    Object value)

      Specified by:
        `setAttribute` in interface `EmailTemplateProvider`

    - #### sendEvent

          public void sendEvent(Event event)
                         throws EmailException

      Specified by:
        `sendEvent` in interface `EmailTemplateProvider`
      Throws:
        `EmailException`

    - #### sendPasswordReset

          public void sendPasswordReset(String link,
                                        long expirationInMinutes)
                                 throws EmailException

      Description copied from interface: `EmailTemplateProvider`
      Reset password sent from forgot password link on login
      Specified by:
        `sendPasswordReset` in interface `EmailTemplateProvider`
      Throws:
        `EmailException`

    - #### sendConfirmIdentityBrokerLink

          public void sendConfirmIdentityBrokerLink(String link,
                                                    long expirationInMinutes)
                                             throws EmailException

      Description copied from interface: `EmailTemplateProvider`
      Send to confirm that user wants to link his account with identity broker link
      Specified by:
        `sendConfirmIdentityBrokerLink` in interface `EmailTemplateProvider`
      Throws:
        `EmailException`

    - #### sendExecuteActions

          public void sendExecuteActions(String link,
                                         long expirationInMinutes)
                                  throws EmailException

      Description copied from interface: `EmailTemplateProvider`
      Change password email requested by admin
      Specified by:
        `sendExecuteActions` in interface `EmailTemplateProvider`
      Throws:
        `EmailException`

    - #### sendVerifyEmail

          public void sendVerifyEmail(String link,
                                      long expirationInMinutes)
                               throws EmailException

      Specified by:
        `sendVerifyEmail` in interface `EmailTemplateProvider`
      Throws:
        `EmailException`

    - #### close

          public void close()

      Specified by:
        `close` in interface `Provider`

Copyright © 2016 JBoss by Red Hat. All rights reserved.