public interface MarketingServicesTaskCmd extends TaskCommand
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
static java.lang.String |
defaultCommandClassName
Default implementation class for this command.
|
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.
|
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
static final java.lang.String COPYRIGHT
static final java.lang.String defaultCommandClassName
java.sql.Timestamp adjustServerTime(java.sql.Timestamp time, java.lang.Integer storeId)
time
- The current server or preview time.storeId
- The identifier of the current store.java.sql.Timestamp getTime(Activity activity, java.sql.Timestamp time)
activity
- The marketing activity.time
- The current server or preview time.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;
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.java.lang.String getParentCatalogEntryOfCatalogEntry(java.lang.String storeId, java.lang.String childCatalogEntryId) throws CatalogEntryException
storeId
- The store ID.childCatalogEntryId
- The ID of the catalog entry for which to get the parent catalog entry.CatalogEntryException