public interface MessageTemplate<Type>
MessageGateway
. com.day.cq.mailer.impl.Mailing
Modifier and Type | Method and Description |
---|---|
Type |
buildMessage(Authorizable recipient,
UserProperties userProperties)
Builds a personalized message for the
recipient given as argument. |
void |
dispose()
Called if the Template will not be used any longer.
|
java.lang.Class<Type> |
getType() |
void |
put(java.lang.String var,
java.lang.String replace)
Adds or overwrites a mapping of this replacer.
|
java.lang.Class<Type> getType()
Type buildMessage(Authorizable recipient, UserProperties userProperties) throws MailingException, RepositoryException
recipient
given as argument.
disposed
an
IllegalStateException
is thrown.recipient
- to build a message foruserProperties
- used to build the message for the recipient.null
if the
MailingRecipient does not provide sufficient data to build a
Message (eg. no e-mail address to build a e-mail Message)MailingException
- in case of an error building the message that is
independent of the MailingRecipient eg. access to template storage
is in exceptional state.java.lang.IllegalStateException
- in case method dispose
has been called before.RepositoryException
- If an error occurs.void dispose() throws MailingException
buildMessage
will fail.
Implementations can dispose any used Resources eg.
Binary Values
, Database access.MailingException
- in case of exception disposing one of the resourcesvoid put(java.lang.String var, java.lang.String replace)
var
- name of the variable to mapreplace
- the value of the variable"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"