public class RetrieveContentTaskCmdImpl extends MarketingSpotCommandBaseTaskCmdImpl implements RetrieveContentTaskCmd, com.ibm.websphere.cache.Sizeable
/MarketingContent[MarketingContentIdentifier[(UniqueID=)]].
The access profile is specified in wc-admin-component.xml under marketingContentAccessProfile.
If you want to return different marketing content data to the e-Marketing Spot, then create the file
wc-admin-component.xml under the com.ibm.commerce.marketing-ext directory and specify the applicable access profile.
The MarketingContent SDO is then returned to the eMarketing Spot JSP snippet
(wrapped in a MarketingSpotActivityMarketingContentDataType SDO).| 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 |
SHORT_COPYRIGHT
The short version of the WebSphere Commerce copyright statement.
|
defaultCommandClassName, NAME| Constructor and Description |
|---|
RetrieveContentTaskCmdImpl()
Default constructor for this command.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
getCacheKey()
This method generates a key to enable command caching.
|
MarketingContentType |
getMarketingContent(java.lang.String marketingContentId)
This method gets the marketing content specified by the marketing content ID.
|
byte[][] |
getMarketingContentObjects()
This method returns a byte array of serialized marketing content objects
(
MarketingSpotActivityMarketingContentDataType)
that are being populated in this command. |
java.util.List |
getMarketingContentSDOObjects()
This method returns a list of marketing content objects
(
MarketingSpotActivityMarketingContentDataType)
that are being populated in this command. |
long |
getObjectSize()
Returns the estimated footprint size in bytes
of this object and the objects it contains.
|
EMarketingSpotDataBean[] |
getResultDataBeans()
This method sets the data beans containing the results that the e-Marketing Spot displays.
|
boolean |
isReadyToCallExecute()
This method checks if this command is ready to be executed or not.
|
void |
performExecute()
This method performs all the logic that needs to be executed in this command.
|
void |
postExecute()
This method is called by the Dynamic Cache when the execute method is called,
and a cache miss occurs,
after the performExecute method is called.
|
java.lang.String |
replaceUrlParameters(java.lang.String currentUrl,
java.lang.String promotionId)
This method gets the URL link to associated with the content.
|
void |
reset()
Re-initializes the command for re-execution.
|
void |
setMarketingSpotIdAndContentType(java.lang.Integer newEmsId,
boolean newTitleContent)
This method sets the e-Marketing Spot ID and content type associated with the content being loaded.
|
void |
setOutputProperties(com.ibm.websphere.command.TargetableCommand fromCommand)
Sets the output properties by copying them from another instance of this command.
|
void |
setResultDataBeans(EMarketingSpotDataBean[] resultDataBeans)
This method sets the data beans containing the results that the e-Marketing Spot displays.
|
getActiveOrg, getActivityId, getAdditionalParameter, getAdditionalParameters, getCacheId, getCatalogId, getContracts, getDataType, getExperimentId, getLanguageId, getMarketingSpotBehavior, getMemberGroups, getMemberIdsForPersonalizationId, getPreviewReport, getSpecificLanguageId, getSpecificStoreeId, getSpotCacheKey, getStoreId, getTestElementId, isCacheHit, populateActivityData, populateUserData, preExecute, randomize, setAdditionalParameters, setMarketingSpotBehavior, setPreviewReport, setSpecificLanguageId, setSpecificStoreIdexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, setCaller, setObjectSize, unionDependencies, updateCachegetCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setTargetPolicyequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetAdditionalParameters, setMarketingSpotBehavior, setPreviewReport, setSpecificLanguageId, setSpecificStoreIdexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, preExecute, setCaller, updateCachepublic static final java.lang.String SHORT_COPYRIGHT
The short version of the WebSphere Commerce copyright statement.
(c) Copyright International Business Machines Corporation 1996,2008
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
public RetrieveContentTaskCmdImpl()
public long getObjectSize()
getObjectSize in interface com.ibm.websphere.cache.SizeablegetObjectSize in class MarketingSpotCommandBaseTaskCmdImplpublic EMarketingSpotDataBean[] getResultDataBeans()
getResultDataBeans in interface RetrieveContentTaskCmdpublic java.util.List getMarketingContentSDOObjects()
MarketingSpotActivityMarketingContentDataType)
that are being populated in this command.getMarketingContentSDOObjects in interface RetrieveContentTaskCmdMarketingSpotActivityMarketingContentDataType).public byte[][] getMarketingContentObjects()
MarketingSpotActivityMarketingContentDataType)
that are being populated in this command.getMarketingContentObjects in interface RetrieveContentTaskCmdMarketingSpotActivityMarketingContentDataType).public boolean isReadyToCallExecute()
isReadyToCallExecute in interface com.ibm.websphere.command.CommandisReadyToCallExecute in class MarketingSpotCommandBaseTaskCmdImplpublic void reset()
reset in interface com.ibm.websphere.command.Commandreset in class MarketingSpotCommandBaseTaskCmdImplCommand.reset()public void performExecute()
throws java.lang.Exception
performExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class MarketingSpotCommandBaseTaskCmdImpljava.lang.ExceptionTargetableCommand.performExecute()public void postExecute()
This method is called by the Dynamic Cache when the execute method is called, and a cache miss occurs, after the performExecute method is called.
postExecute in interface com.ibm.websphere.command.CacheableCommandpostExecute in class MarketingSpotCommandBaseTaskCmdImplCacheableCommand.postExecute()public void setOutputProperties(com.ibm.websphere.command.TargetableCommand fromCommand)
Sets the output properties by copying them from another instance of this command.
This method is intended to be called by the cacheable command framework. Do not call this method directly.
setOutputProperties in interface com.ibm.websphere.command.TargetableCommandsetOutputProperties in class MarketingSpotCommandBaseTaskCmdImplTargetableCommand.setOutputProperties(com.ibm.websphere.command.TargetableCommand)public void setResultDataBeans(EMarketingSpotDataBean[] resultDataBeans)
setResultDataBeans in interface RetrieveContentTaskCmdresultDataBeans - The data beans containing the results that the e-Marketing Spot displays.public java.lang.String[] getCacheKey()
public MarketingContentType getMarketingContent(java.lang.String marketingContentId) throws java.lang.Exception
marketingContentId - The ID of the marketing content to load from the database.java.lang.Exceptionpublic java.lang.String replaceUrlParameters(java.lang.String currentUrl,
java.lang.String promotionId)
currentUrl - The current URL link.promotionId - The promotion Idpublic void setMarketingSpotIdAndContentType(java.lang.Integer newEmsId,
boolean newTitleContent)
setMarketingSpotIdAndContentType in interface RetrieveContentTaskCmdnewEmsId - The e-Marketing Spot ID associated with the content being loaded.newTitleContent - True if the content is associated with an e-Marketing Spot title.