com.ibm.commerce.marketing.runtime.util

Class EMarketingSpotDataBean

  • java.lang.Object
    • com.ibm.commerce.marketing.runtime.util.EMarketingSpotDataBean
  • All Implemented Interfaces:
    com.ibm.websphere.cache.Sizeable, java.io.Serializable


    public class EMarketingSpotDataBean
    extends java.lang.Object
    implements java.io.Serializable, com.ibm.websphere.cache.Sizeable
    This data bean encapsulates the information to display in an e-Marketing Spot. The Marketing campaign element actions will populate this bean when performing a recommendation action in an activity flow. The information in this data bean is used to populate the BaseMarketingSpotActivityDataType SDO. For the supported out of the box data types (CatalogEntry, CatalogGroup, MarketingContent), then the information is also used to populate the applicable SDO (MarketingSpotActivityCatalogEntryDataType, MarketingSpotActivityCatalogGroupDataType, MarketingSpotActivityMarketingContentDataType that extends from BaseMarketingSpotActivityDataType). If additional data needs to be returned to the e-Marketing Spot, then the method EMarketingSpotDataBean.setNVP can be used to set additional data into the data bean. This data will be available from the getProperties method of the SDO returned to the e-Marketing Spot JSP snippet. See the method MarketingCampaignElementTaskCmdImpl.addEMarketingSpotDataBean.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASSNAME
      The name of this class.
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      static java.lang.String DISPLAY_RETURN_CATALOG_ENTRY_ID
      A constant representing that only the IDs of the Catalog Entry objects to display should be returned to the e-Marketing Spot.
      static java.lang.String DISPLAY_RETURN_CATEGORY_ID
      A constant representing that only the IDs of the Category objects to display should be returned to the e-Marketing Spot.
      static java.lang.String DISPLAY_RETURN_MARKETING_CONTENT_ID
      A constant representing that only the IDs of the Marketing Content objects to display should be returned to the e-Marketing Spot.
      static java.lang.String DISPLAY_TYPE_CATALOG_ENTRY
      A constant representing a product to be displayed in an e-Marketing Spot.
      static java.lang.String DISPLAY_TYPE_CATALOG_ENTRY_ID
      A constant representing the ID of a product to be displayed in an e-Marketing Spot.
      static java.lang.String DISPLAY_TYPE_CATEGORY
      A constant representing a category to be displayed in an e-Marketing Spot.
      static java.lang.String DISPLAY_TYPE_CATEGORY_ID
      A constant representing the ID of a category to be displayed in an e-Marketing Spot.
      static java.lang.String DISPLAY_TYPE_MARKETING_CONTENT
      A constant representing Marketing Content to be displayed in an e-Marketing Spot.
      static java.lang.String DISPLAY_TYPE_MARKETING_CONTENT_ID
      A constant representing the ID of Marketing Content to be displayed in an e-Marketing Spot.
      static java.lang.String NVP_ACTION
      Constant representing the action name value pair for the EMarketingSpotDataBean.
      static java.lang.String NVP_PROMOTION_DISPLAY
      Constant representing the display action value for the EMarketingSpotDataBean.
      static java.lang.String NVP_PROMOTION_ID
      Constant representing the promotion name value pair for the EMarketingSpotDataBean.
      static java.lang.String TRUE
      A constant representing the value true.
    • Constructor Summary

      Constructors 
      Constructor and Description
      EMarketingSpotDataBean()
      This method is the default constructor.
      EMarketingSpotDataBean(java.lang.String newType, java.lang.String newData, Activity activity, java.lang.Integer newElementId)
      Deprecated. 
      Use the constructor EMarketingSpotDataBean(String, String, Activity, Integer, List)
      EMarketingSpotDataBean(java.lang.String newType, java.lang.String newData, Activity activity, java.lang.Integer newElementId, java.util.List newExperimentTestElements)
      This method initializes the bean with all the information about what to display in an e-Marketing Spot.
      EMarketingSpotDataBean(java.lang.String newType, java.lang.String newData, java.lang.Integer newActivityId, java.lang.Integer newElementId)
      This method initializes the bean with all the information about what to display in an e-Marketing Spot.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Integer getActivityId()
      This method gets the ID of the activity which made the recommendation.
      java.lang.String getData()
      This method gets the information (usually the unique identifier) of what to display.
      java.util.List getExperimentTestElements()
      This method gets the the set of experiments and test elements that have been passed along the activity flow.
      java.lang.String getNVP(java.lang.String name)
      This method gets a value from the name-value pair.
      java.util.Map getNVPs()
      This method gets the name-value pairs associated with the data to display in the e-Marketing Spot.
      long getObjectSize()
      Returns the estimated footprint size in bytes of this object and the objects it contains.
      java.math.BigInteger getPriority()
      This method gets the priority of the campaign element which made the recommendation.
      java.lang.String getType()
      This method gets the type of what is to be displayed in the e-Marketing Spot.
      void setActivityId(java.lang.Integer newActivityId)
      This method the ID of the activity which made the recommendation.
      void setData(java.lang.String newData)
      This method the information (usually the unique identifier) of what to display.
      void setExperimentTestElements(java.util.List newExperimentTestElements)
      This method sets the set of experiments and test elements that have been passed along the activity flow.
      void setNVP(java.lang.String name, java.lang.String value)
      This method sets a name-value pair.
      void setNVPs(java.util.Map newNVP)
      This method sets the name-value pairs associated with the data to display in the e-Marketing Spot.
      void setPriority(java.math.BigInteger newPriority)
      This method the priority of the campaign element which made the recommendation.
      void setType(java.lang.String newType)
      This method sets the type of what is to be displayed in the e-Marketing Spot.
      java.lang.String toString()
      This method returns a string with the content of the e-Marketing Spot data.
      • Methods inherited from class java.lang.Object

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

      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The name of this class.
        See Also:
        Constant Field Values
      • COPYRIGHT

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

        public static final java.lang.String DISPLAY_TYPE_MARKETING_CONTENT
        A constant representing Marketing Content to be displayed in an e-Marketing Spot.
        See Also:
        Constant Field Values
      • DISPLAY_TYPE_CATEGORY

        public static final java.lang.String DISPLAY_TYPE_CATEGORY
        A constant representing a category to be displayed in an e-Marketing Spot.
        See Also:
        Constant Field Values
      • DISPLAY_TYPE_CATALOG_ENTRY

        public static final java.lang.String DISPLAY_TYPE_CATALOG_ENTRY
        A constant representing a product to be displayed in an e-Marketing Spot.
        See Also:
        Constant Field Values
      • DISPLAY_TYPE_MARKETING_CONTENT_ID

        public static final java.lang.String DISPLAY_TYPE_MARKETING_CONTENT_ID
        A constant representing the ID of Marketing Content to be displayed in an e-Marketing Spot.
        See Also:
        Constant Field Values
      • DISPLAY_TYPE_CATEGORY_ID

        public static final java.lang.String DISPLAY_TYPE_CATEGORY_ID
        A constant representing the ID of a category to be displayed in an e-Marketing Spot.
        See Also:
        Constant Field Values
      • DISPLAY_TYPE_CATALOG_ENTRY_ID

        public static final java.lang.String DISPLAY_TYPE_CATALOG_ENTRY_ID
        A constant representing the ID of a product to be displayed in an e-Marketing Spot.
        See Also:
        Constant Field Values
      • DISPLAY_RETURN_MARKETING_CONTENT_ID

        public static final java.lang.String DISPLAY_RETURN_MARKETING_CONTENT_ID
        A constant representing that only the IDs of the Marketing Content objects to display should be returned to the e-Marketing Spot.
        See Also:
        Constant Field Values
      • DISPLAY_RETURN_CATEGORY_ID

        public static final java.lang.String DISPLAY_RETURN_CATEGORY_ID
        A constant representing that only the IDs of the Category objects to display should be returned to the e-Marketing Spot.
        See Also:
        Constant Field Values
      • DISPLAY_RETURN_CATALOG_ENTRY_ID

        public static final java.lang.String DISPLAY_RETURN_CATALOG_ENTRY_ID
        A constant representing that only the IDs of the Catalog Entry objects to display should be returned to the e-Marketing Spot.
        See Also:
        Constant Field Values
      • TRUE

        public static final java.lang.String TRUE
        A constant representing the value true.
        See Also:
        Constant Field Values
      • NVP_PROMOTION_ID

        public static final java.lang.String NVP_PROMOTION_ID
        Constant representing the promotion name value pair for the EMarketingSpotDataBean.
        See Also:
        Constant Field Values
      • NVP_ACTION

        public static final java.lang.String NVP_ACTION
        Constant representing the action name value pair for the EMarketingSpotDataBean.
        See Also:
        Constant Field Values
      • NVP_PROMOTION_DISPLAY

        public static final java.lang.String NVP_PROMOTION_DISPLAY
        Constant representing the display action value for the EMarketingSpotDataBean.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EMarketingSpotDataBean

        public EMarketingSpotDataBean()
        This method is the default constructor. It currently performs no actions.
      • EMarketingSpotDataBean

        public EMarketingSpotDataBean(java.lang.String newType,
                                      java.lang.String newData,
                                      Activity activity,
                                      java.lang.Integer newElementId,
                                      java.util.List newExperimentTestElements)
        This method initializes the bean with all the information about what to display in an e-Marketing Spot.
        Parameters:
        newType - The type of what is to be displayed.
        newData - The information (usually the unique identifier) of what to display.
        activity - The business object for the activity which made the recommendation.
        newElementId - The ID of the campaign element which made the recommendation.
        newExperimentTestElements - The set of experiments and test elements that have been passed along the activity flow.
      • EMarketingSpotDataBean

        public EMarketingSpotDataBean(java.lang.String newType,
                                      java.lang.String newData,
                                      Activity activity,
                                      java.lang.Integer newElementId)
        Deprecated. Use the constructor EMarketingSpotDataBean(String, String, Activity, Integer, List)
        This method initializes the bean with all the information about what to display in an e-Marketing Spot.
        Parameters:
        newType - The type of what is to be displayed.
        newData - The information (usually the unique identifier) of what to display.
        activity - The business object for the activity which made the recommendation.
        newElementId - The ID of the campaign element which made the recommendation.
      • EMarketingSpotDataBean

        public EMarketingSpotDataBean(java.lang.String newType,
                                      java.lang.String newData,
                                      java.lang.Integer newActivityId,
                                      java.lang.Integer newElementId)
        This method initializes the bean with all the information about what to display in an e-Marketing Spot. This is used for the default content to display in an e-Marketing Spot. Most clients should be calling the EMarketingSpotDataBean(String, String, Activity, Integer, List) constructor.
        Parameters:
        newType - The type of what is to be displayed.
        newData - The information (usually the unique identifier) of what to display.
        newActivityId - The ID of the activity which made the recommendation.
        newElementId - The ID of the campaign element which made the recommendation.
    • Method Detail

      • getObjectSize

        public long getObjectSize()
        Returns the estimated footprint size in bytes of this object and the objects it contains.
        Specified by:
        getObjectSize in interface com.ibm.websphere.cache.Sizeable
        Returns:
        the estimated footprint size in bytes or -1 if a size cannot be determined.
      • getType

        public java.lang.String getType()
        This method gets the type of what is to be displayed in the e-Marketing Spot. Valid values include: Content, Category, CatalogEntry. A customization may return custom types.
        Returns:
        This method returns the type of what is to be displayed in the e-Marketing Spot.
      • getData

        public java.lang.String getData()
        This method gets the information (usually the unique identifier) of what to display.
        Returns:
        This method returns the information (usually the unique identifier) of what to display.
      • getActivityId

        public java.lang.Integer getActivityId()
        This method gets the ID of the activity which made the recommendation.
        Returns:
        This method returns the ID of the activity which made the recommendation.
      • getPriority

        public java.math.BigInteger getPriority()
        This method gets the priority of the campaign element which made the recommendation.
        Returns:
        This method returns the priority of the campaign element which made the recommendation.
      • getExperimentTestElements

        public java.util.List getExperimentTestElements()
        This method gets the the set of experiments and test elements that have been passed along the activity flow.
        Returns:
        The the set of experiments and test elements that have been passed along the activity flow.
      • setExperimentTestElements

        public void setExperimentTestElements(java.util.List newExperimentTestElements)
        This method sets the set of experiments and test elements that have been passed along the activity flow.
        Parameters:
        newExperimentTestElements - The set of experiments and test elements that have been passed along the activity flow.
      • setType

        public void setType(java.lang.String newType)
        This method sets the type of what is to be displayed in the e-Marketing Spot. Valid values include: Content, Category, CatalogEntry. A customization may set custom types.
        Parameters:
        newType - The type of what is to be displayed in the e-Marketing Spot.
      • setData

        public void setData(java.lang.String newData)
        This method the information (usually the unique identifier) of what to display.
        Parameters:
        newData - The information (usually the unique identifier) of what to display.
      • setActivityId

        public void setActivityId(java.lang.Integer newActivityId)
        This method the ID of the activity which made the recommendation.
        Parameters:
        newActivityId - The ID of the activity which made the recommendation.
      • setPriority

        public void setPriority(java.math.BigInteger newPriority)
        This method the priority of the campaign element which made the recommendation.
        Parameters:
        newPriority - The priority of the campaign element which made the recommendation.
      • setNVP

        public void setNVP(java.lang.String name,
                           java.lang.String value)
        This method sets a name-value pair. It is expected a customization would use this method to return additional data to the e-Marketing Spot.
        Parameters:
        name - The name of the name-value pair.
        value - The value that is to be associated with the name.
      • getNVP

        public java.lang.String getNVP(java.lang.String name)
        This method gets a value from the name-value pair.
        Parameters:
        name - The name from which the value wants to be retrieved.
        Returns:
        This method returns the value, if any, associated with the name passed as a parameter.
      • getNVPs

        public java.util.Map getNVPs()
        This method gets the name-value pairs associated with the data to display in the e-Marketing Spot.
        Returns:
        This method returns the name-value pairs map of name-value pair strings.
      • setNVPs

        public void setNVPs(java.util.Map newNVP)
        This method sets the name-value pairs associated with the data to display in the e-Marketing Spot.
        Parameters:
        newNVP - A map containing the name-value pairs.
      • toString

        public java.lang.String toString()
        This method returns a string with the content of the e-Marketing Spot data.
        Overrides:
        toString in class java.lang.Object
        Returns:
        This method returns a string with the content of the e-Marketing Spot data.