public class GetMarketingSpotDataCmdImpl extends AbstractGetBusinessObjectDocumentCmdImpl implements GetMarketingSpotDataCmd
EMarketingSpotDataBean
s, and call the appropriate web
services to get the associated logical SDOs for the content.
The method performExpression
sets the response
business object document.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATA_TYPE_SEARCH_QUERY
A constant representing the type of data returned by the search marketing activities in the e-Marketing spot.
|
static java.lang.String |
FILTER_RESULTS
The constant that the recommendation results should not be filtered.
|
static java.lang.String |
NVP_KEY_DISPLAYSEQUENCE
Constant for EMarketingSpotDataBean nvp for order of default content
|
Constructor and Description |
---|
GetMarketingSpotDataCmdImpl()
This method is the default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addFilteredResult(EMarketingSpotDataBean emsDataBean)
This method sets an
EMarketingSpotDataBean object into the list
that contains the information of results that were returned by the
marketing engine to display in the e-Marketing Spot, but the result
is not being returned because it was filtered out by the object's filter logic. |
java.util.Map<java.lang.String,java.lang.String> |
getAdditionalParameters()
This method gets the map of additional parameters used for evaluation of the e-Marketing Spot.
|
java.util.List |
getEmsDataBeans()
This method gets the
List of EMarketingSpotDataBean s returned
by the marketing runtime. |
java.lang.Integer |
getEmsId()
This method gets the ID of the e-Marketing Spot.
|
java.lang.String |
getEmsName()
This method gets the name of the e-Marketing Spot.
|
java.util.List |
getEmsTitleDataBeans()
This method gets the
List of EMarketingSpotDataBean s returned
by the marketing runtime used for e-Marketing Spot title. |
CampaignInitiativeCache.CachedEMarketingSpot |
getESpot(java.lang.String emsName,
java.lang.Integer storeId)
This method gets the cached information of an e-Marketing Spot.
|
CampaignInitiativeCache.CachedEMarketingSpot |
getESpot(java.lang.String emsName,
java.lang.String usage,
java.lang.Integer storeId)
This method gets the cached information of an e-Marketing Spot.
|
java.util.List |
getFilteredResults()
This method gets the list of
EMarketingSpotDataBean objects
that contain the information of results that were returned by the
marketing engine to display in the e-Marketing Spot, but the result
is not being returned because it was filtered out by the object's filter logic. |
java.lang.String |
getMarketingSpotBehaviorFromServiceCall()
This method gets the caching behavior for the associated e-Marketing Spot.
|
MarketingSpotDataType |
getMarketingSpotDataType(java.lang.String emsName,
java.lang.String usage,
java.lang.Integer storeId,
java.lang.String pznId)
This method gets the MarketingSpotDataType object to return in the Get
MarketingSpotData service call.
|
java.util.List |
getPreviewReport()
This method gets the list that will contain the information that can
be used to understand the evaluation that occurred on an e-Marketing Spot.
|
BusinessObjectDocumentType |
getResultBusinessObjectDocument()
This method returns the response business object document.
|
boolean |
getReturnDefaultContentOnly()
This method gets the flag value to return default content only.
|
ShowMarketingSpotDataType |
getShowMarketingSpotData()
This method gets the
ShowMarketingSpotDataType business object document result. |
java.lang.Integer |
getStoreId()
This method gets the ID of the current store.
|
java.lang.String |
getTriggerParameters()
This method gets the trigger parameters passed in the service call.
|
java.util.Map |
getTriggerParametersMap()
This method gets the trigger parameters passed in the service call.
|
java.util.List |
handleIdOnlyRequestForDefaultContent(java.util.List newEmsDataBeans)
This method processes a
List of EMarketingSpotDataBean s returned
by the marketing runtime as the default content to display in the e-Marketing Spot. |
CampaignInitiativeCache.CachedEMarketingSpot |
handleNoExactMatchForSearchMarketingSpot(java.lang.String emsName,
java.lang.String usage,
java.lang.Integer storeId,
java.lang.String pznId)
This method returns the e-Marketing Spot object that corresponds to the e-Marketing
Spot name used in the Get MarketingSpotData request.
|
void |
setAdditionalParameter(java.lang.String paramName,
java.lang.String paramValue)
This method sets the value of an additional parameter used for evaluation of the e-Marketing Spot.
|
void |
setEmsDataBeans(java.util.List newEmsDataBeans)
This method sets the
List of EMarketingSpotDataBean s returned
by the marketing runtime. |
void |
setEmsId(java.lang.Integer newEmsId)
This method sets the ID of the e-Marketing Spot.
|
void |
setEmsName(java.lang.String newEmsName)
This method sets the name of the e-Marketing Spot.
|
void |
setEmsTitleDataBeans(java.util.List newEmsTitleDataBeans)
This method sets the
List of EMarketingSpotDataBean s returned
by the marketing runtime used for e-Marketing Spot title. |
void |
setGetMarketingSpotData(GetMarketingSpotDataType getMarketingSpotData)
This method sets the
GetMarketingSpotDataType business object document that this command will process. |
void |
setMarketingSpotBehaviorFromServiceCall(java.lang.String behavior)
This method sets the caching behavior for the associated e-Marketing Spot.
|
void |
setPreviewReport(java.util.List newPreviewReport)
This method sets the list that will contain the information that can
be used to understand the evaluation that occurred on an e-Marketing Spot.
|
void |
setRequestBusinessObjectDocument(BusinessObjectDocumentType businessObjectDocument)
This method sets the business object document to process.
|
void |
setReturnDefaultContentOnly(boolean newReturnDefaultContentOnly)
This method sets the flag to return default content only
|
void |
setStoreId(java.lang.Integer newStoreId)
This method sets the ID of the current store.
|
void |
setTriggerParameters(java.lang.String newTriggerParameters)
This method sets the trigger parameters passed in the service call.
|
getFetchCommandInterface, getInsertMoreDataCommandInterface, getSearchExpression, getUniqueID, handleException, isReadyToCallExecute, performExecute, setFetchCommandInterface, setInsertMoreDataCommandInterface, setOutputProperties, setUniqueIDXPath
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
handleException
public static final java.lang.String DATA_TYPE_SEARCH_QUERY
public static final java.lang.String FILTER_RESULTS
public static final java.lang.String NVP_KEY_DISPLAYSEQUENCE
public GetMarketingSpotDataCmdImpl()
public java.util.List getEmsDataBeans()
List
of EMarketingSpotDataBean
s returned
by the marketing runtime.List
of EMarketingSpotDataBean
s returned
by the marketing runtime.public void setEmsDataBeans(java.util.List newEmsDataBeans)
List
of EMarketingSpotDataBean
s returned
by the marketing runtime.newEmsDataBeans
- The List
of EMarketingSpotDataBean
s returned
by the marketing runtime.public java.util.List getEmsTitleDataBeans()
List
of EMarketingSpotDataBean
s returned
by the marketing runtime used for e-Marketing Spot title.List
of EMarketingSpotDataBean
s returned
by the marketing runtime used for e-Marketing Spot title.public void setEmsTitleDataBeans(java.util.List newEmsTitleDataBeans)
List
of EMarketingSpotDataBean
s returned
by the marketing runtime used for e-Marketing Spot title.newEmsTitleDataBeans
- The List
of EMarketingSpotDataBean
s returned
by the marketing runtime used for e-Marketing Spot title.public java.util.List handleIdOnlyRequestForDefaultContent(java.util.List newEmsDataBeans)
List
of EMarketingSpotDataBean
s returned
by the marketing runtime as the default content to display in the e-Marketing Spot.
If the e-Marketing Spot only wants the IDs of the data to be returned, then the
EMarketingSpotDataBean
is modified to specify that only the ID should be returned.
This is done if DM_ReturnCatalogEntryId is true and there is CatalogEntry default content,
when DM_ReturnCatalogGroupId is true and there is CatalogGroup default content, and when
DM_ReturnMarketingContentId is true and there is MarketingContent default content.newEmsDataBeans
- The List
of EMarketingSpotDataBean
s returned
by the marketing runtime.EMarketingSpotDataBean
s to display in the e-Marketing Spot.
The types of the EMarketingSpotDataBean
s may have been modified.public java.lang.String getTriggerParameters()
public java.util.Map getTriggerParametersMap()
public void setTriggerParameters(java.lang.String newTriggerParameters)
newTriggerParameters
- The trigger parameters passed in the service call.public java.lang.Integer getStoreId()
public void setStoreId(java.lang.Integer newStoreId)
newStoreId
- The ID of the current store.public java.lang.Integer getEmsId()
public void setEmsId(java.lang.Integer newEmsId)
newEmsId
- The ID of the e-Marketing Spot.public java.lang.String getEmsName()
public void setEmsName(java.lang.String newEmsName)
newEmsName
- The name of the e-Marketing Spot.public CampaignInitiativeCache.CachedEMarketingSpot getESpot(java.lang.String emsName, java.lang.Integer storeId)
emsName
- The name of the e-Marketing Spot.storeId
- The ID of the store.public CampaignInitiativeCache.CachedEMarketingSpot getESpot(java.lang.String emsName, java.lang.String usage, java.lang.Integer storeId)
emsName
- The name of the e-Marketing Spot.usage
- The usage type of the e-Marketing Spot.storeId
- The ID of the store.public CampaignInitiativeCache.CachedEMarketingSpot handleNoExactMatchForSearchMarketingSpot(java.lang.String emsName, java.lang.String usage, java.lang.Integer storeId, java.lang.String pznId)
MarketingEngineCache.singleton().getSearchEMarketingSpots(Integer storeId)
:
Use this method to get the set of currently defined search e-Marketing Spots. You
can go through the entire map and find the e-Marketing Spot that matches
the customer search term according to the custom requirement.MarketingEngineCache.singleton().getEmarketingSpot(String name, String usage, Integer storeId)
:
Use this method to return the applicable e-Marketing Spot object.foundMatchForMarketingSpot(eSpot, storeId, pznId)
: For each
search e-Marketing Spot, call this method to call the search activities associated with
this e-Marketing Spot.
The following is an example of how to find matches where the desired search term (which is stored in the search e-Marketing Spot names) can be found anywhere in the customer's search term (which is the emsName parameter passed into this method).
CampaignInitiativeCache.CachedEMarketingSpot returnESpot = null; Integer[] relatedStores = null; try { relatedStores = StoreUtil.getStorePath(storeId, MarketingMetadata.MARKETING_STORE_RELATIONSHIP); } catch (Exception e) { return null; } for (int i = 0; i < relatedStores.length; i++) { Map storeSearchSpots = MarketingEngineCache.singleton().getSearchEMarketingSpots(relatedStores[i]); Iterator storeSearchSpotsIterator = storeSearchSpots.keySet().iterator(); while (storeSearchSpotsIterator.hasNext()) { String spotName = (String)storeSearchSpotsIterator.next(); if (emsName.contains(spotName)) { CampaignInitiativeCache.CachedEMarketingSpot eSpot = MarketingEngineCache.singleton().getEmarketingSpot(spotName, usage, relatedStores[i]); if (eSpot != null) { // found a partial match spot foundMatchForMarketingSpot(eSpot, storeId, pznId); returnESpot = eSpot; } } } } return returnESpot;
emsName
- The name of the e-Marketing Spot in the Get MarketingSpotData request.usage
- The usage of the e-Marketing Spot in the Get MarketingSpotData request.storeId
- The ID of the store.pznId
- The customer's personalization ID.public void setGetMarketingSpotData(GetMarketingSpotDataType getMarketingSpotData)
GetMarketingSpotDataType
business object document that this command will process.setGetMarketingSpotData
in interface GetMarketingSpotDataCmd
getMarketingSpotData
- The GetMarketingSpotDataType
business object document.public ShowMarketingSpotDataType getShowMarketingSpotData()
ShowMarketingSpotDataType
business object document result.getShowMarketingSpotData
in interface GetMarketingSpotDataCmd
ShowMarketingSpotDataType
business object document result to the client.public BusinessObjectDocumentType getResultBusinessObjectDocument()
getResultBusinessObjectDocument
in interface BusinessObjectDocumentCmd
getResultBusinessObjectDocument
in class AbstractGetBusinessObjectDocumentCmdImpl
BusinessObjectDocumentCmd.getResultBusinessObjectDocument()
public void setRequestBusinessObjectDocument(BusinessObjectDocumentType businessObjectDocument)
setRequestBusinessObjectDocument
in interface BusinessObjectDocumentCmd
setRequestBusinessObjectDocument
in class AbstractGetBusinessObjectDocumentCmdImpl
businessObjectDocument
- The request business object document to be processed.BusinessObjectDocumentCmd.setRequestBusinessObjectDocument(com.ibm.commerce.oagis9.datatypes.BusinessObjectDocumentType)
public void setPreviewReport(java.util.List newPreviewReport)
newPreviewReport
- A list of strings. Each string has its own
format of the data contained depending on the type of information being
returned. See the constants defined in the class MarketingUtil
that being with the text PREVIEW_REPORT_
.public java.util.List getFilteredResults()
EMarketingSpotDataBean
objects
that contain the information of results that were returned by the
marketing engine to display in the e-Marketing Spot, but the result
is not being returned because it was filtered out by the object's filter logic.EMarketingSpotDataBean
objects.public void addFilteredResult(EMarketingSpotDataBean emsDataBean)
EMarketingSpotDataBean
object into the list
that contains the information of results that were returned by the
marketing engine to display in the e-Marketing Spot, but the result
is not being returned because it was filtered out by the object's filter logic.emsDataBean
- The EMarketingSpotDataBean
object that
is being filtered from display.public java.util.List getPreviewReport()
MarketingUtil
that being with the text PREVIEW_REPORT_
.public java.util.Map<java.lang.String,java.lang.String> getAdditionalParameters()
public void setAdditionalParameter(java.lang.String paramName, java.lang.String paramValue)
paramName
- The name of the parameter.paramValue
- The value of the parameter.public void setReturnDefaultContentOnly(boolean newReturnDefaultContentOnly)
newReturnDefaultContentOnly
- A boolean value.public boolean getReturnDefaultContentOnly()
public void setMarketingSpotBehaviorFromServiceCall(java.lang.String behavior)
behavior
- Set a value of 1 if the e-Marketing Spot
is dynamic, and a value of 0 if it is static.public java.lang.String getMarketingSpotBehaviorFromServiceCall()
public MarketingSpotDataType getMarketingSpotDataType(java.lang.String emsName, java.lang.String usage, java.lang.Integer storeId, java.lang.String pznId)
getESpot
- to get the e-Marketing Spot definitionfoundMatchForMarketingSpot
- if the e-Marketing Spot exists, call the
marketing engine to evaluate the web activities scheduled to the e-Marketing SpotgetMarketingSpotDataObject
- process the results returned from the marketing
engine and create the SDOs to returngetMarketingSpotDataObject
.
This method does the following:
emsName
- The name of the e-Marketing Spot.usage
- The usage type of the e-Marketing Spot.storeId
- The ID of the store.pznId
- The customer's personalization ID.MarketingSpotDataType
object returned from the
getMarketingSpotDataObject
method.