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. |
Type |
buildMessage(Profile recipient)
Deprecated.
|
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()
@Deprecated Type buildMessage(Profile recipient) throws MailingException
recipient given as argument.
disposed an
IllegalStateException is thrown.recipient - to build a message fornull 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.
Use buildMessage(org.apache.jackrabbit.api.security.user.Authorizable, com.adobe.granite.security.user.UserProperties)Type buildMessage(Authorizable recipient, UserProperties userProperties) throws MailingException, RepositoryException
recipient given as argument.
disposed an
IllegalStateException is thrown.recipient - to build a message foruserPorperties - 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.RepositoryExceptionvoid 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 - 2018 Adobe Systems Incorporated. All Rights Reserved"