public class DisplayLocationBasedContentActionTaskCmdImpl extends MarketingCampaignElementTaskCmdImpl implements DisplayLocationBasedContentActionTaskCmd
MarketingSpotData
call in the e-Marketing Spot JSP snippet.
<wcf:param name="pointOfInterest" value="12345" /> <wcf:param name="region" value="Toronto" />If the parameter is not found in the trigger parameters, then the location is looked for in the customer's user behavior record under an element name the same as the location type. The
CheckInStoreEvent
event
is configured to record the customer's latest point of interest and
region location information.
Once the current location is identified, the location is used to form
a URL identifying the content to display in the e-Marketing Spot.
The naming convention of the content is:
MarketingSpotData
call
<wcf:param name="DM_locationContentUrlPrefix" value="http://localhost/wcsstore/Madisons/images/eFlyer/" /> <wcf:param name="DM_locationContentUrlSuffix" value=".png" />This will override any setting in the "Display Location-based Content" action definition.
composeContentURL
method.DM_locationContentValidation
parameter. Valid values are
url, file, and none. If this parameter is not specified, then the default is url.
<c:set var="rootPath" value="${request.scheme}://${request.serverName}${request.contextPath}/servlet"/> <c:set var="relativePath" value="${jspStoreDir}images/eFlyer/"/> <wcf:param name="DM_locationContentValidation" value="url" /> <wcf:param name="DM_locationContentUrlPrefix" value="${rootPath}${relativePath}" /> <wcf:param name="DM_locationContentUrlSuffix" value=".png" />
<c:set var="relativeStoreJspUrl" value="${jspStoreDir}images/eFlyer/"/> <wcf:param name="DM_locationContentValidation" value="file" /> <wcf:param name="DM_locationContentUrlPrefix" value="${relativeStoreJspUrl}" /> <wcf:param name="DM_locationContentUrlSuffix" value=".jsp" />
${locale}
as part of the path.
In some situations, you may not want this command to validate that the content specified by the URL exists. To disable that check, you can either:
MarketingSpotData
call
<wcf:param name="DM_locationContentValidation" value="none" />
validURL
method to return true.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
The name of this class.
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
static java.lang.String |
DISPLAY_TYPE_URL_CONTENT
A constant representing Location-based Content to be displayed in an e-Marketing Spot.
|
DM_FROM_FORWARD_TRIGGERS_FOR_PROCESSING, EMLPROMO_NAME_PREFIX, GENERIC_USER_ID
defaultCommandClassName
Constructor and Description |
---|
DisplayLocationBasedContentActionTaskCmdImpl()
This method is the default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
composeContentURL(java.lang.String urlPrefix,
java.lang.String currentLocation,
java.lang.String urlSuffix)
This method appends the URL prefix, current location, and URL suffix
to create a URL that identifies the content to be displayed in the
e-Marketing Spot.
|
void |
locateContent(java.lang.String urlPrefix,
java.lang.String currentLocation,
java.lang.String urlSuffix,
java.lang.String validation)
This method calls composeContentURL to get the URL for the content.
|
void |
performExecute()
This method finds content associated with the customer's current location.
|
java.util.List |
validateParameters(java.util.Map elementParameters)
This method validates that all the required name value pairs have been set for
the campaign element.
|
boolean |
validFile(java.lang.String contentURL)
This method checks that the file exists.
|
boolean |
validURL(java.lang.String contentURL)
This method checks that the content JSP file exists.
|
addEMarketingSpotDataBean, forwardTriggersForProcessing, forwardTriggersForProcessing, getActivity, getDataFromTriggerParameters, getElementId, getElementParameters, getEMarketingSpotDataBeans, getExperimentTestElements, getMarketingContent, getMarketingSpotBehavior, getMemberId, getMemberId, getMemberIdsForPersonalizationId, getMemberIdsForPersonalizationId, getNewElementParameters, getPersonalizationId, getPreviewReport, getRegisteredMemberIdForPersonalizationId, getReturnValue, getStoreId, getTemporarySharedData, getTemporarySharedDataObject, getTriggerParameters, getTriggerParametersMap, getUserDataForElement, isReadyToCallExecute, putTemporarySharedDataObject, returnEMarketingSpotDataBeans, setActivity, setElementId, setElementParameters, setExperimentTestElements, setNewElementParameter, setOutputProperties, setPreviewReport, setReturnValue, setTemporarySharedData, setTriggerParameters, setTriggerParameters, validateCategory, validateCustomerSegment, validateDates, validateElementIsFirstInActivity, validateEmailTemplate, validateMarketingContent, validateMarketingContent, validateMarketingSpot, validateProduct, validatePromotion, validatePromotionCodes, validatePromotionCodesOrCoupon, validatePromotionCoupon, validatePromotionDisplay, validateSubscription, validateTimes
execute, executeFromCache, getCaller, getEntryInfo, getId, getObjectSize, getSharingPolicy, postExecute, preExecute, reset, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forwardTriggersForProcessing, getEMarketingSpotDataBeans, getMarketingSpotBehavior, getNewElementParameters, getReturnValue, returnEMarketingSpotDataBeans, setActivity, setElementId, setElementParameters, setExperimentTestElements, setNewElementParameter, setPreviewReport, setReturnValue, setTemporarySharedData, setTriggerParameters, setTriggerParameters
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
public static final java.lang.String DISPLAY_TYPE_URL_CONTENT
public DisplayLocationBasedContentActionTaskCmdImpl()
public void performExecute()
<_config:property name="traceElementTimeoutConfig" value="pointOfInterest,3600,region,3600"/>
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class MarketingCampaignElementTaskCmdImpl
public void locateContent(java.lang.String urlPrefix, java.lang.String currentLocation, java.lang.String urlSuffix, java.lang.String validation)
urlPrefix
- The prefix used to create the content URL.currentLocation
- The customer's current location.urlSuffix
- The suffix used to create the content URL.validation
- The type of validation to be done. Valid values are url, file, or none.public java.lang.String composeContentURL(java.lang.String urlPrefix, java.lang.String currentLocation, java.lang.String urlSuffix)
urlPrefix
- The prefix used to create the content URL.currentLocation
- The customer's current location.urlSuffix
- The suffix used to create the content URL.public boolean validFile(java.lang.String contentURL)
contentURL
- The content URL.public boolean validURL(java.lang.String contentURL)
contentURL
- The content URL.public java.util.List validateParameters(java.util.Map elementParameters)
validateParameters
in interface MarketingCampaignElementTaskCmd
validateParameters
in class MarketingCampaignElementTaskCmdImpl
elementParameters
- The name value pairs for this element.ApplicationError
exceptions
that contains any validation errors. The list may be empty or be null
.