public abstract class CommonBaseTag extends BaseTag
An abstract tag class which generates the data required for an analytics vendor to trigger a page view 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.
+------------------------------------------------------------+ | PAGE_ID | The value of the pagename attribute | +------------------------------------------------------------+ | CATEGORY | The category to which the page belongs | +------------------------------------------------------------+ | SRCH_KEYWORD | In case of search results page, the | | | search keyword | +------------------------------------------------------------+ | SRCH_RESULTS | In case of search results page, the | | | number of search results returned | +------------------------------------------------------------+ | EXTRA_PARAMS | The extra parameters which the users | | | want to send along with the pageview | | | 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.
|
protected static java.lang.String | DEFAULT_PAGE_TYPE
Default page type
|
protected static java.lang.String | DEFAULT_PAGE_TYPE_SEPARATOR
Default page separator
|
Constructor and Description |
---|
CommonBaseTag() |
Modifier and Type | Method and Description |
---|---|
int | doStartTag()
Gathers the required data to trigger the page view event.
|
java.lang.String | getDataAsJSON()
Returns the analytics data in a JSON format
|
java.util.HashMap<java.lang.String,java.lang.Object> | getParamMap()
Returns the page view map which contain the data required for an analytics vendor to invoke a page view event
|
boolean | isReturnAsJSON()
Checks whether the tag need to return the data as JSON
|
void | setCategory(java.lang.String categoryVar)
Sets the category to which the page belongs
|
void | setDatabean(CatEntrySearchListDataBean databeanVar)
Set the databean that will be used to get the search keyword and number of search results in case of a search results page
|
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 | setPageType(java.lang.String pageTypeVar)
Sets the page type 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
|
void | setSrchKeyword(java.lang.String srchKeywordVar)
Sets the search keyword to be used in the page view map.
|
void | setSrchResults(java.lang.String srchResultsVar)
Sets the search results to be used in the page view map.
|
public static final java.lang.String COPYRIGHT
protected static final java.lang.String DEFAULT_PAGE_TYPE
protected static final java.lang.String DEFAULT_PAGE_TYPE_SEPARATOR
public int doStartTag() throws javax.servlet.jsp.JspException
public java.util.HashMap<java.lang.String,java.lang.Object> getParamMap()
public void setCategory(java.lang.String categoryVar)
public void setDatabean(CatEntrySearchListDataBean databeanVar)
public void setSrchKeyword(java.lang.String srchKeywordVar)
public void setSrchResults(java.lang.String srchResultsVar)
public void setExtraparms(java.lang.String extraparmsVar)
public void setPagename(java.lang.String pagenameVar)
public void setPageType(java.lang.String pageTypeVar)
public java.lang.String getDataAsJSON()
public boolean isReturnAsJSON()
public void setReturnAsJSON(boolean flag)