public abstract class MembershipBaseTag extends BaseTag
An abstract tag class which generates the data required for an analytics
vendor to trigger a registration view event. The generated data is placed in
a HashMap
object named 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 in turn contain String
objects
Following is the structure of the HashMap
object. The keys used in the map are
defined in the TagConstants
class.
+--------------------------------------------------------------------------+ | CUSTOMER_ID | The customer identifier | +--------------------------------------------------------------------------+ | EMAIL | The email id | +--------------------------------------------------------------------------+ | CITY | Customer city | +--------------------------------------------------------------------------+ | STATE | Customer state | +--------------------------------------------------------------------------+ | ZIPCODE | Customer Zip code | +--------------------------------------------------------------------------+ | NEWSLETTER_NAME | The news letters the customer subscribed | +--------------------------------------------------------------------------+ | SUBSCRIBED_FLAG | Subscribed flag | +--------------------------------------------------------------------------+ | CUSTOMER_COUNTRY | The customer country | +--------------------------------------------------------------------------+ | AGE | Age | +--------------------------------------------------------------------------+ | GENDER | Gender | +--------------------------------------------------------------------------+ | MARITAL_STATUS | marital status | +--------------------------------------------------------------------------+ | NUM_CHILDREN | Number of children | +--------------------------------------------------------------------------+ | NUM_IN_HOUSEHOLD | Number in house hold | +--------------------------------------------------------------------------+ | COMPANY_NAME | Company name | +--------------------------------------------------------------------------+ | HOBBIES | Hobbies | +--------------------------------------------------------------------------+ | INCOME | Income | +--------------------------------------------------------------------------+ | 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 |
---|
MembershipBaseTag() |
Modifier and Type | Method and Description |
---|---|
int |
doStartTag()
Gathers the required data to trigger a registration view event.
|
java.lang.String |
getDataAsJSON()
Returns the analytics data in a JSON format
|
UserRegistrationDataBean |
getDatabean()
Returns the
UserRegistrationDataBean databean instance set |
java.util.HashMap<java.lang.String,java.lang.Object> |
getParamMap()
Returns a
HashMap object with the values required to trigger
an analytics registration event |
PersonType |
getPersonType() |
boolean |
isReturnAsJSON()
Checks whether the tag need to return the data as JSON
|
void |
setAge(java.lang.String ageVar)
Sets the age parameter for this Tag.
|
void |
setCity(java.lang.String cityVar)
Sets the city parameter for this Tag.
|
void |
setCompanyName(java.lang.String companyNameVar)
Sets the companyName parameter for this Tag.
|
void |
setCountry(java.lang.String countryVar)
Sets the country parameter for this Tag.
|
void |
setCustomerId(java.lang.String customerIdVar)
Sets the customerId parameter for this Tag.
|
void |
setDatabean(UserRegistrationDataBean urDataBean)
Sets the
UserRegistrationDataBean databean instance |
void |
setEmail(java.lang.String emailVar)
Sets the email parameter for this Tag.
|
void |
setExtraparms(java.lang.String extraparmsVar)
Sets the additional parameters that should be passed in the page view map
|
void |
setGender(java.lang.String genderVar)
Sets the gender parameter for this Tag.
|
void |
setHobbies(java.lang.String hobbiesVar)
Sets the hobbies parameter for this Tag.
|
void |
setMaritalStatus(java.lang.String maritalStatusVar)
Sets the maritalStatus parameter for this Tag.
|
void |
setNewsletterName(java.lang.String newsletterNameVar)
Sets the newsletterName parameter for this Tag.
|
void |
setNumChildren(java.lang.String numChildrenVar)
Sets the numChildren parameter for this Tag.
|
void |
setNumInHousehold(java.lang.String numInHouseholdVar)
Sets the numInHousehold parameter for this Tag.
|
void |
setPersonJSON(java.util.HashMap personJSON)
Sets the person JSON object to be used to get the data for analysis
|
void |
setPersonType(PersonType persType) |
void |
setReturnAsJSON(boolean flag)
Sets the boolean value whether to return the data as JSON
|
void |
setState(java.lang.String stateVar)
Sets the state parameter for this Tag.
|
void |
setStoreId(java.lang.String storeIdVar)
Sets the storeId parameter for this Tag.
|
void |
setSubscribedFlag(java.lang.String subscribedFlagVar)
Sets the subscribedFlag parameter for this Tag.
|
void |
setZip(java.lang.String zipVar)
Sets the zip parameter for this Tag.
|
getBiprovider, getCategoryIdForProduct, getCollator, getCommandContext, getConfig, getNumberFormat, getOptionValue, getStoreId, isDebug, isOptionDisabled, isOptionEnabled, setBiprovider, setDebug
public static final java.lang.String COPYRIGHT
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 setCustomerId(java.lang.String customerIdVar)
customerIdVar
- the customerId parameter for this Tag.public void setEmail(java.lang.String emailVar)
emailVar
- the email parameter for this Tag.public void setCity(java.lang.String cityVar)
cityVar
- the city parameter for this Tag.public void setState(java.lang.String stateVar)
stateVar
- the state parameter for this Tag.public void setZip(java.lang.String zipVar)
zipVar
- the zip parameter for this Tag.public void setNewsletterName(java.lang.String newsletterNameVar)
newsletterNameVar
- the newsletterName parameter for this Tag.public void setSubscribedFlag(java.lang.String subscribedFlagVar)
subscribedFlagVar
- the subscribedFlag parameter for this Tag.public void setStoreId(java.lang.String storeIdVar)
storeIdVar
- the storeId parameter for this Tag.public void setCountry(java.lang.String countryVar)
countryVar
- the country parameter for this Tag.public void setAge(java.lang.String ageVar)
ageVar
- the age parameter for this Tag.public void setGender(java.lang.String genderVar)
genderVar
- the gender parameter for this Tag.public void setMaritalStatus(java.lang.String maritalStatusVar)
maritalStatusVar
- the maritalStatus parameter for this Tag.public void setNumChildren(java.lang.String numChildrenVar)
numChildrenVar
- the numChildren parameter for this Tag.public void setNumInHousehold(java.lang.String numInHouseholdVar)
numInHouseholdVar
- the numInHousehold parameter for this Tag.public void setCompanyName(java.lang.String companyNameVar)
companyNameVar
- the companyName parameter for this Tag.public void setHobbies(java.lang.String hobbiesVar)
hobbiesVar
- the hobbies parameter for this Tag.public PersonType getPersonType()
public void setPersonType(PersonType persType)
persType
- The personType to set.public void setPersonJSON(java.util.HashMap personJSON)
personJSON
- The person JSON object to set.public void setExtraparms(java.lang.String extraparmsVar)
extraparmsVar
- The additional parameters that will be passed in the
registration view map. Fields delimited by $ will be assumed
to be methods applied to the type of bean set.public java.util.HashMap<java.lang.String,java.lang.Object> getParamMap()
HashMap
object with the values required to trigger
an analytics registration eventpublic void setDatabean(UserRegistrationDataBean urDataBean)
UserRegistrationDataBean
databean instanceurDataBean
- The UserRegistrationDataBean
databean instancepublic UserRegistrationDataBean getDatabean()
UserRegistrationDataBean
databean instance setUserRegistrationDataBean
databean instance setpublic boolean isReturnAsJSON()
public void setReturnAsJSON(boolean flag)
flag
- The boolean value whether to return the data as JSONpublic java.lang.String getDataAsJSON()