public class MarketingEngineCache
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.Integer | ACTIVITY_FOR_DEFAULT_CONTENT
A constant for the ID of the activity when the default content is displayed in an eMarketing Spot.
|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static java.lang.String | PROCESS_ON_COMMAND_EVENT_NAME
The event name used for marketing events for the Command Execution Trigger Registry
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] | buildBehaviorRuleKey(java.lang.Integer elementTypeId, java.lang.String command, java.lang.Integer storeId)
This method constructs a key to find UserBehaviorRule objects in the cache.
|
static void | checkBehaviorRulesLoaded(boolean fromSensor)
The method checks if the behavior rules have been loaded into the cache.
|
void | clearAll()
This method removes all the data from all the caches.
|
void | clearEMarketingSpotFromRegistry(java.lang.String name, java.lang.String usage, java.lang.Integer storeId, java.lang.Integer emsId)
This method clears entries associated with an e-Marketing Spot from the cache.
|
void | clearMarketingCache()
This method removes all the data from the marketing cache.
|
void | clearUserBehaviorCache()
This method removes all the data from the user behavior cache.
|
boolean | filterCommandBasedOnWebpath(java.lang.String commandName, java.lang.String webpath)
This method checks if a the successful exit of a command should be ignored because it was called from a webapp for which we do not want to process events.
|
void | flushRankingStatisticsCache()
This method will persist all the ranking statistics that are in the ranking statistic cache to the database with a batch insert SQL.
|
void | flushUserBehaviorBatchUpdateCache()
This method will persist all the user behavior entries that are in the user behavior batch update cache to the database.
|
Activity | getActivity(java.lang.Integer activityId)
This method returns an Activity object based on an activityId.
|
Activity | getActivityFromElementId(java.lang.Integer elementId)
This method gets the Activity business object associated with an element.
|
java.util.Map | getBehaviorRules()
This method returns the behavior rule cache.
|
java.util.List | getBehaviorRules(java.lang.String key)
This method looks in the cache for behavior rules that match the given key.
|
java.util.List | getBehaviorRules(java.lang.String command, java.lang.Integer storeId, java.util.Map urlString, java.lang.String referralURL, java.lang.Integer elementTypeId)
This method looks in the cache for behavior rules that match the command, store and urlString (NVPs) passed in.
|
java.util.List | getBehaviorRules(java.lang.String command, java.lang.Integer storeId, java.lang.String urlString, java.lang.String referralURL, java.lang.Integer elementTypeId)
This method looks in the cache for behavior rules that match the command, store and urlString (NVPs) passed in.
|
static java.lang.String | getCacheStringFromFlowElement(FlowElement element)
This method returns a string representation of a flow element.
|
static boolean | getCurrentCmcVersionIsFEP6orHigher()
This method returns if the CMC feature is currently at FEP6 or higher.
|
static boolean | getCurrentFoundationVersionIsFEP6()
This method returns if the foundation feature is currently at FEP6.
|
static java.lang.String | getElementUniqueIdFromElementName(java.lang.String elementName, java.lang.Integer activityId)
This method gets the unique ID of a campaign element based on the name of the element.
|
static java.lang.String | getElementUniqueIdFromElementName(java.lang.String elementName, java.lang.String activityName)
This method gets the unique ID of a campaign element based on the name of the element.
|
CampaignInitiativeCache.CachedEMarketingSpot | getEmarketingSpot(java.lang.String name, java.lang.String usage, java.lang.Integer storeId)
This method gets the definition of an e-Marketing Spot.
|
java.util.List | getEMarketingSpotActivities(java.lang.String emsId, java.lang.Integer storeId)
This method finds the set of activities that are scheduled on an e-Marketing Spot.
|
java.util.Map | getEmarketingSpotRelatedInfo(java.lang.Integer emsId, java.lang.Integer storeId)
This method gets the information related to an e-Marketing Spot in a specific store.
|
static java.lang.Integer | getExistingElementUniqueIdFromElementName(java.lang.String elementName, java.lang.Integer activityId)
This method gets the unique ID of a campaign element based on the name of the element.
|
FlowElement | getFlowElement(java.lang.String elementId)
This method returns a FlowElement object based on the elementId found in the flow XML definition associated with an activity.
|
java.util.List | getMarketingSpotDefaultContent(java.lang.Integer storeId, java.lang.Integer emsId)
This method gets the cached default content associated with an e-Marketing spot in a specific store.
|
java.util.List | getMarketingSpotDefaultContentForSingleStore(java.lang.Integer storeId, java.lang.Integer emsId)
This method gets the default content entry associated with the e-Marketing spot in the specified store.
|
java.util.List | getMarketingSpotDefaultTitleContent(java.lang.Integer storeId, java.lang.Integer emsId)
This method gets the cached default title content associated with an e-Marketing spot in a specific store.
|
java.util.List | getMarketingSpotDefaultTitleContentForSingleStore(java.lang.Integer storeId, java.lang.Integer emsId)
This method gets the default title content entry associated with the e-Marketing spot in the specified store.
|
java.lang.String | getMarketingSpotOrderingInterface(java.lang.Integer storeId, java.lang.Integer emsId, java.lang.String contentType)
This method gets the cached interface name for the command to order content in an eMarketing spot in a specific store.
|
java.lang.String | getPromotionIdFromName(java.lang.String promoName)
This method returns the promotion ID based on an promotion name.
|
java.util.Map | getSearchEMarketingSpots(java.lang.Integer storeId)
This method returns the search e-Marketing Spots that are currently defined for the specified store and the stores on the campaigns store path.
|
java.util.List | getTriggerListeners(java.lang.String triggerType, java.lang.Integer storeId, java.util.Map nvps)
This method looks up cached TriggerListen objects that correspond to activities that are listening for the trigger indicated by the method's parameters.
|
com.ibm.commerce.marketing.internal.runtime.objects.UserBehavior | getUserBehavior(java.lang.String personalizationId, java.lang.Integer storeId)
This method returns an UserBehavior object based on the personalizationId for a customer.
|
static java.lang.String | getXmlStringFromActivityCache(com.ibm.commerce.marketing.internal.runtime.objects.ActivityRootElement activityRootElement)
This method returns a string representation of the cached object representing the activity flow XML.
|
static java.lang.StringBuffer | getXmlStringFromElement(com.ibm.commerce.marketing.internal.runtime.objects.ActivityFlowElement[] children)
This method returns a string representation of the cached objects representing the flow elements in the activity XML.
|
void | initialize()
This method initializes the marketing engine cache.
|
static void | invalidateBehaviorRulesLoadedIndicator()
This method should be called when the behavior rules need to be updated in the marketing cache.
|
void | invalidateEMarketingSpotActivities(java.lang.String emsId, java.lang.Integer storeId)
This method removes a trigger listener object from the cache.
|
static boolean | isInitialized()
This method returns if the singleton MarketingEngineCache object has been initialized.
|
static void | loadBehaviorRulesByServiceCall()
This method calls a service to load the existing behavior rules.
|
java.util.List | loadEMarketingSpotActivitiesFromDatabase(java.lang.String emsId, java.lang.Integer storeId)
This method goes to the database and finds the set of activities that are scheduled on an e-Marketing Spot.
|
static void | loadExistingBehaviorRulesAndTriggerListeners(Activity activity, ActivityElementData activityElementData, com.ibm.commerce.marketing.internal.runtime.objects.TriggerListen[] triggerListeners)
This method will set up the cache so that is has the latest information about behavior rules and trigger listeners for an activity.
|
static void | loadExistingBehaviorRulesAndTriggerListeners(java.lang.Integer activityId)
This method will set up the cache so that is has the latest information about behavior rules and trigger listeners for an activity.
|
void | putBehaviorRule(java.lang.Integer storeId, UserBehaviorRule ub, java.lang.Integer elementTypeId)
This method adds a UserBehaviorRule to the cache.
|
void | putRankingStatistic(java.lang.Long objectId, java.lang.String groupId, java.lang.Short objectType, java.lang.Integer storeId, java.lang.Integer elementId, java.lang.Double amount)
This method sets up a ranking statistic entry to be persisted to the database.
|
void | putTriggerListeners(java.lang.String triggerType, java.lang.Integer storeId, java.util.Map nvps, com.ibm.commerce.marketing.internal.runtime.objects.TriggerListen triggerListen)
This method caches a given TriggerListen object.
|
void | removeActivity(java.lang.Integer activityId)
This method removes an activity from the cache.
|
void | removeElement(java.lang.Integer elementId)
This method removes a flow element from the cache.
|
void | removeMarketingSpotDefaultContent(java.lang.Integer storeId, java.lang.Integer emsId)
This method removes the default content entry associated with the e-Marketing spot in the specified store.
|
void | removeMarketingSpotTitle(java.lang.Integer storeId, java.lang.Integer emsId)
This method removes the title entry associated with the e-Marketing spot in the specified store.
|
Activity | replaceActivity(java.lang.Integer activityId)
This method removes the existing Activity object from the cache and reloads the object into the cache from the definition in the database.
|
FlowElement | replaceFlowElement(java.lang.Integer elementId)
This method removes the existing FlowElement object from the cache and reloads the object into the cache from the definition in the database.
|
void | setActivity(ActivityElementData activityElementData, Activity entry, com.ibm.commerce.marketing.internal.runtime.objects.TriggerListen[] triggerListeners)
This method returns an Activity object based on an activityId.
|
void | setFlowElement(FlowElement entry, Activity activity, ActivityElementData activityElementData)
This method updates the cache with the provided FlowElement object.
|
void | setUserBehavior(java.lang.String personalizationId, com.ibm.commerce.marketing.internal.runtime.objects.UserBehavior ub, boolean existing, boolean persistChanges)
This method updates a UserBehavior object based on the personalizationId for a customer in the cache and in the database.
|
static void | shutdown()
Call this method when the WC application is being shut down.
|
static MarketingEngineCache | singleton()
This method returns a singleton MarketingEngineCache object.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String PROCESS_ON_COMMAND_EVENT_NAME
public static final java.lang.Integer ACTIVITY_FOR_DEFAULT_CONTENT
public Activity getActivityFromElementId(java.lang.Integer elementId)
public Activity replaceActivity(java.lang.Integer activityId)
public FlowElement replaceFlowElement(java.lang.Integer elementId)
public Activity getActivity(java.lang.Integer activityId)
public FlowElement getFlowElement(java.lang.String elementId)
public static java.lang.String getXmlStringFromActivityCache(com.ibm.commerce.marketing.internal.runtime.objects.ActivityRootElement activityRootElement)
public static java.lang.StringBuffer getXmlStringFromElement(com.ibm.commerce.marketing.internal.runtime.objects.ActivityFlowElement[] children)
public static java.lang.String getCacheStringFromFlowElement(FlowElement element)
public void invalidateEMarketingSpotActivities(java.lang.String emsId, java.lang.Integer storeId)
public java.util.List loadEMarketingSpotActivitiesFromDatabase(java.lang.String emsId, java.lang.Integer storeId) throws java.lang.Exception
public java.util.List getEMarketingSpotActivities(java.lang.String emsId, java.lang.Integer storeId) throws java.lang.Exception
public void putTriggerListeners(java.lang.String triggerType, java.lang.Integer storeId, java.util.Map nvps, com.ibm.commerce.marketing.internal.runtime.objects.TriggerListen triggerListen)
public java.util.List getTriggerListeners(java.lang.String triggerType, java.lang.Integer storeId, java.util.Map nvps)
public void initialize() throws java.lang.Exception
public void removeActivity(java.lang.Integer activityId)
public void removeElement(java.lang.Integer elementId) throws java.lang.Exception
public void clearAll()
public void clearMarketingCache()
public void clearUserBehaviorCache()
public static java.lang.String[] buildBehaviorRuleKey(java.lang.Integer elementTypeId, java.lang.String command, java.lang.Integer storeId)
public void putBehaviorRule(java.lang.Integer storeId, UserBehaviorRule ub, java.lang.Integer elementTypeId)
public boolean filterCommandBasedOnWebpath(java.lang.String commandName, java.lang.String webpath)
public java.util.List getBehaviorRules(java.lang.String command, java.lang.Integer storeId, java.lang.String urlString, java.lang.String referralURL, java.lang.Integer elementTypeId)
public java.util.List getBehaviorRules(java.lang.String command, java.lang.Integer storeId, java.util.Map urlString, java.lang.String referralURL, java.lang.Integer elementTypeId)
public java.util.List getBehaviorRules(java.lang.String key)
public java.util.Map getBehaviorRules()
public static MarketingEngineCache singleton()
public static void shutdown()
public static void loadExistingBehaviorRulesAndTriggerListeners(java.lang.Integer activityId) throws DataMediatorException
public com.ibm.commerce.marketing.internal.runtime.objects.UserBehavior getUserBehavior(java.lang.String personalizationId, java.lang.Integer storeId)
public void setUserBehavior(java.lang.String personalizationId, com.ibm.commerce.marketing.internal.runtime.objects.UserBehavior ub, boolean existing, boolean persistChanges)
public void flushUserBehaviorBatchUpdateCache()
public void putRankingStatistic(java.lang.Long objectId, java.lang.String groupId, java.lang.Short objectType, java.lang.Integer storeId, java.lang.Integer elementId, java.lang.Double amount)
public void flushRankingStatisticsCache()
public java.lang.String getMarketingSpotOrderingInterface(java.lang.Integer storeId, java.lang.Integer emsId, java.lang.String contentType)
public void removeMarketingSpotDefaultContent(java.lang.Integer storeId, java.lang.Integer emsId)
public void removeMarketingSpotTitle(java.lang.Integer storeId, java.lang.Integer emsId)
public java.util.List getMarketingSpotDefaultContentForSingleStore(java.lang.Integer storeId, java.lang.Integer emsId)
public java.util.List getMarketingSpotDefaultTitleContentForSingleStore(java.lang.Integer storeId, java.lang.Integer emsId)
public java.util.List getMarketingSpotDefaultContent(java.lang.Integer storeId, java.lang.Integer emsId)
public java.util.List getMarketingSpotDefaultTitleContent(java.lang.Integer storeId, java.lang.Integer emsId)
public java.util.Map getSearchEMarketingSpots(java.lang.Integer storeId)
public CampaignInitiativeCache.CachedEMarketingSpot getEmarketingSpot(java.lang.String name, java.lang.String usage, java.lang.Integer storeId)
public void clearEMarketingSpotFromRegistry(java.lang.String name, java.lang.String usage, java.lang.Integer storeId, java.lang.Integer emsId)
public static java.lang.Integer getExistingElementUniqueIdFromElementName(java.lang.String elementName, java.lang.Integer activityId)
public static java.lang.String getElementUniqueIdFromElementName(java.lang.String elementName, java.lang.Integer activityId)
public static java.lang.String getElementUniqueIdFromElementName(java.lang.String elementName, java.lang.String activityName)
public static boolean isInitialized()
public static void invalidateBehaviorRulesLoadedIndicator()
public static void checkBehaviorRulesLoaded(boolean fromSensor)
public static void loadBehaviorRulesByServiceCall()
public java.lang.String getPromotionIdFromName(java.lang.String promoName)
public void setFlowElement(FlowElement entry, Activity activity, ActivityElementData activityElementData)
public static void loadExistingBehaviorRulesAndTriggerListeners(Activity activity, ActivityElementData activityElementData, com.ibm.commerce.marketing.internal.runtime.objects.TriggerListen[] triggerListeners) throws DataMediatorException
public void setActivity(ActivityElementData activityElementData, Activity entry, com.ibm.commerce.marketing.internal.runtime.objects.TriggerListen[] triggerListeners)
public java.util.Map getEmarketingSpotRelatedInfo(java.lang.Integer emsId, java.lang.Integer storeId)
public static boolean getCurrentFoundationVersionIsFEP6()
public static boolean getCurrentCmcVersionIsFEP6orHigher()