public abstract class ProcAddProductViewed
extends ADCEventPipelineProcessor
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
Constructor and Description |
---|
ProcAddProductViewed() |
Modifier and Type | Method and Description |
---|---|
ProductViewed |
addProductViewedObject(ADCPipelineArgs pArgs,
RepositoryItem pProduct,
boolean pInCart)
This method will determine the category for the given product and then
add or update a ProductViewed object in the session data.
|
ProductViewed |
addProductViewedObject(ADCPipelineArgs pArgs,
java.lang.String pProductId,
java.lang.String pCategoryId,
boolean pInCart)
This method will see if a ProductViewed object for the given product
Id exists in the session data.
|
void |
clearProductsViewedFromCart(java.util.Hashtable pProductsViewed)
This method sets inCart=false for all items in the ProductsViewed Hashtable
|
java.lang.String |
getDefaultCategory() |
java.lang.String |
getParentCategoryPropertyName() |
java.lang.String |
getProductCategoryId(ADCPipelineArgs pArgs,
RepositoryItem pProduct)
This method will get the category id to be associated with this product in its
ProductViewed object.
|
boolean |
isUseParentCategory() |
boolean |
isUsePreviousRequestCategoryId() |
void |
setDefaultCategory(java.lang.String pDefaultCategory)
The default page category.
|
void |
setParentCategoryPropertyName(java.lang.String pParentCategoryPropertyName)
The name of the property in the product item descriptor to use for the
category to be associated with the product view.
|
void |
setUseParentCategory(boolean pUseParentCategory)
Boolean indicating if the product's parentCategory property should be
used to get the category parameter value if the category was not set
by a droplet, JSP tag, query string parameter, or the previous request's category.
|
void |
setUsePreviousRequestCategoryId(boolean pUsePreviousRequestCategoryId)
Boolean indicating if the category associated with the previous request
should be used to get the category parameter value if the category was not set
by a droplet, JSP tag, or query string parameter.
|
public static final java.lang.String CLASS_VERSION
public void setDefaultCategory(java.lang.String pDefaultCategory)
pDefaultCategory
- The default page categorypublic java.lang.String getDefaultCategory()
public void setParentCategoryPropertyName(java.lang.String pParentCategoryPropertyName)
pParentCategoryPropertyName
- The name of the property in the product
item descriptor to use for the category to be associated with
the product view.public java.lang.String getParentCategoryPropertyName()
public void setUseParentCategory(boolean pUseParentCategory)
pUseParentCategory
- Boolean indicating if the product's parentCategory
property should be used to get the category parameter value if the
category was not set by a droplet, JSP tag, query string parameter,
or the previous request's category.public boolean isUseParentCategory()
public void setUsePreviousRequestCategoryId(boolean pUsePreviousRequestCategoryId)
pUseParentCategory
- Boolean indicating if the category associated with
the previous request should be used to get the category parameter value if the
category was not set by a droplet, JSP tag, or query string parameter.public boolean isUsePreviousRequestCategoryId()
public ProductViewed addProductViewedObject(ADCPipelineArgs pArgs, RepositoryItem pProduct, boolean pInCart)
pArgs
- the ADC pipeline arguments.pProduct
- the product that has been viewed.pInCart
- boolean indicating if the product is in the current order.public ProductViewed addProductViewedObject(ADCPipelineArgs pArgs, java.lang.String pProductId, java.lang.String pCategoryId, boolean pInCart)
pArgs
- the ADC pipeline arguments.pProductId
- the ID of the product that has been viewed.pCategoryId
- the ID of the category that the product was viewed in.pInCart
- boolean indicating if the product is in the current order.public java.lang.String getProductCategoryId(ADCPipelineArgs pArgs, RepositoryItem pProduct)
usePreviousRequestCategoryId
and useParentCategory
properties.pArgs
- the pipeline argumentspProduct
- the product repository itempublic void clearProductsViewedFromCart(java.util.Hashtable pProductsViewed)
pProductsViewed
- the Hashtable mapping productIds to ProductViewed objects