com.ibm.commerce.bi.taglib

Class MembershipBaseTag

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


    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                      |
     +--------------------------------------------------------------------------+
     
    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 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.
      • 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

      • MembershipBaseTag

        public MembershipBaseTag()
    • Method Detail

      • doStartTag

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

        public void setCustomerId(java.lang.String customerIdVar)
        Sets the customerId parameter for this Tag.
        Parameters:
        customerIdVar - the customerId parameter for this Tag.
      • setEmail

        public void setEmail(java.lang.String emailVar)
        Sets the email parameter for this Tag.
        Parameters:
        emailVar - the email parameter for this Tag.
      • setCity

        public void setCity(java.lang.String cityVar)
        Sets the city parameter for this Tag.
        Parameters:
        cityVar - the city parameter for this Tag.
      • setState

        public void setState(java.lang.String stateVar)
        Sets the state parameter for this Tag.
        Parameters:
        stateVar - the state parameter for this Tag.
      • setZip

        public void setZip(java.lang.String zipVar)
        Sets the zip parameter for this Tag.
        Parameters:
        zipVar - the zip parameter for this Tag.
      • setNewsletterName

        public void setNewsletterName(java.lang.String newsletterNameVar)
        Sets the newsletterName parameter for this Tag.
        Parameters:
        newsletterNameVar - the newsletterName parameter for this Tag.
      • setSubscribedFlag

        public void setSubscribedFlag(java.lang.String subscribedFlagVar)
        Sets the subscribedFlag parameter for this Tag.
        Parameters:
        subscribedFlagVar - the subscribedFlag parameter for this Tag.
      • setStoreId

        public void setStoreId(java.lang.String storeIdVar)
        Sets the storeId parameter for this Tag.
        Parameters:
        storeIdVar - the storeId parameter for this Tag.
      • setCountry

        public void setCountry(java.lang.String countryVar)
        Sets the country parameter for this Tag.
        Parameters:
        countryVar - the country parameter for this Tag.
      • setAge

        public void setAge(java.lang.String ageVar)
        Sets the age parameter for this Tag.
        Parameters:
        ageVar - the age parameter for this Tag.
      • setGender

        public void setGender(java.lang.String genderVar)
        Sets the gender parameter for this Tag.
        Parameters:
        genderVar - the gender parameter for this Tag.
      • setMaritalStatus

        public void setMaritalStatus(java.lang.String maritalStatusVar)
        Sets the maritalStatus parameter for this Tag.
        Parameters:
        maritalStatusVar - the maritalStatus parameter for this Tag.
      • setNumChildren

        public void setNumChildren(java.lang.String numChildrenVar)
        Sets the numChildren parameter for this Tag.
        Parameters:
        numChildrenVar - the numChildren parameter for this Tag.
      • setNumInHousehold

        public void setNumInHousehold(java.lang.String numInHouseholdVar)
        Sets the numInHousehold parameter for this Tag.
        Parameters:
        numInHouseholdVar - the numInHousehold parameter for this Tag.
      • setCompanyName

        public void setCompanyName(java.lang.String companyNameVar)
        Sets the companyName parameter for this Tag.
        Parameters:
        companyNameVar - the companyName parameter for this Tag.
      • setHobbies

        public void setHobbies(java.lang.String hobbiesVar)
        Sets the hobbies parameter for this Tag.
        Parameters:
        hobbiesVar - the hobbies parameter for this Tag.
      • getPersonType

        public PersonType getPersonType()
        Returns:
        Returns the personType.
      • setPersonType

        public void setPersonType(PersonType persType)
        Parameters:
        persType - The personType to set.
      • setPersonJSON

        public void setPersonJSON(java.util.HashMap personJSON)
        Sets the person JSON object to be used to get the data for analysis
        Parameters:
        personJSON - The person JSON object to set.
      • 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 registration view map. Fields delimited by $ will be assumed to be methods applied to the type of bean set.
      • getParamMap

        public java.util.HashMap<java.lang.String,java.lang.Object> getParamMap()
        Returns a HashMap object with the values required to trigger an analytics registration event
        Returns:
        paramMap
      • setDatabean

        public void setDatabean(UserRegistrationDataBean urDataBean)
        Sets the UserRegistrationDataBean databean instance
        Parameters:
        urDataBean - The UserRegistrationDataBean databean instance
      • getDatabean

        public UserRegistrationDataBean getDatabean()
        Returns the UserRegistrationDataBean databean instance set
        Returns:
        The UserRegistrationDataBean databean instance set
      • 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
      • getDataAsJSON

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