public class TrackingCodeProcessor
extends atg.adc.pipeline.ADCEventPipelineProcessor
JMSTypes
events present)ADCEventPipelineProcessor
and serves as a base class for the all other clickstream tracking code
related processors (for product, category pages, search result pages, etc.)Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CART_ENTRY |
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
CUSTOMER_ID_ENTRY |
static int |
DEFAULT_TIMEOUT
Default failover timeout
|
static java.lang.String |
DISABLED_FAILOVER |
static java.lang.String |
EXCLUDE_DEFAULT_STORE_ENTRY |
static java.lang.String |
FAILOVER_CONTENT |
static java.lang.String |
FAILOVER_ENTRY |
static java.lang.String |
FAILOVER_SKIP_RECOMMENDATIONS |
static java.lang.String |
FAILOVER_TIMEOUT_ENTRY |
static java.lang.String |
INCLUDE_PRICE_ENTRY |
static java.lang.String |
LOCALE_ENTRY |
static java.lang.String |
PERFORM_MONITOR_NAME |
static java.lang.String |
PERFORM_OPERATION_NAME |
static java.lang.String |
PRODUCT_ENTRY |
static java.lang.String |
RETAILER_ID_ENTRY |
static java.lang.String |
STORE_ID_ENTRY |
static java.lang.String |
TRACKING_DIV
Entries format constants
|
static java.lang.String |
VIEW_ENTRY |
STOP_CHAIN_EXECUTION, STOP_CHAIN_EXECUTION_AND_COMMIT, STOP_CHAIN_EXECUTION_AND_ROLLBACK
Constructor and Description |
---|
TrackingCodeProcessor() |
Modifier and Type | Method and Description |
---|---|
protected void |
appendEntry(java.lang.StringBuilder pTrackingCodeContent,
java.lang.String pEntry)
The utility method that appends entry to the StringBuilder in the case if it's not null
or empty.
|
protected java.lang.String |
buildCartEntry(atg.adc.pipeline.ADCPipelineArgs pArgs,
atg.commerce.order.Order pOrder)
Builds 'cart' entry for the recommendations clickstream tracking code.
|
java.lang.String |
buildCustomerIdEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
Builds customerId entry for the recommendations clickstream tracking code.
|
protected java.lang.String |
buildExcludeDefaultStoreEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
Builds 'excludeDefaultStore' parameter entry for the recommendations clickstream
tracking code.
|
protected java.lang.String |
buildFailoverEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
Builds failover configuration entry.
|
protected java.lang.String |
buildIncludePriceEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
Builds '-inc-price' entry for the recommendations clickstream tracking code.
|
protected java.lang.String |
buildLocaleEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
Builds 'locale' entry for the recommendations clickstream tracking code.
|
java.lang.String |
buildRetailerIdEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
Builds retailer ID entry for recommendations tracking code.
|
protected java.lang.String |
buildStoreIdEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
Builds storeId entry for the recommendations clickstream tracking code.
|
protected java.lang.String |
buildTrackingCode(atg.adc.pipeline.ADCPipelineArgs pArgs)
Builds recommendations tracking code markup to be appended to the ADC data.
|
protected java.lang.String |
buildTrackingCodeContent(atg.adc.pipeline.ADCPipelineArgs pArgs)
Builds the content of tracking code DIV element.
|
protected java.lang.String |
buildTrackingCodeViewContent(atg.adc.pipeline.ADCPipelineArgs pArgs)
Builds the content of the recommendations 'view' configuration parameter
that will be put inside of the tracking code view entry.
|
protected java.lang.String |
buildTrackingCodeViewEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
Builds view entry for the recommendations clickstream tracking code.
|
protected atg.commerce.order.Order |
getCurrentOrder(atg.adc.pipeline.ADCPipelineArgs pArgs)
The method gets Order object corresponding to the current user's
shopping cart.
|
int |
getFailoverTimeout()
Gets the failover timeout in milliseconds indicating how long to wait for generated
recommendations before using the failover.
|
atg.commerce.pricing.priceLists.PriceListManager |
getPriceListManager()
Gets the price list manager
|
java.lang.String |
getRetailerId()
Gets the Retailer Id provided by Recommendations On Demand service
|
java.lang.String |
getShoppingCartPath()
Gets path to shopping cart Nucleus component
|
boolean |
isEnableFailover()
Returns the boolean indicating whether Recommendations failover should be disabled.
|
boolean |
isExcludeDefaultStore()
Returns ecludeDefaultStore, that represents the value of
excludeDefaultStore parameter for clickstream tracking code.
|
protected boolean |
isIncludeCartContent(atg.adc.pipeline.ADCPipelineArgs pArgs)
This method checks whether ADCRequestData contains one of the events listed
in the JMSTypes property.
|
boolean |
isIncludeLocale()
Returns the boolean indicating whether 'locale'
entry should be included into tracking code.
|
boolean |
isIncludePrice()
Returns the boolean indicating whether 'include price'
entry should be included into tracking code.
|
boolean |
isSkipRecommendations()
Returns the boolean indicating whether generated recommendations should be skipped and
Recommendations failover content should be used instead.
|
boolean |
isUseContentFailover()
Returns the boolean indicating whether the content included into the recommendations container should
be displayed as failover content.
|
protected int |
processADCData(atg.adc.pipeline.ADCPipelineArgs pArgs)
Builds and appends tracking code to the response stream.
|
int |
processEvent(atg.adc.pipeline.ADCPipelineArgs pArgs,
javax.jms.Message pMessage)
Do nothing.
|
void |
setEnableFailover(boolean pEnableFailover)
Sets the boolean indicating whether Recommendations failover should be disabled.
|
void |
setExcludeDefaultStore(boolean pExcludeDefaultStore)
Sets ecludeDefaultStore, that represents the value of
excludeDefaultStore parameter for clickstream tracking code.
|
void |
setFailoverTimeout(int pFailoverTimeout)
Sets the failover timeout in milliseconds indicating how long to wait for generated
recommendations before using the failover.
|
void |
setIncludeLocale(boolean pIncludeLocale)
Sets includeLocale, that indicates whether 'locale' entry should be
included into tracking code.
|
void |
setIncludePrice(boolean pIncludePrice)
Sets includePrice, that indicates whether 'include price'
entry should be included into tracking code.
|
void |
setPriceListManager(atg.commerce.pricing.priceLists.PriceListManager pPriceListManager)
Sets the price list manager
|
void |
setRetailerId(java.lang.String pRetailerId)
Sets Retailer Id provided by Recommendations On Demand service
|
void |
setShoppingCartPath(java.lang.String pShoppingCartPath)
Sets Get path to shopping cart Nucleus component
|
void |
setSkipRecommendations(boolean pSkipRecommendations)
Sets the boolean indicating whether generated recommendations should be skipped and
Recommendations failover content should be used instead.
|
void |
setUseContentFailover(boolean pUseContentFailover)
Sets the boolean indicating whether the content included into the recommendations container should
be displayed as failover content.
|
int |
updateADCData(atg.adc.pipeline.ADCPipelineArgs pArgs)
If the ADC request data stored in pipeline arguments contains all
required data the method builds recommendations clickstream
tracking code and appends it to the current auto-tagging data in stored
in the ADC request data that later will be inserted into response output stream.
|
protected boolean |
validateRequiredData(atg.adc.pipeline.ADCPipelineArgs pArgs)
The method checks whether the ADC data stored in pipeline
arguments contains all required information for the processor.
|
getJMSTypes, getObjectFromMessage, processEvents, setJMSTypes
getRetCodes, isEnabled, runProcess, setEnabled
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService, toString
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
public static final java.lang.String TRACKING_DIV
public static final java.lang.String CUSTOMER_ID_ENTRY
public static final java.lang.String RETAILER_ID_ENTRY
public static final java.lang.String STORE_ID_ENTRY
public static final java.lang.String VIEW_ENTRY
public static final java.lang.String EXCLUDE_DEFAULT_STORE_ENTRY
public static final java.lang.String PRODUCT_ENTRY
public static final java.lang.String CART_ENTRY
public static final java.lang.String INCLUDE_PRICE_ENTRY
public static final java.lang.String LOCALE_ENTRY
public static final java.lang.String FAILOVER_ENTRY
public static final java.lang.String DISABLED_FAILOVER
public static final java.lang.String FAILOVER_TIMEOUT_ENTRY
public static final java.lang.String FAILOVER_SKIP_RECOMMENDATIONS
public static final java.lang.String FAILOVER_CONTENT
public static final int DEFAULT_TIMEOUT
public static final java.lang.String PERFORM_MONITOR_NAME
public static final java.lang.String PERFORM_OPERATION_NAME
public atg.commerce.pricing.priceLists.PriceListManager getPriceListManager()
public void setPriceListManager(atg.commerce.pricing.priceLists.PriceListManager pPriceListManager)
pPriceListManager
- the price list managerpublic boolean isIncludeLocale()
public void setIncludeLocale(boolean pIncludeLocale)
pIncludeLocale
- the includeLocale to setpublic boolean isIncludePrice()
public void setIncludePrice(boolean pIncludePrice)
pIncludePrice
- the includePrice to setpublic java.lang.String getShoppingCartPath()
public void setShoppingCartPath(java.lang.String pShoppingCartPath)
pShoppingCartPath
- the path to shopping cart Nucleus componentpublic boolean isExcludeDefaultStore()
public void setExcludeDefaultStore(boolean pExcludeDefaultStore)
pExcludeDefaultStore
- the boolean representing the value of
excludeDefaultStore parameter for clickstream tracking code.public java.lang.String getRetailerId()
public void setRetailerId(java.lang.String pRetailerId)
pRetailerId
- the Retailer Id to setpublic boolean isEnableFailover()
public void setEnableFailover(boolean pEnableFailover)
pEnableFailover
- the boolean indicating whether Recommendations failover should be disabled.public boolean isSkipRecommendations()
public void setSkipRecommendations(boolean pSkipRecommendations)
pSkipRecommendations
- The boolean indicating whether generated recommendations should be skipped and
Recommendations failover content should be used instead.public boolean isUseContentFailover()
public void setUseContentFailover(boolean pUseContentFailover)
pUseContentFailover
- the boolean indicating whether the content included into the recommendations container should
be displayed as failover content.public int getFailoverTimeout()
public void setFailoverTimeout(int pFailoverTimeout)
pFailoverTimeout
- the failover timeout in milliseconds indicating how long to wait
for generated recommendations before using the failover.public int updateADCData(atg.adc.pipeline.ADCPipelineArgs pArgs)
updateADCData
in class atg.adc.pipeline.ADCEventPipelineProcessor
pArgs
- The pipeline argumentsprotected boolean validateRequiredData(atg.adc.pipeline.ADCPipelineArgs pArgs)
pArgs
- The pipeline argumentsprotected int processADCData(atg.adc.pipeline.ADCPipelineArgs pArgs)
pArgs
- The pipeline argumentsprotected java.lang.String buildTrackingCode(atg.adc.pipeline.ADCPipelineArgs pArgs)
pArgs
- ADC pipeline argumentsprotected java.lang.String buildTrackingCodeContent(atg.adc.pipeline.ADCPipelineArgs pArgs)
pArgs
- ADC pipeline argumentsprotected void appendEntry(java.lang.StringBuilder pTrackingCodeContent, java.lang.String pEntry)
pTrackingCodeContent
- trackingCodeContent StringBuilder objectpEntry
- the entry to append to trackingCodeContentprotected java.lang.String buildTrackingCodeViewEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
buildTrackingCodeViewContent()
and inserting the result into 'view' entry container markup.pArgs
- ADC pipeline argumentsprotected java.lang.String buildTrackingCodeViewContent(atg.adc.pipeline.ADCPipelineArgs pArgs)
buildStoreIdEntry()
and
buildExcludeDefaultStoreEntry()
will be called.pArgs
- ADC pipeline argumentspublic java.lang.String buildRetailerIdEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
pArgs
- ADC pipeline argumentspublic java.lang.String buildCustomerIdEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
pArgs
- ADC pipeline argumentsprotected java.lang.String buildStoreIdEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
pArgs
- ADC pipeline argumentsprotected java.lang.String buildLocaleEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
pArgs
- ADC pipeline argumentsprotected java.lang.String buildIncludePriceEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
pArgs
- ADC pipeline argumentsprotected java.lang.String buildExcludeDefaultStoreEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
pArgs
- ADC pipeline argumentsprotected java.lang.String buildFailoverEntry(atg.adc.pipeline.ADCPipelineArgs pArgs)
pArgs
- ADC pipeline argumentsprotected java.lang.String buildCartEntry(atg.adc.pipeline.ADCPipelineArgs pArgs, atg.commerce.order.Order pOrder)
pArgs
- ADC pipeline argumentspOrder
- current shopping cartprotected atg.commerce.order.Order getCurrentOrder(atg.adc.pipeline.ADCPipelineArgs pArgs)
buildCartEntry()
method for further processing.pArgs
- ADC pipeline argumentsprotected boolean isIncludeCartContent(atg.adc.pipeline.ADCPipelineArgs pArgs)
pArgs
- ADC pipeline argumentspublic int processEvent(atg.adc.pipeline.ADCPipelineArgs pArgs, javax.jms.Message pMessage)
processEvent
in class atg.adc.pipeline.ADCEventPipelineProcessor
pArgs
- The ADCPipelineArgs for this pipeline executionpMessage
- A JMS message that matches one of the types in the JMSTypes
property.