public class StoreEmailTools
extends atg.nucleus.logging.ApplicationLoggingImpl
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
EMAIL_SUBJECT
Resource key for e-mail subject.
|
static java.lang.String |
MSG_EMPTY_MESSAGE
Empty message body message key.
|
static java.lang.String |
MSG_EMPTY_SUBJECT
Subject is empty message key.
|
static java.lang.String |
MSG_ERR_BAD_EMAIL
Invalid e-mail address constant.
|
static java.lang.String |
MSG_ERR_CREATING_EMAIL_RECIPIENT
Error creating e-mail recipient message key.
|
static java.lang.String |
MSG_INVALID_RECIPIENT_EMAIL
Invalid recipient address message key.
|
static java.lang.String |
MSG_INVALID_RECIPIENT_EMAIL_FORMAT
Resource key for invalid recipient e-mail format.
|
static java.lang.String |
MSG_INVALID_SENDER_EMAIL
Invalid sender message key.
|
static java.lang.String |
MSG_INVALID_SENDER_EMAIL_FORMAT
Resource key for invalid sender e-mail format.
|
static java.lang.String |
MSG_NO_EMAIL_HOST_NAME
Host name is missing message key.
|
static java.lang.String |
MSG_NO_RECIPIENT_EMAIL
Missing recipient address message key.
|
static java.lang.String |
MSG_NO_SENDER_EMAIL
No sender address message key.
|
static java.lang.String |
MSG_NO_SENDER_FIRST_NAME
Sender first name is missing message key.
|
static java.lang.String |
MSG_NO_SENDER_LAST_NAME
Sender last name is missing message key.
|
protected StoreSitePropertiesManager |
mStoreSitePropertiesManager |
static int |
STATUS_ERROR_REDIRECT
Constant used to indicate that the form has errors, and that the form
should perform a redirect.
|
static int |
STATUS_ERROR_STAY
Constant used to indicate that the form has errors, and that the form
should not perform a redirect.
|
static int |
STATUS_SUCCESS
Constant used to indicate that the form has no errors.
|
Constructor and Description |
---|
StoreEmailTools() |
Modifier and Type | Method and Description |
---|---|
protected java.util.List |
addRecipients(atg.userprofiling.Profile pProfile,
atg.userprofiling.email.TemplateEmailInfoImpl pEmailInfo)
Returns list of recipients
|
java.lang.String |
createQualifiedString(java.lang.String pName,
java.lang.String pEmail)
Create string of view:
pName <pEmail > |
java.lang.String |
createSender(java.lang.String pFirstName,
java.lang.String pLastName,
java.lang.String pEmail)
Compose the sender tag as: pFirstName pLastName
|
atg.repository.MutableRepository |
getCatalogRepository()
Gets the value of the catalogRepository field.
|
atg.userprofiling.email.TemplateEmailInfo |
getDefaultEmailInfo()
Gets the default email information.
|
java.lang.String |
getDefaultLocaleString() |
java.lang.String |
getDisplayNamePropertyName()
Gets the name of the Display Name property.
|
java.util.ResourceBundle |
getEmailAFriendResourceBundle() |
java.lang.String |
getEmailAFriendResourceBundleName() |
atg.userprofiling.email.TemplateEmailSender |
getEmailSender()
Gets the email send component.
|
java.lang.String |
getLocaleParamName() |
java.lang.String |
getMessageParamName()
Gets the name of the parameter used for the Message: field.
|
atg.repository.MutableRepository |
getOrderRepository()
Gets the value of the orderRepository field.
|
java.lang.String |
getProductIdParamName()
Gets the name of the parameter used for the ProductId: field.
|
java.lang.String |
getProductItemName()
Gets the name of the product item.
|
java.lang.String |
getProfileParamName()
Gets the name of the parameter used to send the current user profile to the
template.
|
StoreProfileTools |
getProfileTools() |
java.util.List<java.lang.String> |
getPromoTemplateUrls() |
StorePropertyManager |
getPropertyManager() |
java.lang.String |
getRecipientEmailParamName()
Gets the name of the Email value used for the To: field.
|
java.lang.String |
getRecipientNameParamName()
Gets the name of the Name value used for the To: field.
|
java.lang.String |
getSenderEmailParamName()
Gets the name of the Email value used for the From: field.
|
java.lang.String |
getSenderNameParamName()
Gets the name of the Name value used for the From: field.
|
java.lang.String |
getSiteIdParamName() |
java.lang.String |
getStoreNameResource() |
StoreSitePropertiesManager |
getStoreSitePropertiesManager() |
protected java.lang.String |
getSubject(java.lang.String pProductId)
Compute the subject for the email message with Product Name as part of
subject.
|
java.lang.String |
getSubjectParamName()
Gets the name of the parameter used for the Subject: field.
|
java.lang.String |
getTemplateUrl()
Gets the URL for the email template used to send the email.
|
java.lang.String |
getTemplateUrlName() |
javax.transaction.TransactionManager |
getTransactionManager()
Transaction Manager
|
boolean |
isPersistEmails() |
boolean |
isSendEmailInSeparateThread() |
atg.userprofiling.email.TemplateEmailInfoImpl |
prepareEmailInfo(java.util.Map pEmailParams)
Prepare email info template.
|
java.util.Map |
prepareEmailInfoParams(atg.userprofiling.Profile pProfile,
atg.userprofiling.email.TemplateEmailInfoImpl pEmailInfo,
java.util.Map pEmailParams)
Prepare email parameters before sending
|
void |
sendEmail(atg.userprofiling.Profile pProfile,
java.util.Map pEmailParams)
Prepare email and send it.
|
void |
setCatalogRepository(atg.repository.MutableRepository pCatalogRepository)
Sets the value of the catalogRepository: field.
|
void |
setDefaultEmailInfo(atg.userprofiling.email.TemplateEmailInfo pDefaultEmailInfo)
Sets the default email information.
|
void |
setDefaultLocale(java.lang.String pDefaultLocale) |
void |
setDisplayNamePropertyName(java.lang.String pDisplayNamePropertyName)
Sets the name of the Display Name property.
|
void |
setEmailAFriendResourceBundleName(java.lang.String pEmailAFriendResourceBundleName) |
void |
setEmailSender(atg.userprofiling.email.TemplateEmailSender pEmailSender)
Sets the email send component.
|
void |
setLocaleParamName(java.lang.String pLocaleParamName) |
void |
setMessageParamName(java.lang.String pMessageParamName)
Sets the name of the parameter used for the Message: field.
|
void |
setOrderRepository(atg.repository.MutableRepository pOrderRepository)
Sets the value of the orderRepository: field.
|
void |
setPersistEmails(boolean pPersistEmails)
Sets boolean indicating whether the email is persisted before it is sent.
|
void |
setProductIdParamName(java.lang.String pProductIdParamName)
Sets the name of the parameter used for the ProductId: field.
|
void |
setProductItemName(java.lang.String pProductItemName)
Sets the name of the product item.
|
void |
setProfileParamName(java.lang.String pProfileParamName)
Sets the name of the parameter used to send the current user profile to the
template.
|
void |
setProfileTools(StoreProfileTools pProfileTools) |
void |
setPromoTemplateUrls(java.util.List<java.lang.String> pPromoTemplateUrls) |
void |
setPropertyManager(StorePropertyManager pPropertyManager) |
void |
setRecipientEmailParamName(java.lang.String pRecipientEmailParamName)
Sets the name of the Email value used for the To: field.
|
void |
setRecipientNameParamName(java.lang.String pRecipientNameParamName)
Sets the name of the Name value used for the To: field.
|
void |
setSendEmailInSeparateThread(boolean pSendEmailInSeparateThread)
Sets boolean indicating whether the email is sent in a separate thread.
|
void |
setSenderEmailParamName(java.lang.String pSenderEmailParamName)
Sets the name of the Email value used for the From: field.
|
void |
setSenderNameParamName(java.lang.String pSenderNameParamName)
Sets the name of the Name value used for the From: field.
|
void |
setSiteIdParamName(java.lang.String pSiteIdParamName)
The siteId parameter name - it represents the Site ID from which the email is dispatched
parameter to be used in Email template
|
void |
setStoreNameResource(java.lang.String pStoreNameResource) |
void |
setStoreSitePropertiesManager(StoreSitePropertiesManager pStoreSitePropertiesManager) |
void |
setSubjectParamName(java.lang.String pSubjectParamName)
Sets the name of the parameter used for the Subject: field.
|
void |
setTemplateUrl(java.lang.String pTemplateUrl)
Sets the URL for the email template used to send the email.
|
void |
setTemplateUrlName(java.lang.String pTemplateUrlName) |
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets the Transaction Manager.
|
boolean |
validateEmailAddress(java.lang.String pEmailAddress)
Check to see if Email format is correct.
|
addGlobalLogListeners, addLogListener, getLoggingForVlogging, getLoggingIdentifer, getLoggingIdentifier, getLogListenerCount, getLogListeners, initializeFromServiceEvent, isAutoInitListeners, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, removeLogListener, sendLogEvent, setAutoInitListeners, setLoggingDebug, setLoggingError, setLoggingIdentifier, setLoggingInfo, setLoggingTrace, setLoggingWarning
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
public static final int STATUS_SUCCESS
public static final int STATUS_ERROR_STAY
public static final int STATUS_ERROR_REDIRECT
public static final java.lang.String MSG_INVALID_RECIPIENT_EMAIL_FORMAT
public static final java.lang.String MSG_INVALID_SENDER_EMAIL_FORMAT
public static final java.lang.String EMAIL_SUBJECT
public static final java.lang.String MSG_ERR_BAD_EMAIL
public static final java.lang.String MSG_ERR_CREATING_EMAIL_RECIPIENT
public static final java.lang.String MSG_NO_SENDER_EMAIL
public static final java.lang.String MSG_INVALID_SENDER_EMAIL
public static final java.lang.String MSG_NO_RECIPIENT_EMAIL
public static final java.lang.String MSG_INVALID_RECIPIENT_EMAIL
public static final java.lang.String MSG_EMPTY_MESSAGE
public static final java.lang.String MSG_NO_EMAIL_HOST_NAME
public static final java.lang.String MSG_NO_SENDER_FIRST_NAME
public static final java.lang.String MSG_NO_SENDER_LAST_NAME
public static final java.lang.String MSG_EMPTY_SUBJECT
protected StoreSitePropertiesManager mStoreSitePropertiesManager
public StoreProfileTools getProfileTools()
public void setProfileTools(StoreProfileTools pProfileTools)
pProfileTools
- - profile tools.public java.lang.String getDefaultLocaleString()
public void setDefaultLocale(java.lang.String pDefaultLocale)
pDefaultLocale
- the String to setpublic void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
pTransactionManager
- transactionManager to setpublic javax.transaction.TransactionManager getTransactionManager()
public java.lang.String getRecipientNameParamName()
public void setRecipientNameParamName(java.lang.String pRecipientNameParamName)
pRecipientNameParamName
- -
the name of the Name value used for the To: field.public java.lang.String getRecipientEmailParamName()
public void setRecipientEmailParamName(java.lang.String pRecipientEmailParamName)
pRecipientEmailParamName
- -
the name of the Email value used for the To: field.public java.lang.String getSenderNameParamName()
public void setSenderNameParamName(java.lang.String pSenderNameParamName)
pSenderNameParamName
- -
the name of the Name value used for the From: field.public java.lang.String getSenderEmailParamName()
public void setSenderEmailParamName(java.lang.String pSenderEmailParamName)
pSenderEmailParamName
- -
the name of the Email value used for the From: field.public java.lang.String getMessageParamName()
public void setMessageParamName(java.lang.String pMessageParamName)
pMessageParamName
- -
the name of the parameter used for the Comment: field.public java.lang.String getProductIdParamName()
public void setProductIdParamName(java.lang.String pProductIdParamName)
pProductIdParamName
- -
the name of the parameter used for the ProductId: field.public java.lang.String getSubjectParamName()
public void setSubjectParamName(java.lang.String pSubjectParamName)
pSubjectParamName
- -
the name of the parameter used for the Subject: field.public java.lang.String getProfileParamName()
public void setProfileParamName(java.lang.String pProfileParamName)
pProfileParamName
- The name of the parameter used to send the current user profile to
the template.public void setLocaleParamName(java.lang.String pLocaleParamName)
pLocaleParamName
- -
locale parameter name.public java.lang.String getLocaleParamName()
public void setDefaultEmailInfo(atg.userprofiling.email.TemplateEmailInfo pDefaultEmailInfo)
pDefaultEmailInfo
- -
the default email informationpublic atg.userprofiling.email.TemplateEmailInfo getDefaultEmailInfo()
public void setTemplateUrl(java.lang.String pTemplateUrl)
pTemplateUrl
- -
the URLpublic java.lang.String getTemplateUrl()
public void setSendEmailInSeparateThread(boolean pSendEmailInSeparateThread)
pSendEmailInSeparateThread
- boolean indicating whether the email is sent in a separate thread.public boolean isSendEmailInSeparateThread()
public void setPersistEmails(boolean pPersistEmails)
pPersistEmails
- boolean indicating whether the email is persisted before it is
sent.public boolean isPersistEmails()
public void setEmailSender(atg.userprofiling.email.TemplateEmailSender pEmailSender)
pEmailSender
- -
the email send componentpublic atg.userprofiling.email.TemplateEmailSender getEmailSender()
public java.lang.String getProductItemName()
public void setProductItemName(java.lang.String pProductItemName)
pProductItemName
- -
the name of the product item.public atg.repository.MutableRepository getCatalogRepository()
public void setCatalogRepository(atg.repository.MutableRepository pCatalogRepository)
pCatalogRepository
- -
the value of the catalogRepository: field.public atg.repository.MutableRepository getOrderRepository()
public void setOrderRepository(atg.repository.MutableRepository pOrderRepository)
pOrderRepository
- -
the value of the orderRepository: field.public java.lang.String getStoreNameResource()
public void setStoreNameResource(java.lang.String pStoreNameResource)
pStoreNameResource
- The storeNameResource to set.public java.lang.String getDisplayNamePropertyName()
public void setDisplayNamePropertyName(java.lang.String pDisplayNamePropertyName)
pDisplayNamePropertyName
- -
the name of the Display Name property.public java.lang.String getEmailAFriendResourceBundleName()
public void setEmailAFriendResourceBundleName(java.lang.String pEmailAFriendResourceBundleName)
pEmailAFriendResourceBundleName
- -
the location of the Email a Friend resource bundle.public java.util.ResourceBundle getEmailAFriendResourceBundle()
public void setSiteIdParamName(java.lang.String pSiteIdParamName)
pSiteIdParamName
- siteId parameter namepublic java.lang.String getSiteIdParamName()
public java.lang.String getTemplateUrlName()
public void setTemplateUrlName(java.lang.String pTemplateUrlName)
pTemplateUrlName
- the String to setpublic StoreSitePropertiesManager getStoreSitePropertiesManager()
public void setStoreSitePropertiesManager(StoreSitePropertiesManager pStoreSitePropertiesManager)
pStoreSitePropertiesManager
- the StoreSitePropertiesManager to setpublic java.util.List<java.lang.String> getPromoTemplateUrls()
public void setPromoTemplateUrls(java.util.List<java.lang.String> pPromoTemplateUrls)
pPromoTemplateUrls
- the promoTemplateUrls to setpublic StorePropertyManager getPropertyManager()
public void setPropertyManager(StorePropertyManager pPropertyManager)
pPropertyManager
- the propertyManager to setpublic boolean validateEmailAddress(java.lang.String pEmailAddress)
pEmailAddress
- - e-mail addresspublic java.lang.String createSender(java.lang.String pFirstName, java.lang.String pLastName, java.lang.String pEmail)
pFirstName
- sender's first namepLastName
- sender's last namepEmail
- sender's emailpublic java.lang.String createQualifiedString(java.lang.String pName, java.lang.String pEmail)
pName
<pEmail
>pName
- the namepEmail
- the emailpName
<pEmail
>public atg.userprofiling.email.TemplateEmailInfoImpl prepareEmailInfo(java.util.Map pEmailParams) throws atg.repository.RepositoryException
pEmailParams
- the email parametersatg.repository.RepositoryException
- indicates that a severe error occured while performing a Repository task.public java.util.Map prepareEmailInfoParams(atg.userprofiling.Profile pProfile, atg.userprofiling.email.TemplateEmailInfoImpl pEmailInfo, java.util.Map pEmailParams)
pProfile
- the profilepEmailInfo
- email templatepEmailParams
- map of parameterspublic void sendEmail(atg.userprofiling.Profile pProfile, java.util.Map pEmailParams) throws atg.userprofiling.email.TemplateEmailException, atg.repository.RepositoryException
pProfile
- the profilepEmailParams
- parametersatg.userprofiling.email.TemplateEmailException
- occurs while composing or sending a piece of template-based emailatg.repository.RepositoryException
- indicates that a severe error occured while performing a Repository taskprotected java.util.List addRecipients(atg.userprofiling.Profile pProfile, atg.userprofiling.email.TemplateEmailInfoImpl pEmailInfo)
pProfile
- the profilepEmailInfo
- the email infoprotected java.lang.String getSubject(java.lang.String pProductId) throws atg.repository.RepositoryException
pProductId
- - product idatg.repository.RepositoryException
- if error occurs