public abstract class CartBaseTag extends BaseTag
An abstract tag class which generates the data required for an analytics vendor to trigger a shopping cart 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. Each HashMap object contains data about an item in the shopping cart. 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.
+--------------------------------------------------------------------------+ | PART_NUMBER | The part number of the product | +--------------------------------------------------------------------------+ | PRODUCT_NAME | The part number of the viewed product | +--------------------------------------------------------------------------+ | QUANTITY | Quantity | +--------------------------------------------------------------------------+ | BASE_PRICE | The unit price | +--------------------------------------------------------------------------+ | 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 | +--------------------------------------------------------------------------+ | CURRENCY | Currency | +--------------------------------------------------------------------------+ | EXTRA_PARAMS | The extra parameters which the users | | | want to send along with the shop cart | | | 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 |
---|
CartBaseTag() |
Modifier and Type | Method and Description |
---|---|
int | doStartTag()
Gathers the data required for generating an analytics cart view event and places that in an attribute for the vendor specific classes to consume.
|
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 or the SDO.
|
boolean | isReturnAsJSON()
Checks whether the tag need to return the data as JSON
|
void | setDatabean(OrderDataBean databeanVar) |
void | setExtraparms(java.lang.String extraparmsVar)
Sets the additional parameters that need to be passed in the HashMap object.
|
void | setExtraparmsMap(java.util.HashMap extraparmsMapVar)
Sets the additional parameter that need to be passed with specific items in the cart.
|
void | setIncludeDiscountsInUnitPrice(boolean discounted)
Sets the flag to pass discounted price in the Coremetrics cmCreateShopAction5() tag.
|
void | setIncludeTaxInUnitPrice(boolean includeTaxInUnitPriceVar)
Sets the boolean parameter to conditionally include tax component in unit price
|
void | setOrderId(java.lang.String orderIdVar)
Sets the order ID parameter.
|
void | setOrderJSON(java.util.HashMap orderJSON)
Sets the orderJSON JSON object to be used to get the data for analysis
|
void | setOrderType(OrderType orderTypeVar)
Sets the OrderType SDO object
|
void | setReturnAsJSON(boolean flag)
Sets the boolean value whether to return the data as JSON
|
void | setUseKitItems(boolean flag)
Whether the tags need to be generated for all the items in a pre-defined kit
|
public static final java.lang.String COPYRIGHT
public int doStartTag() throws javax.servlet.jsp.JspException
public void setDatabean(OrderDataBean databeanVar)
public void setOrderId(java.lang.String orderIdVar)
public void setOrderType(OrderType orderTypeVar)
public void setOrderJSON(java.util.HashMap orderJSON)
public void setExtraparms(java.lang.String extraparmsVar)
public java.util.Vector<java.util.HashMap<java.lang.String,java.lang.Object>> getParamVector()
public void setIncludeTaxInUnitPrice(boolean includeTaxInUnitPriceVar)
public void setExtraparmsMap(java.util.HashMap extraparmsMapVar)
public void setUseKitItems(boolean flag)
public java.lang.String getDataAsJSON(boolean useCatIdOverride)
public boolean isReturnAsJSON()
public void setReturnAsJSON(boolean flag)
public void setIncludeDiscountsInUnitPrice(boolean discounted)