public class MarketingServicesTaskCmdImpl extends TaskCommandImpl implements MarketingServicesTaskCmd
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.
|
defaultCommandClassName
Constructor and Description |
---|
MarketingServicesTaskCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.sql.Timestamp |
adjustServerTime(java.sql.Timestamp time,
java.lang.Integer storeId)
This method is called by the marketing services when it needs to check the current
time against the start and end times of an activity to determine if the activity
is currently applicable.
|
java.lang.String |
getParentCatalogEntryOfCatalogEntry(java.lang.String storeId,
java.lang.String childCatalogEntryId)
This method gets the parent catalog entry of a child catalog entry.
|
java.lang.String |
getPersonalizationId(java.lang.StringBuffer triggerParameters)
This method is called by the marketing services when the Get MarketingSpotData or
Process MarketingTrigger services are called.
|
java.sql.Timestamp |
getTime(Activity activity,
java.sql.Timestamp time)
This method is called by the marketing services to get the time used to check
if an activity is currently applicable on an e-Marketing Spot based on the activity
start and end times.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, performExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, performExecute, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, performExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
public java.sql.Timestamp adjustServerTime(java.sql.Timestamp time, java.lang.Integer storeId)
adjustServerTime
in interface MarketingServicesTaskCmd
time
- The current server or preview time.storeId
- The identifier of the current store.public java.sql.Timestamp getTime(Activity activity, java.sql.Timestamp time)
getTime
in interface MarketingServicesTaskCmd
activity
- The marketing activity.time
- The current server or preview time.public java.lang.String getPersonalizationId(java.lang.StringBuffer triggerParameters)
Example 1:
The external system knows the customer's commerce logon ID. The following service is
called, and the parameter wclogonid
is added to the call.
MarketingTriggerProcessServiceEvaluate?DM_ReqCmd=SocialCommerceInteraction?type=blog&wclogonid=customer1
The implementation of this method could do the following:
String pznId = null; try { String logonId = MarketingUtil.getDataFromTriggerParametersString(triggerParameters.toString(), "wclogonid"); if (logonId != null) { UserAccessBean uab = UserCache.findByUniqueIdentifier(logonId); if (uab != null) { pznId = uab.getPersonalizationId(); } } } catch (Exception e) { // trace } return pznId;
Example 2:
The external system knows the customer's commerce member ID. The following service is
called, and the parameter wcmemberid
is added to the call.
MarketingTriggerProcessServiceEvaluate?DM_ReqCmd=SocialCommerceInteraction?type=blog&wcmemberid=12345
The implementation of this method could do the following:
String pznId = null; try { String memberId = MarketingUtil.getDataFromTriggerParametersString(triggerParameters.toString(), "wcmemberid"); if (memberId != null) { UserAccessBean uab = UserCache.findByPrimaryKey(memberId); if (uab != null) { pznId = uab.getPersonalizationId(); } } } catch (Exception e) { // trace } return pznId;
getPersonalizationId
in interface MarketingServicesTaskCmd
triggerParameters
- The trigger parameters passed in the service call. Custom
information added to the trigger parameters can be used to determine the appropriate
personalization ID.public java.lang.String getParentCatalogEntryOfCatalogEntry(java.lang.String storeId, java.lang.String childCatalogEntryId) throws CatalogEntryException
getParentCatalogEntryOfCatalogEntry
in interface MarketingServicesTaskCmd
storeId
- The store ID.childCatalogEntryId
- The ID of the catalog entry for which to get the parent catalog entry.CatalogEntryException