public class PersonalizedContentManagedEmailContent extends java.lang.Object implements PersonalizedEmailContent
PersonalizedEmailContent
which uses the e-mail template to
fetch the personalized e-mail message content. This class is intended for use when an
e-mail template is to be the source of e-mail content.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
Copyright.
|
Constructor and Description |
---|
PersonalizedContentManagedEmailContent(Recipient recipient)
Constructor that initializes this instance with a Recipient.
|
PersonalizedContentManagedEmailContent(Recipient recipient,
java.lang.String messageId)
Constructor that initializes this instance with a Recipient and a messageId.
|
PersonalizedContentManagedEmailContent(java.lang.String messageId)
Constructor that initializes this instance with an e-mail template ID ( messageId ).
|
Modifier and Type | Method and Description |
---|---|
com.ibm.commerce.command.CommandContext |
getCommandContext()
Returns the CommandContext, used by the tag engine implementation for
parsing the content of e-mail message.
|
java.lang.String |
getContent()
Gets the content of the e-mail message by parsing the content
present in the emailContent table, corresponding to this e-mail template ID.
|
java.lang.String |
getEmailTemplate()
This method help to get the email template.
|
java.lang.String |
getMessageId()
Gets the messageId (email template Id) used to read e-mail content.
|
Recipient |
getRecipient()
Gets the recipient for whom the e-mail will be personalized.
|
boolean |
getSendEmail()
This method gets the setting whether the e-mail should be sent to the customer.
|
java.lang.String |
getSubject()
Gets the subject corresponding to this template ID.
|
java.util.Map |
getTagNameValueMapFromTemplateParsing()
This method help to get the name / value map for the tags in the content.
|
void |
init()
This method help to initialise the plain text for the message subject & message content,
This method need only run once just after the email content object just been created,
or do lazy initialisation.
|
void |
setCommandContext(com.ibm.commerce.command.CommandContext cc)
Sets the Command Context, which will be used by the TagEngine while parsing
the e-mail content.
|
void |
setMessageId(java.lang.String messageId)
Sets the messageId that will be used to fetch the content of the e-mail.
|
void |
setRecipient(Recipient recipient)
Sets the recipient for whom the e-mail will be personalized.
|
void |
setSendEmail(boolean newSendEmail)
This method sets whether the e-mail should be sent to the customer.
|
void |
setTagParameters(java.lang.String tagParamName,
java.lang.String tagParamValue)
Sets a name/value pair which will be added to the tag parameters, which
will then be used while parsing the contents of e-mail template
|
public static final java.lang.String COPYRIGHT
public PersonalizedContentManagedEmailContent(Recipient recipient)
recipient
- public PersonalizedContentManagedEmailContent(Recipient recipient, java.lang.String messageId)
recipient
- the Recipient
for whom the content will be personalized.messageId
- the e-mail template ID to use for retrieving content of the e-mail.public PersonalizedContentManagedEmailContent(java.lang.String messageId)
messageId
- The messageId (email template ID) to use when fetching e-mail content
for the given recipient.public com.ibm.commerce.command.CommandContext getCommandContext()
public java.lang.String getContent()
getContent
in interface EmailContent
public java.lang.String getEmailTemplate()
public java.lang.String getMessageId()
public Recipient getRecipient()
getRecipient
in interface PersonalizedEmailContent
Recipient
.public boolean getSendEmail()
getSendEmail
in interface PersonalizedEmailContent
public java.lang.String getSubject()
getSubject
in interface EmailContent
public java.util.Map getTagNameValueMapFromTemplateParsing()
public void init()
public void setCommandContext(com.ibm.commerce.command.CommandContext cc)
cc
- CommandContextpublic void setMessageId(java.lang.String messageId)
messageId
- the e-mail template ID to use.public void setRecipient(Recipient recipient)
setRecipient
in interface PersonalizedEmailContent
recipient
- the Recipient
.public void setSendEmail(boolean newSendEmail)
getSubject
or getContent
methods.newSendEmail
- Set to false if the e-mail should not be sent.public void setTagParameters(java.lang.String tagParamName, java.lang.String tagParamValue)
tagParamName
- the name of the name/value pair to add to the tag Parameters.tagParamValue
- the value of the name/value pair to add to the tag Parameters.