Class MailConfigBuilderImpl

java.lang.Object
ch.tocco.nice2.usermanager.impl.scripting.mail.MailConfigBuilderImpl
All Implemented Interfaces:
MailConfigBuilder

@Component public class MailConfigBuilderImpl extends Object implements MailConfigBuilder
  • Constructor Details

  • Method Details

    • send

      public void send(String templateName, Entity recipient)
      Description copied from interface: MailConfigBuilder
      send a mail built from a template to a single recipient
      Specified by:
      send in interface MailConfigBuilder
      Parameters:
      templateName - the template to use
      recipient - the recipient
    • send

      public void send(String templateName, Entity recipient, Locale locale)
      Description copied from interface: MailConfigBuilder
      send a mail built from a template with a specified locale to a single recipient
      Specified by:
      send in interface MailConfigBuilder
      Parameters:
      templateName - the template to use
      recipient - the recipient
      locale - the locale with which the template is processed
    • send

      public void send(String templateName, Entity recipient, Entity sourceEntity)
      Description copied from interface: MailConfigBuilder
      send a mail built from a template to a single recipient with some entity as source
      Specified by:
      send in interface MailConfigBuilder
      Parameters:
      templateName - the template to use
      recipient - the recipient
      sourceEntity - the entity to be used as source for the mail
    • send

      public void send(String templateName, Entity recipient, @Nullable @Nullable Entity sourceEntity, @Nullable @Nullable Locale locale)
      Description copied from interface: MailConfigBuilder
      send a mail built from a template with a specified locale to a single recipient with some entity as source
      Specified by:
      send in interface MailConfigBuilder
      Parameters:
      templateName - the template to use
      recipient - the recipient
      sourceEntity - the entity to be used as source for the mail
      locale - the locale with which the template is processed
    • create

      public Mail create(String templateName) throws MailException
      Description copied from interface: MailConfigBuilder
      builds a mail from a template that can be further adjusted and needs to be sent by calling Mail.send()
      Specified by:
      create in interface MailConfigBuilder
      Parameters:
      templateName - the template to use
      Returns:
      the mail object to be configured and sent
      Throws:
      MailException - if anything goes wrong while building or sending the mail