public abstract class OrderBaseTag extends BaseTag
An abstract tag class which generates the data required for an analytics vendor to trigger
an order event. The order event generates two sets of data. orderItemsParamVector
object contains the details of all the order items and orderParamMap
object contains
the details of the order. The orderItemsParamVector
inturn contains a HashMap
with each order items details. 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 present inside the orderItemsParamVector
.
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 | +--------------------------------------------------------------------------+ | CUSTOMER_ID | The customer identifier | +--------------------------------------------------------------------------+ | ORDER_ID | The order identifier | +--------------------------------------------------------------------------+ | SUBTOTAL | The sub total for the order | +--------------------------------------------------------------------------+ | 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 | +--------------------------------------------------------------------------+ | ACCOUNT | The Account name in case of a B2B store | | | transaction | +--------------------------------------------------------------------------+ | CONTRACT | The Contract name in case of a B2B store | | | transaction | +--------------------------------------------------------------------------+ | STORE_ID | The store identifier | +--------------------------------------------------------------------------+
Following is the structure of the HashMap
object orderParamMap
.
The keys used in the map are defined in the TagConstants
class.
+--------------------------------------------------------------------------+ | ORDER_ID | The order identifier | +--------------------------------------------------------------------------+ | SUBTOTAL | The sub total for the order | +--------------------------------------------------------------------------+ | SHIPPING | The shipping charges associated with the | | | order | +--------------------------------------------------------------------------+ | CUSTOMER_ID | The customer identifier | +--------------------------------------------------------------------------+ | CUST_CITY | The customer city | +--------------------------------------------------------------------------+ | CUST_STATE | The customer state | +--------------------------------------------------------------------------+ | CUST_ZIP | The customer zip code | +--------------------------------------------------------------------------+ | 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 | +--------------------------------------------------------------------------+ | PROMO_NAME | The promotions applied to the order | +--------------------------------------------------------------------------+ | PROMO_ADJUSTMENT | The promotion adjustment value | +--------------------------------------------------------------------------+ | PROMO_CODE | The Promotion codes of the applied | | | promotions | +--------------------------------------------------------------------------+
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
OrderBaseTag()
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
doStartTag()
Gathers the data required for generating an analytics order event for the vendor specific
classes to consume.
|
java.util.Vector<java.util.HashMap<java.lang.String,java.lang.Object>> |
getOrderItemsParamVector()
Returns the Order item data vector
|
java.util.HashMap<java.lang.String,java.lang.Object> |
getOrderParamMap()
Returns the Order data map
|
void |
setDatabean(OrderDataBean databeanVar)
Sets the order databean to be used to get the data for analysis
|
void |
setExtraparms(java.lang.String extraparmsVar)
Sets the extra parameters which is applicable to all order items that need to be passed
to any analytics vendor
|
void |
setExtraparmsMap(java.util.HashMap extraparmsMapVar)
Sets the extra parameter map, which contains extra parameters that need to be passed
with each order items
|
void |
setIncludeTaxInTotalPrice(boolean includeTaxInTotalPriceVar)
Sets the flag to include the tax component in total price
|
void |
setIncludeTaxInUnitPrice(boolean includeTaxInUnitPriceVar)
Sets the flag to include the tax component in unit price
|
void |
setOrderExtraparms(java.lang.String orderExtraparmsVar)
Set the extra parameters specific to the order data
|
void |
setOrderId(java.lang.String orderIdVar)
Sets the orderId of the order object.
|
void |
setOrderJSON(java.util.HashMap orderJSON)
Sets the
orderJSON JSON object to be used to get the data for analysis |
void |
setOrderType(OrderType ordTypeVar)
Sets the orderType SDO to be used to get the data for analysis
|
void |
setUseKitItems(boolean flag)
Whether the tags need to be generated for all the items in a pre-defined kit
|
getBiprovider, getCategoryIdForProduct, getCollator, getCommandContext, getConfig, getNumberFormat, getOptionValue, getStoreId, isDebug, isOptionDisabled, isOptionEnabled, setBiprovider, setDebug
public static final java.lang.String COPYRIGHT
public void setOrderType(OrderType ordTypeVar)
ordTypeVar
- The orderType to set.public void setOrderJSON(java.util.HashMap orderJSON)
orderJSON
JSON object to be used to get the data for analysisorderJSON
- public java.util.Vector<java.util.HashMap<java.lang.String,java.lang.Object>> getOrderItemsParamVector()
public java.util.HashMap<java.lang.String,java.lang.Object> getOrderParamMap()
public void setDatabean(OrderDataBean databeanVar)
databeanVar
- The order databeanpublic void setOrderId(java.lang.String orderIdVar)
orderIdVar
- The orderId valuepublic void setExtraparms(java.lang.String extraparmsVar)
extraparmsVar
- The extra parameter valuepublic void setExtraparmsMap(java.util.HashMap extraparmsMapVar)
extraparmsMapVar
- public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class BaseTag
EVAL_PAGE
constantjavax.servlet.jsp.JspException
- on any Exceptionpublic void setIncludeTaxInUnitPrice(boolean includeTaxInUnitPriceVar)
includeTaxInUnitPriceVar
- public void setIncludeTaxInTotalPrice(boolean includeTaxInTotalPriceVar)
includeTaxInTotalPriceVar
- public void setOrderExtraparms(java.lang.String orderExtraparmsVar)
orderExtraparmsVar
- public void setUseKitItems(boolean flag)
flag
-