public abstract class ProductBaseTag extends BaseTag
An abstract tag class which generates the data required for an analytics vendor to trigger a product view event. The generated data is placed in a Vector object named paramVector which the analytics vendor classes can consume. Each element in the paramVector will contain a HashMap object. If the product viewed is a product or an item, the paramVector object will have one HashMap object with the details of the viewed product or item. If the product viewed is a bundle or package, the paramVector object will contain data about the bundle or package itself and the composite elements within the package or bundle. The value for all the keys in the HashMap, except for EXTRA_PARAMS, are String objects. The value for EXTRA_PARAMS will be an ArrayList object which inturn contain String objects
Following is the structure of the HashMap object. The keys used in the map are defined in the TagConstants class.
+--------------------------------------------------------------------------+ | PAGE_ID | The value of the pagename attribute | +--------------------------------------------------------------------------+ | PART_NUMBER | The part number of the viewed product | +--------------------------------------------------------------------------+ | PRODUCT_NAME | The part number of the viewed product | +--------------------------------------------------------------------------+ | CATEGORY | The category to which the product belong | | | in the current browsing catalog | +--------------------------------------------------------------------------+ | MASTER_CATALOG_CATEGORY | The category to which the product belong | | | in the master catalog | +--------------------------------------------------------------------------+ | EXTRA_PARAMS | The extra parameters which the users | | | want to send along with the product | | | tag. The value for this key will be an | | | object of type 'java.util.ArrayList' | | | which inturn contains String objects | +--------------------------------------------------------------------------+ | STORE_ID | The store identifier | +--------------------------------------------------------------------------+
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
ProductBaseTag() |
Modifier and Type | Method and Description |
---|---|
protected com.ibm.commerce.catalog.facade.datatypes.ShowCatalogNavigationViewDataAreaType | buildShowCatalogNavigationViewDataAreaType(java.lang.String uniqueIdParameter, java.lang.String accessProfile)
This method builds the ShowCatalogNavigationViewDataAreaType object with the xpath expression and xpath parameters
|
int | doStartTag()
Gathers the required data to trigger a product view event.
|
java.lang.String | getDataAsJSON(boolean useCatIdOverride)
Returns the analytics data in a JSON format
|
java.util.Vector<java.util.HashMap<java.lang.String,java.lang.Object>> | getParamVector()
Returns a vector object which contain one or more HashMap objects based on the databean type.
|
protected boolean | isRequiredFeaturePackEnabled()
This method determines whether the specified or higher version of the foundation feature is enabled in the deployed application.
|
protected boolean | isRequiredFeaturePackEnabledJSON()
This method determines whether the required version of the foundation feature in which JSON support was implemented is enabled in the deployed application.
|
boolean | isReturnAsJSON()
Checks whether the tag need to return the data as JSON
|
void | setCatalogNavigationViewJSON(java.util.HashMap catalogNavigationViewJSONVar)
Sets the CatalogNavigationView JSON to be used to get the data for analysis
|
void | setCatalogNavigationViewType(CatalogNavigationViewType catalogNavigationViewTypeVar)
Sets the CatalogNavigationViewType SDO to be used to get the data for analysis
|
void | setCatentryId(java.lang.String catentryIdVar)
Sets the catalog entry ID parameter for this Tag.
|
void | setDatabean(com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean databeanVar)
Sets the databean for this Tag.
|
void | setExtraparms(java.lang.String extraparmsVar)
Sets the additional parameters that should be passed in the page view map
|
void | setPagename(java.lang.String pagenameVar)
Sets the page name that need to be passed in the page view map
|
void | setReturnAsJSON(boolean flag)
Sets the boolean value whether to return the data as JSON
|
public static final java.lang.String COPYRIGHT
public int doStartTag() throws javax.servlet.jsp.JspException
protected boolean isRequiredFeaturePackEnabled() throws com.ibm.commerce.wc.appmanagement.exception.WCAppManagementException
protected boolean isRequiredFeaturePackEnabledJSON() throws com.ibm.commerce.wc.appmanagement.exception.WCAppManagementException
protected com.ibm.commerce.catalog.facade.datatypes.ShowCatalogNavigationViewDataAreaType buildShowCatalogNavigationViewDataAreaType(java.lang.String uniqueIdParameter, java.lang.String accessProfile)
public void setCatentryId(java.lang.String catentryIdVar)
public void setDatabean(com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean databeanVar)
public void setCatalogNavigationViewType(CatalogNavigationViewType catalogNavigationViewTypeVar)
public void setCatalogNavigationViewJSON(java.util.HashMap catalogNavigationViewJSONVar)
public void setExtraparms(java.lang.String extraparmsVar)
public java.util.Vector<java.util.HashMap<java.lang.String,java.lang.Object>> getParamVector()
public void setPagename(java.lang.String pagenameVar)
public java.lang.String getDataAsJSON(boolean useCatIdOverride)
public boolean isReturnAsJSON()
public void setReturnAsJSON(boolean flag)