com.ibm.commerce.bi.taglib

Class ConversionBaseTag

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


    public abstract class ConversionBaseTag
    extends BaseTag

    An abstract tag class which generates the data required for an analytics vendor to trigger a non e-commerce conversion event. The generated data is placed in a HashMap object paramMap which the analytics vendor classes can consume. 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.

     +------------------------------------------------------------+ 
     | EVENT_ID       | The value of the eventId attribute        | 
     +------------------------------------------------------------+
     | CATEGORY       | The category to which the page belongs    |
     +------------------------------------------------------------+
     | ACTION_TYPE    | The value of the eventId attribute        |
     +------------------------------------------------------------+
     | POINTS         | The value of the points attribute         |
     +------------------------------------------------------------+
     | EXTRA_PARAMS   | The extra parameters which the users      |
     |                | want to send along with the conversion    |
     |                | 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                      |
     +------------------------------------------------------------+
     
    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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int doStartTag()
      Gathers the required data to trigger the event data.
      java.lang.String getDataAsJSON()
      Returns the analytics data in a JSON format
      java.util.HashMap<java.lang.String,java.lang.Object> getParamMap()
      Returns the element data map which contain the data required for an analytics vendor to invoke a non e-commerce conversion event
      boolean isReturnAsJSON()
      Checks whether the tag need to return the data as JSON
      void setActionType(java.lang.String actionTypeVar)
      Sets the action type for the non e-conversion event
      void setCategory(java.lang.String categoryVar)
      Sets the category to which the event belongs
      void setEventId(java.lang.String eventIdVar)
      Sets the eventId for the non e-conversion event
      void setExtraparms(java.lang.String extraparmsVar)
      Sets the additional parameters that should be passed in the page view map
      void setPoints(java.lang.String pointsVar)
      Sets the points for the non e-conversion event
      void setReturnAsJSON(boolean flag)
      Sets the boolean value whether to return the data as JSON
      • 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

      • ConversionBaseTag

        public ConversionBaseTag()
    • Method Detail

      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspException
        Gathers the required data to trigger the event data.
        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
      • getParamMap

        public java.util.HashMap<java.lang.String,java.lang.Object> getParamMap()
        Returns the element data map which contain the data required for an analytics vendor to invoke a non e-commerce conversion event
        Returns:
        The page view map
      • setCategory

        public void setCategory(java.lang.String categoryVar)
        Sets the category to which the event belongs
        Parameters:
        categoryVar - The category to which the event belongs
      • setExtraparms

        public void setExtraparms(java.lang.String extraparmsVar)
        Sets the additional parameters that should be passed in the page view map
        Parameters:
        extraparmsVar - The additional parameters that will be passed in the page view map. Fields delimited by $ will be assumed to be methods applied to com.ibm.commerce.search.beans.CatEntrySearchListDataBean.
      • getDataAsJSON

        public java.lang.String getDataAsJSON()
        Returns the analytics data in a JSON format
        Returns:
        A JSON String
      • isReturnAsJSON

        public boolean isReturnAsJSON()
        Checks whether the tag need to return the data as JSON
        Returns:
        A boolean value whether the tag need to return the data as JSON
      • setReturnAsJSON

        public void setReturnAsJSON(boolean flag)
        Sets the boolean value whether to return the data as JSON
        Parameters:
        flag - The boolean value whether to return the data as JSON
      • setEventId

        public void setEventId(java.lang.String eventIdVar)
        Sets the eventId for the non e-conversion event
        Parameters:
        eventIdVar - The eventId
      • setActionType

        public void setActionType(java.lang.String actionTypeVar)
        Sets the action type for the non e-conversion event
        Parameters:
        actionTypeVar - The action type
      • setPoints

        public void setPoints(java.lang.String pointsVar)
        Sets the points for the non e-conversion event
        Parameters:
        pointsVar - The points