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.
|
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.
|
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)
public java.sql.Timestamp getTime(Activity activity, java.sql.Timestamp 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;
public java.lang.String getParentCatalogEntryOfCatalogEntry(java.lang.String storeId, java.lang.String childCatalogEntryId) throws CatalogEntryException