public class ViewSearchEMarketingSpotTriggerTaskCmdImpl extends MarketingCampaignElementTaskCmdImpl implements ViewSearchEMarketingSpotTriggerTaskCmd
searchKeyword
name value
pair, the campaign element will be associated with the Search e-Marketing
Spot of the same name. If an existing Search e-Marketing
Spot cannot be found, then a Search e-Marketing
Spot is created.
This class has a performExecute
method that is unique
for trigger campaign elements. It is called for search e-Marketing Spots
to check if the current customer search term (found from the
searchTerm
URL parameter) matches the e-Marketing Spot
name by the specified operator (=, contain, start, end).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 |
PARAM_SEARCH_KEYWORD
The constant for the Search e-marketing spot name/value pair for the spot name.
|
static java.lang.String |
PARAM_SEARCH_OPERATOR
The constant for the Search e-marketing spot name/value pair for the search name matching operator.
|
static java.lang.String |
PARAM_SEARCH_PARAMETER
The constant for the Search e-marketing spot name/value pair for the search term parameter that is on the URL.
|
DM_FROM_FORWARD_TRIGGERS_FOR_PROCESSING, EMLPROMO_NAME_PREFIX, GENERIC_USER_ID
defaultCommandClassName
Constructor and Description |
---|
ViewSearchEMarketingSpotTriggerTaskCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMarketingSpotBehavior(java.util.Map elementParameters)
This method returns a value of 0 to specify that this marketing campaign element
is static and the results can be cached for all users.
|
java.lang.Integer |
getStoreIdToCreateSearchEMarketingSpot(java.lang.Integer[] relatedStores)
This method returns the unique ID of the store in which to create the Search e-Marketing Spot.
|
void |
performExecute()
This method is used when the e-Marketing Spot is a search e-Marketing Spot.
|
void |
resolveSearchEMarketingSpot(java.lang.String spotName,
java.util.Map elementParameters,
java.util.List validationErrors)
This method associates a Search e-Marketing Spot with a View e-Marketing Spot campaign
element.
|
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.
|
addEMarketingSpotDataBean, forwardTriggersForProcessing, forwardTriggersForProcessing, getActivity, getDataFromTriggerParameters, getElementId, getElementParameters, getEMarketingSpotDataBeans, getExperimentTestElements, getMarketingContent, 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, 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 PARAM_SEARCH_KEYWORD
public static final java.lang.String PARAM_SEARCH_PARAMETER
public static final java.lang.String PARAM_SEARCH_OPERATOR
public ViewSearchEMarketingSpotTriggerTaskCmdImpl()
public void resolveSearchEMarketingSpot(java.lang.String spotName, java.util.Map elementParameters, java.util.List validationErrors)
searchKeyword
.
This method tries to find an existing e-Marketing Spot with the corresponding name.
If an existing e-Marketing Spot is found, then a new entry is created in the
DMELEMENTNVP database table with a name of emsId
and a value with the corresponding
e-Marketing Spot unique ID. If an existing e-Marketing Spot is not found, then a
new Search e-Marketing Spot is created, and then the DMELEMENTNVP database table
entry is created. If the store has an asset store, then the e-Marketing Spot is created
in the asset store in order to share the e-Marketing Spot with the extended site stores.spotName
- The name of the Search e-Marketing Spot.elementParameters
- The name value pairs for this element.validationErrors
- The list of ApplicationError
exceptions
that contains any validation errors. The list may be empty.public java.lang.Integer getStoreIdToCreateSearchEMarketingSpot(java.lang.Integer[] relatedStores)
relatedStores
- The ordered list of stores on the com.ibm.commerce.campaigns store relationship.public java.util.List validateParameters(java.util.Map elementParameters)
searchKeyword
has been set and
associates the campaign element with a Search e-Marketing Spot. If an existing
Search e-Marketing Spot cannot be found, then one is created.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
.public void performExecute()
searchOperator
can be one of:
=, contain, start, end.
The customer's search term is found from the trigger parameters
from the name-value pair of searchTerm
. This can
be overridden by updating the implementation xml for the
viewSearchEMarketingSpot
element template and
change the value of searchParameter
.performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class MarketingCampaignElementTaskCmdImpl
public java.lang.String getMarketingSpotBehavior(java.util.Map elementParameters)
getMarketingSpotBehavior
in interface MarketingCampaignElementTaskCmd
getMarketingSpotBehavior
in class MarketingCampaignElementTaskCmdImpl
elementParameters
- The name value pairs for this element.