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