|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.projects.store.email.StoreEmailTools
public class StoreEmailTools
This utility class defines various utility methods that are used by Store for processing email.
Field Summary | |
---|---|
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 atg.projects.store.multisite.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 Summary | |
---|---|
StoreEmailTools()
|
Method Summary | |
---|---|
protected java.util.List |
addRecipients(atg.userprofiling.Profile pProfile,
atg.userprofiling.email.TemplateEmailInfoImpl emailInfo)
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. |
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.ArrayList<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()
|
StoreConfiguration |
getStoreConfiguration()
|
java.lang.String |
getStoreNameResource()
|
atg.projects.store.multisite.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 |
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.ArrayList<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 |
setStoreConfiguration(StoreConfiguration pStoreConfiguration)
|
void |
setStoreNameResource(java.lang.String pStoreNameResource)
|
void |
setStoreSitePropertiesManager(atg.projects.store.multisite.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static 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 atg.projects.store.multisite.StoreSitePropertiesManager mStoreSitePropertiesManager
Constructor Detail |
---|
public StoreEmailTools()
Method Detail |
---|
public StoreProfileTools getProfileTools()
public void setProfileTools(StoreProfileTools pProfileTools)
pProfileTools
- - profile tools.public java.lang.String getDefaultLocaleString()
public void setDefaultLocale(java.lang.String pDefaultLocale)
DefaultLocale
- the String to setpublic void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
public 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 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 StoreConfiguration getStoreConfiguration()
public void setStoreConfiguration(StoreConfiguration pStoreConfiguration)
pStoreConfiguration
- The storeConfiguration to set.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)
mTemplateUrlName
- the String to setpublic atg.projects.store.multisite.StoreSitePropertiesManager getStoreSitePropertiesManager()
public void setStoreSitePropertiesManager(atg.projects.store.multisite.StoreSitePropertiesManager pStoreSitePropertiesManager)
StoreSitePropertiesManager
- the StoreSitePropertiesManager to setpublic java.util.ArrayList<java.lang.String> getPromoTemplateUrls()
public void setPromoTemplateUrls(java.util.ArrayList<java.lang.String> pPromoTemplateUrls)
public StorePropertyManager getPropertyManager()
public void setPropertyManager(StorePropertyManager pPropertyManager)
public boolean validateEmailAddress(java.lang.String pEmailAddress)
pEmailAddress
- - e-mail address
public 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 email
public java.lang.String createQualifiedString(java.lang.String pName, java.lang.String pEmail)
pName
<pEmail
>
pName
- pEmail
-
public atg.userprofiling.email.TemplateEmailInfoImpl prepareEmailInfo(java.util.Map pEmailParams) throws atg.repository.RepositoryException
atg.repository.RepositoryException
public java.util.Map prepareEmailInfoParams(atg.userprofiling.Profile pProfile, atg.userprofiling.email.TemplateEmailInfoImpl pEmailInfo, java.util.Map pEmailParams)
pEmailInfo
- email templatepEmailParams
- map of parameters
public void sendEmail(atg.userprofiling.Profile pProfile, java.util.Map pEmailParams) throws atg.userprofiling.email.TemplateEmailException, atg.repository.RepositoryException
pParams
-
atg.userprofiling.email.TemplateEmailException
atg.repository.RepositoryException
protected java.util.List addRecipients(atg.userprofiling.Profile pProfile, atg.userprofiling.email.TemplateEmailInfoImpl emailInfo)
emailInfo
-
protected java.lang.String getSubject(java.lang.String pProductId) throws atg.repository.RepositoryException
pProductId
- - product id
atg.repository.RepositoryException
- if error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |