com.ibm.commerce.bi.taglib

Class OrderBaseTag

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag


    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                                |
     +--------------------------------------------------------------------------+
     
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      • Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

        EVAL_BODY_AGAIN
      • Fields inherited from interface javax.servlet.jsp.tagext.Tag

        EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
    • Constructor Summary

      Constructors 
      Constructor and Description
      OrderBaseTag()
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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
      • Methods inherited from class javax.servlet.jsp.tagext.TagSupport

        doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • OrderBaseTag

        public OrderBaseTag()
        Constructor
    • Method Detail

      • setOrderType

        public void setOrderType(OrderType ordTypeVar)
        Sets the orderType SDO to be used to get the data for analysis
        Parameters:
        ordTypeVar - The orderType to set.
      • setOrderJSON

        public void setOrderJSON(java.util.HashMap orderJSON)
        Sets the orderJSON JSON object to be used to get the data for analysis
        Parameters:
        orderJSON -
      • getOrderItemsParamVector

        public java.util.Vector<java.util.HashMap<java.lang.String,java.lang.Object>> getOrderItemsParamVector()
        Returns the Order item data vector
        Returns:
        orderItemsParamVector The order item data vector
      • getOrderParamMap

        public java.util.HashMap<java.lang.String,java.lang.Object> getOrderParamMap()
        Returns the Order data map
        Returns:
        orderParamMap The order data map
      • setDatabean

        public void setDatabean(OrderDataBean databeanVar)
        Sets the order databean to be used to get the data for analysis
        Parameters:
        databeanVar - The order databean
      • setOrderId

        public void setOrderId(java.lang.String orderIdVar)
        Sets the orderId of the order object. If no databean or SDO is provided in the input, an order databean is created using this id.
        Parameters:
        orderIdVar - The orderId value
      • setExtraparms

        public 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
        Parameters:
        extraparmsVar - The extra parameter value
      • setExtraparmsMap

        public void setExtraparmsMap(java.util.HashMap extraparmsMapVar)
        Sets the extra parameter map, which contains extra parameters that need to be passed with each order items
        Parameters:
        extraparmsMapVar -
      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspException
        Gathers the data required for generating an analytics order event for the vendor specific classes to consume.
        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class BaseTag
        Returns:
        always EVAL_PAGE constant
        Throws:
        javax.servlet.jsp.JspException - on any Exception
      • setIncludeTaxInUnitPrice

        public void setIncludeTaxInUnitPrice(boolean includeTaxInUnitPriceVar)
        Sets the flag to include the tax component in unit price
        Parameters:
        includeTaxInUnitPriceVar -
      • setIncludeTaxInTotalPrice

        public void setIncludeTaxInTotalPrice(boolean includeTaxInTotalPriceVar)
        Sets the flag to include the tax component in total price
        Parameters:
        includeTaxInTotalPriceVar -
      • setOrderExtraparms

        public void setOrderExtraparms(java.lang.String orderExtraparmsVar)
        Set the extra parameters specific to the order data
        Parameters:
        orderExtraparmsVar -
      • setUseKitItems

        public void setUseKitItems(boolean flag)
        Whether the tags need to be generated for all the items in a pre-defined kit
        Parameters:
        flag -