Class MailConfigBuilderImpl
java.lang.Object
ch.tocco.nice2.usermanager.impl.scripting.mail.MailConfigBuilderImpl
- All Implemented Interfaces:
MailConfigBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionMailConfigBuilderImpl(EmailTemplateLoadService loadService, MailFactory mailFactory, L10N l10n, ClientType clientType) -
Method Summary
Modifier and TypeMethodDescriptionbuilds a mail from a template that can be further adjusted and needs to be sent by callingMail.send()voidsend a mail built from a template to a single recipientvoidsend a mail built from a template with a specified locale to a single recipient with some entity as sourcevoidsend a mail built from a template to a single recipient with some entity as sourcevoidsend a mail built from a template with a specified locale to a single recipientMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MailConfigBuilder
unwrap
-
Constructor Details
-
MailConfigBuilderImpl
public MailConfigBuilderImpl(EmailTemplateLoadService loadService, MailFactory mailFactory, L10N l10n, ClientType clientType)
-
-
Method Details
-
send
Description copied from interface:MailConfigBuildersend a mail built from a template to a single recipient- Specified by:
sendin interfaceMailConfigBuilder- Parameters:
templateName- the template to userecipient- the recipient
-
send
Description copied from interface:MailConfigBuildersend a mail built from a template with a specified locale to a single recipient- Specified by:
sendin interfaceMailConfigBuilder- Parameters:
templateName- the template to userecipient- the recipientlocale- the locale with which the template is processed
-
send
Description copied from interface:MailConfigBuildersend a mail built from a template to a single recipient with some entity as source- Specified by:
sendin interfaceMailConfigBuilder- Parameters:
templateName- the template to userecipient- the recipientsourceEntity- 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:MailConfigBuildersend a mail built from a template with a specified locale to a single recipient with some entity as source- Specified by:
sendin interfaceMailConfigBuilder- Parameters:
templateName- the template to userecipient- the recipientsourceEntity- the entity to be used as source for the maillocale- the locale with which the template is processed
-
create
Description copied from interface:MailConfigBuilderbuilds a mail from a template that can be further adjusted and needs to be sent by callingMail.send()- Specified by:
createin interfaceMailConfigBuilder- 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
-