public class DisplayLocationBasedContentActionTaskCmdImpl extends MarketingCampaignElementTaskCmdImpl implements DisplayLocationBasedContentActionTaskCmd
<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:
<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.
<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" />
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:
<wcf:param name="DM_locationContentValidation" value="none" />
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.
|
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.
|
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"/>
public void locateContent(java.lang.String urlPrefix, java.lang.String currentLocation, java.lang.String urlSuffix, java.lang.String validation)
public java.lang.String composeContentURL(java.lang.String urlPrefix, java.lang.String currentLocation, java.lang.String urlSuffix)
public boolean validFile(java.lang.String contentURL)
public boolean validURL(java.lang.String contentURL)
public java.util.List validateParameters(java.util.Map elementParameters)