public class EmailActivityUrlHelper
extends java.lang.Object
EmailOptOut
and EmailEvent
URLs.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
Copyright.
|
static java.lang.String |
PARAMETER_ENCRYPTO
The name of the URL query string parameter which is used to lookup the parameters encrypted on the URL.
|
Constructor and Description |
---|
EmailActivityUrlHelper(java.lang.String encryptedString)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
composeClickedEventUrl(java.lang.String urlHeader,
java.lang.Long usersId,
java.lang.Integer emailPromotionId,
java.lang.String nextUrl)
Builds the URL which contains the
PARAMETER_ENCRYPTO query string parameter
which records when the user passed as usersId clicks on an item within the e-mail message generated from
the e-mail promotion passed as emailPromotionId. |
static java.lang.String |
composeNormalUrl(java.lang.String urlHeader,
java.lang.String nextUrl)
Builds the URL which points to the specified nextUrl.
|
static java.lang.String |
composeOpenedEventUrl(java.lang.String urlHeader,
java.lang.Long usersId,
java.lang.Integer emailPromotionId,
java.lang.String nextUrl)
Builds the URL which contains the
PARAMETER_ENCRYPTO query string parameter
which records when the user passed as usersId opens an e-mail message generated from the e-mail promotion
passed as emailPromotionId. |
static java.lang.String |
composeOutOptUrl(java.lang.String urlHeader,
java.lang.Long usersId,
java.lang.Integer storeId,
java.lang.Integer emailPromotionId,
java.lang.String nextUrl)
Builds the URL which contains the
PARAMETER_ENCRYPTO query string parameter
which allows a user to opt out of receiving e-mail from a store. |
static java.lang.String |
composeOutOptUrl(java.lang.String urlHeader,
java.lang.Long usersId,
java.lang.Integer storeId,
java.lang.String nextUrl)
Builds the URL which contains the
PARAMETER_ENCRYPTO query string parameter
which allows a user to opt out of receiving e-mail from a store. |
java.lang.Integer |
getEmailPromotionId()
Gets the ID of the e-mail promotion that was placed in the original parameter string.
|
java.lang.Integer |
getEventId()
Gets the ID of the event type that was placed in the original parameter string.
|
java.lang.String |
getNextUrl()
Gets the redirect URL that was placed in the original parameter string.
|
java.lang.Integer |
getStoreId()
Gets the ID of the store that was placed in the original parameter string.
|
java.lang.Long |
getUsersId()
Gets the ID of the user that was placed in the original parameter string.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String PARAMETER_ENCRYPTO
public EmailActivityUrlHelper(java.lang.String encryptedString)
encryptedString
- The encrypted string which contains the
original parameter data.public static java.lang.String composeClickedEventUrl(java.lang.String urlHeader, java.lang.Long usersId, java.lang.Integer emailPromotionId, java.lang.String nextUrl)
PARAMETER_ENCRYPTO
query string parameter
which records when the user passed as usersId clicks on an item within the e-mail message generated from
the e-mail promotion passed as emailPromotionId. The PARAMETER_ENCRYPTO
parameter is an encrypted
string which contains query string parameters for each of the parameters pass to this method.urlHeader
- The URL path under which the EmailEventCmd
command can be reached. For example, http://www.myhost.com/webapp/wcs/tools/servletusersId
- The ID of the user who receives the e-mail promotion.emailPromotionId
- The ID of the e-mail promotion being sent.nextUrl
- The URL to forward on to the browser after recording the click.public static java.lang.String composeNormalUrl(java.lang.String urlHeader, java.lang.String nextUrl)
urlHeader
- The URL path under which the next URL can be reached.
For example, http://www.myhost.com/webapp/wcs/tools/servletnextUrl
- The URL to forward on to the browser.public static java.lang.String composeOpenedEventUrl(java.lang.String urlHeader, java.lang.Long usersId, java.lang.Integer emailPromotionId, java.lang.String nextUrl)
PARAMETER_ENCRYPTO
query string parameter
which records when the user passed as usersId opens an e-mail message generated from the e-mail promotion
passed as emailPromotionId. The PARAMETER_ENCRYPTO
parameter is an encrypted string which
contains query string parameters for each of the parameters pass to this method.urlHeader
- The URL path under which the EmailEventCmd
command can be reached. For example, http://www.myhost.com/webapp/wcs/tools/servletusersId
- The ID of the user who receives the e-mail promotion.emailPromotionId
- The ID of the e-mail promotion being sent.nextUrl
- The URL to forward on to the browser after recording the open event.public static java.lang.String composeOutOptUrl(java.lang.String urlHeader, java.lang.Long usersId, java.lang.Integer storeId, java.lang.Integer emailPromotionId, java.lang.String nextUrl)
PARAMETER_ENCRYPTO
query string parameter
which allows a user to opt out of receiving e-mail from a store. The PARAMETER_ENCRYPTO
parameter is an encrypted string which contains query string parameters for each of the
parameters pass to this method.urlHeader
- The URL path under which the EmailEventCmd
command can be reached. For example, http://www.myhost.com/webapp/wcs/tools/servletusersId
- The ID of the user who receives the e-mail promotion.storeId
- The ID the store which sent the e-mail promotion to the user.emailPromotionId
- The ID the e-mail promotion that contained the link the user used to opt-out.nextUrl
- The String representing the URL to which the user will be redirected after hitting the URL returned. Most likely, this will be a confirmation page.public static java.lang.String composeOutOptUrl(java.lang.String urlHeader, java.lang.Long usersId, java.lang.Integer storeId, java.lang.String nextUrl)
PARAMETER_ENCRYPTO
query string parameter
which allows a user to opt out of receiving e-mail from a store. The PARAMETER_ENCRYPTO
parameter is an encrypted string which contains query string parameters for each of the
parameters pass to this method.urlHeader
- The URL path under which the EmailEventCmd
command can be reached. For example, http://www.myhost.com/webapp/wcs/tools/servletusersId
- The ID of the user who receives the e-mail promotion.storeId
- The ID the store which sent the e-mail promotion to the user.nextUrl
- The String representing the URL to which the user will be redirected after hitting the URL returned. Most likely, this will be a confirmation page.public java.lang.Integer getEmailPromotionId()
public java.lang.Integer getEventId()
public java.lang.String getNextUrl()
public java.lang.Integer getStoreId()
public java.lang.Long getUsersId()