com.ibm.commerce.marketing.beans

Class EMarketingSpot

  • All Implemented Interfaces:
    com.ibm.commerce.beans.DataBean, com.ibm.commerce.beans.InputDataBean, com.ibm.commerce.beans.SmartDataBean, java.io.Serializable


    public class EMarketingSpot
    extends EMarketingSpotBase
    The e-Marketing Spot bean. This bean returns the results of campaign initiatives that are currently scheduled onto it if the Commerce server is configured to use WebSphere Commerce initiatives. This bean returns the results of activities if the Commerce server is configured to use the Marketing Component.
    See Also:
    Serialized Form
    • Field Detail

      • ALL_FILTERS

        public static final int ALL_FILTERS
        Constant for result filter type: All filters.
        See Also:
        Constant Field Values
      • ASSOCIATE_CATENTRY_ALLOW_TO_DISPLAY

        public static final int ASSOCIATE_CATENTRY_ALLOW_TO_DISPLAY
        Constant for result filter type: Associated catalog entry is allowed to display.
        See Also:
        Constant Field Values
      • ASSOCIATE_CATENTRY_ENTITLED_IN_CONTRACT

        public static final int ASSOCIATE_CATENTRY_ENTITLED_IN_CONTRACT
        Constant for result filter type: Associated catalog entry included in contract entitlement.
        See Also:
        Constant Field Values
      • ASSOCIATE_CATENTRY_EXIST_IN_SHOPCART

        public static final int ASSOCIATE_CATENTRY_EXIST_IN_SHOPCART
        Constant for result filter type: Associated catalog entry already exists in the current shopping cart.
        See Also:
        Constant Field Values
      • ASSOCIATE_CATENTRY_IN_CURRENT_CATALOG

        public static final int ASSOCIATE_CATENTRY_IN_CURRENT_CATALOG
        Constant for result filter type: Associated catalog entry within the current catalog.
        See Also:
        Constant Field Values
      • ASSOCIATE_CATENTRY_NOT_EXPIRED

        public static final int ASSOCIATE_CATENTRY_NOT_EXPIRED
        Constant for result filter type: Associated catalog entry has not expired.
        See Also:
        Constant Field Values
      • ASSOCIATE_CATENTRY_NOT_MARK_FOR_DELETE

        public static final int ASSOCIATE_CATENTRY_NOT_MARK_FOR_DELETE
        Constant for result filter type: Associated catalog entry is not marked for delete.
        See Also:
        Constant Field Values
      • ASSOCIATE_CATENTRY_WITH_INVENTORY

        public static final int ASSOCIATE_CATENTRY_WITH_INVENTORY
        Constant for result filter type: Associated catalog entry satisfies the inventory level requirement.
        See Also:
        Constant Field Values
      • CATEGORY_ALLOW_TO_DISPLAY

        public static final int CATEGORY_ALLOW_TO_DISPLAY
        Constant for result filter type: Category is allowed to display.
        See Also:
        Constant Field Values
      • CATEGORY_ENTITLED_IN_CONTRACT

        public static final int CATEGORY_ENTITLED_IN_CONTRACT
        Constant for result filter type: Category is included in contract entitlement.
        See Also:
        Constant Field Values
      • CATEGORY_IN_CURRENT_CATALOG

        public static final int CATEGORY_IN_CURRENT_CATALOG
        Constant for result filter type: Category within the current catalog.
        See Also:
        Constant Field Values
      • CATEGORY_NOT_MARK_FOR_DELETE

        public static final int CATEGORY_NOT_MARK_FOR_DELETE
        Constant for result filter type: Category is not marked for delete.
        See Also:
        Constant Field Values
      • CATENTRY_ALLOW_TO_DISPLAY

        public static final int CATENTRY_ALLOW_TO_DISPLAY
        Constant for result filter type: Catalog entry is allowed to display.
        See Also:
        Constant Field Values
      • CATENTRY_ENTITLED_IN_CONTRACT

        public static final int CATENTRY_ENTITLED_IN_CONTRACT
        Constant for result filter type: Catalog entry included in contract entitlement.
        See Also:
        Constant Field Values
      • CATENTRY_EXIST_IN_SHOPCART

        public static final int CATENTRY_EXIST_IN_SHOPCART
        Constant for result filter type: Catalog entry already exists in the current shopping cart.
        See Also:
        Constant Field Values
      • CATENTRY_IN_CURRENT_CATALOG

        public static final int CATENTRY_IN_CURRENT_CATALOG
        Constant for result filter type: Catalog entry within the current catalog.
        See Also:
        Constant Field Values
      • CATENTRY_NO_DUPLICATE

        public static final int CATENTRY_NO_DUPLICATE
        Constant for result filter type: No multiple catalog items for the same product.
        See Also:
        Constant Field Values
      • CATENTRY_NOT_EXPIRED

        public static final int CATENTRY_NOT_EXPIRED
        Constant for result filter type: Catalog entry has not expired.
        See Also:
        Constant Field Values
      • CATENTRY_NOT_MARK_FOR_DELETE

        public static final int CATENTRY_NOT_MARK_FOR_DELETE
        Constant for result filter type: Catalog entry is not marked for delete.
        See Also:
        Constant Field Values
      • CATENTRY_WITH_INVENTORY

        public static final int CATENTRY_WITH_INVENTORY
        Constant for result filter type: Catalog entry satisfies the inventory level requirement.
        See Also:
        Constant Field Values
      • COPYRIGHT

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

        public static final java.lang.String EMS_REQUEST_ATTRIBUTE_CONTAINER_NAME
        The name of the request attribute hashtable object set in the request that contains the pre-populated EMarketingSpot beans.
        See Also:
        Constant Field Values
      • ESPOT_RESULT_ORDER_ORIGINAL

        public static final int ESPOT_RESULT_ORDER_ORIGINAL
        Constant for result order type: Order of result is the same as the order of selecting the content when the Web activity was created.
        See Also:
        Constant Field Values
      • ESPOT_RESULT_ORDER_RANDOM

        public static final int ESPOT_RESULT_ORDER_RANDOM
        Constant for result order type: Order of result is randomized.
        See Also:
        Constant Field Values
      • PROMOTION_CONTENT_ENTITLED_IN_CONTRACT

        public static final int PROMOTION_CONTENT_ENTITLED_IN_CONTRACT
        Constant for result filter type: Promotion content included in contract entitlement.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EMarketingSpot

        public EMarketingSpot()
        Constructor for EMarketingSpot.
    • Method Detail

      • callProcessMarketingTriggerWebServiceClearEntireCacheAction

        public static void callProcessMarketingTriggerWebServiceClearEntireCacheAction()
        This method calls the marketing web service to clear the marketing cache.
      • callProcessMarketingTriggerWebServiceClickAction

        public static void callProcessMarketingTriggerWebServiceClickAction(java.util.Hashtable nameValuePairs)
        This method calls the marketing web service to register a click on an eMarketing Spot.
        Parameters:
        nameValuePairs - The name value pairs containing the ID of the activity and the ID of the eMarketing Spot.
      • callProcessMarketingTriggerWebServiceEvaluateOrderAction

        public static void callProcessMarketingTriggerWebServiceEvaluateOrderAction(java.util.Hashtable nameValuePairs)
        This method calls the marketing web service to evaluate an order and determine if it was influenced by the data displayed to the customer in an eMarketing Spot.
        Parameters:
        nameValuePairs - The name value pairs containing the ID of the order.
      • generateEMSCacheValue

        public java.lang.String generateEMSCacheValue()
        This method creates a cache key for this e-Marketing Spot.
        Returns:
        This method returns a cache key for this e-Marketing Spot.
      • getAssociateCatalogEntries

        public EMarketingSpot.AssociateCatalogEntry[] getAssociateCatalogEntries()
        Gets the associated catalog entries that were recommended by the initiatives scheduled on this e-Marketing Spot.
        Returns:
        An array of AssociateCatalogEntry objects.
      • getCatalogEntries

        public EMarketingSpot.CatalogEntry[] getCatalogEntries()
        Gets the catalog entries that were recommended by the initiatives scheduled on this e-Marketing Spot.
        Returns:
        An array of CatalogEntry objects.
      • getCategories

        public EMarketingSpot.Category[] getCategories()
        Gets the categories that were recommended by the initiatives scheduled on this e-Marketing Spot.
        Returns:
        An array of Category objects.
      • getCollateral

        public EMarketingSpot.Collateral[] getCollateral()
        Gets the collateral items that were recommended by the initiatives scheduled on this e-Marketing Spot.
        Returns:
        An array of Collateral objects.
      • getUseDialogMarketing

        public static boolean getUseDialogMarketing()
        This method gets if the store has enabled the dialog marketing functionality.
        Returns:
        This method returns true if the store has enabled the dialog marketing functionality, otherwise it returns false.
      • isContainAnyResults

        public boolean isContainAnyResults()
        Determines whether this e-Marketing Spot has objects of any types.
        Returns:
        True if this e-Marketing Spot has an object of any types; false otherwise.
      • isContainAssociateCatalogEntries

        public boolean isContainAssociateCatalogEntries()
        Determines whether this e-Marketing Spot has any associated catalog entry objects.
        Returns:
        True if this e-Marketing Spot has an associated catalog entry object; false otherwise.
      • isContainCatalogEntries

        public boolean isContainCatalogEntries()
        Determines whether this e-Marketing Spot has any catalog entry objects.
        Returns:
        True if this e-Marketing Spot has a catalog entry object; false otherwise.
      • isContainCategories

        public boolean isContainCategories()
        Determines whether this e-Marketing Spot has any category objects.
        Returns:
        True if this e-Marketing Spot has a category object; false otherwise.
      • isContainCollateral

        public boolean isContainCollateral()
        Determines whether this e-Marketing Spot has any collateral objects.
        Returns:
        True if this e-Marketing Spot has a collateral object; false otherwise.
      • populate

        public void populate()
                      throws java.lang.Exception
        Populates this data bean representing the e-Marketing Spot on a store page.
        Specified by:
        populate in interface com.ibm.commerce.beans.SmartDataBean
        Overrides:
        populate in class EMarketingSpotBase
        Throws:
        java.lang.Exception - Thrown when an error occurs during the population of this data bean.
      • setCategoryId

        public void setCategoryId(java.lang.String sourceCategoryId)
        Sets the ID of the category that the shopper is currently viewing.
        Parameters:
        sourceCategoryId - The ID of the category that the shopper is currently viewing.
      • setCurrentCatalogId

        public void setCurrentCatalogId(java.lang.Long currentCatalogId)
        Sets the ID of the catalog that the shopper is currently viewing. If this is not set, then the system assumes that the master catalog of the current store is in use.
        Parameters:
        currentCatalogId - ID of the catalog that the shopper is currently viewing.
      • setDefaultResultFilter

        public void setDefaultResultFilter()
        Sets the result filters to values different than their default values. By default, all result filters are turned on. This method is called when this object is constructed.
      • setMaximumNumberOfAssociateCatalogEntries

        public void setMaximumNumberOfAssociateCatalogEntries(int maximumNumberOfAssociateCatalogEntries)
        Sets the maximum number of associate catalog entries that are to be returned by this e-Marketing Spot.
        Parameters:
        maximumNumberOfAssociateCatalogEntries - Maximum number of associate catalog entries.
      • setMaximumNumberOfCatalogEntries

        public void setMaximumNumberOfCatalogEntries(int maximumNumberOfCatalogEntries)
        Sets the maximum number of catalog entries that are to be returned by this e-Marketing Spot.
        Parameters:
        maximumNumberOfCatalogEntries - Maximum number of catalog entries.
      • setMaximumNumberOfCategories

        public void setMaximumNumberOfCategories(int maximumNumberOfCategories)
        Sets the maximum number of categories that are to be returned by this e-Marketing Spot.
        Parameters:
        maximumNumberOfCategories - Maximum number of categories.
      • setMaximumNumberOfCollateral

        public void setMaximumNumberOfCollateral(int maximumNumberOfCollateral)
        Sets the maximum number of collateral items that are to be returned by this e-Marketing Spot.
        Parameters:
        maximumNumberOfCollateral - Maximum number of collateral items.
      • setMultipleSourceCatalogEntryId

        public void setMultipleSourceCatalogEntryId(java.lang.String sourceCatalogEntryId)
        Adds a source catalog entry ID to the list in a vector object.
        Parameters:
        sourceCatalogEntryId - The source catalog entry ID to be added to the list in a vector object.
      • setMultipleSourceCatalogGroupId

        public void setMultipleSourceCatalogGroupId(java.lang.String sourceCatalogGroupId)
        Adds a source catalog group ID to the list in a vector object.
        Parameters:
        sourceCatalogGroupId - The source catalog group ID to be added to the list in a vector object.
      • setNVP

        public void setNVP(java.lang.String name,
                           java.lang.String value)
        Sets name/value pairs that will be used as part of the request parameters.
        Parameters:
        name - The name in the name/value pair.
        value - The value in the name/value pair
      • setResultFilterOff

        public void setResultFilterOff(int attribute)
        Sets the flag that indicates which result filter needs to be turned off. By default, all result filters are turned on, except those were set in method setDefaultResultFilter(). Here are the available filters:
        ALL_FILTERS - All result filters.
        CATENTRY_NO_DUPLICATE - Catalog entry duplication is not allowed.
        ASSOCIATE_CATENTRY_NOT_MARK_FOR_DELETE - Associated catalog entries are not marked for delete.
        ASSOCIATE_CATENTRY_NOT_EXPIRED - Associated catalog entries are not expired. That is, the end date timestamp has not passed.
        ASSOCIATE_CATENTRY_ALLOW_TO_DISPLAY - Associated catalog entries are allowed to be displayed.
        ASSOCIATE_CATENTRY_WITH_INVENTORY - Associated catalog entry inventory level is above 0.
        ASSOCIATE_CATENTRY_ENTITLED_IN_CONTRACT - Associated catalog entries are entitled to the customer with respect to the contract.
        ASSOCIATE_CATENTRY_IN_CURRENT_CATALOG - Associated catalog entries are within the catalog that the customer is currently viewing.
        ASSOCIATE_CATENTRY_EXIST_IN_SHOPCART - Associated catalog entry already exists in the current shopping cart.
        CATENTRY_NOT_MARK_FOR_DELETE - Catalog entries are not marked for delete.
        CATENTRY_NOT_EXPIRED - Catalog entries are not expired. That is, the end date timestamp has not passed.
        CATENTRY_ALLOW_TO_DISPLAY - Catalog entries are allowed to be displayed.
        CATENTRY_WITH_INVENTORY - Catalog entry inventory level is above 0.
        CATENTRY_ENTITLED_IN_CONTRACT - Catalog entries are entitled to the customer with respect to the contract.
        CATENTRY_IN_CURRENT_CATALOG - Catalog entries are within the catalog that the customer is currently viewing
        CATENTRY_EXIST_IN_SHOPCART - Catalog entry already exists in the current shopping cart.
        CATEGORY_NOT_MARK_FOR_DELETE - Categories are not marked for delete.
        CATEGORY_ALLOW_TO_DISPLAY - Categories are allowed to be displayed.
        CATEGORY_ENTITLED_IN_CONTRACT - Categories are entitled to the customer with respect to the contract.
        CATEGORY_IN_CURRENT_CATALOG - Categories are within the catalog that the customer is currently viewing.
        PROMOTION_CONTENT_ENTITLED_IN_CONTRACT - Promotion content is entitled to the customer with respect to the contract.
        Note: ASSOCIATE_CATENTRY_IN_CURRENT_CATALOG, CATENTRY_IN_CURRENT_CATALOG and CATEGORY_IN_CURRENT_CATALOG also check whether the catalog entry or category is marked for delete, even if the mark for delete flag has been turned off explicitly.
        Parameters:
        attribute - The result filtering flag.
      • setResultFilterOn

        public void setResultFilterOn(int attribute)
        Sets the flag that indicates which result filter needs to be turned on. By default, all result filters are turned on, except those were set in method setDefaultResultFilter(). Here are the available filters:
        ALL_FILTERS - All result filters.
        CATENTRY_NO_DUPLICATE - Catalog entry duplication is not allowed.
        ASSOCIATE_CATENTRY_NOT_MARK_FOR_DELETE - Associated catalog entries are not marked for delete.
        ASSOCIATE_CATENTRY_NOT_EXPIRED - Associated catalog entries are not expired. That is, the end date timestamp has not passed.
        ASSOCIATE_CATENTRY_ALLOW_TO_DISPLAY - Associated catalog entries are allowed to be displayed.
        ASSOCIATE_CATENTRY_WITH_INVENTORY - Associated catalog entry inventory level is above 0.
        ASSOCIATE_CATENTRY_ENTITLED_IN_CONTRACT - Associated catalog entries are entitled to the customer with respect to the contract.
        ASSOCIATE_CATENTRY_IN_CURRENT_CATALOG - Associated catalog entries are within the catalog that the customer is currently viewing.
        ASSOCIATE_CATENTRY_EXIST_IN_SHOPCART - Associated catalog entry already exists in the current shopping cart.
        CATENTRY_NOT_MARK_FOR_DELETE - Catalog entries are not marked for delete.
        CATENTRY_NOT_EXPIRED - Catalog entries are not expired. That is, the end date timestamp has not passed.
        CATENTRY_ALLOW_TO_DISPLAY - Catalog entries are allowed to be displayed.
        CATENTRY_WITH_INVENTORY - Catalog entry inventory level is above 0.
        CATENTRY_ENTITLED_IN_CONTRACT - Catalog entries are entitled to the customer with respect to the contract.
        CATENTRY_IN_CURRENT_CATALOG - Catalog entries are within the catalog that the customer is currently viewing
        CATENTRY_EXIST_IN_SHOPCART - Catalog entry already exists in the current shopping cart.
        CATEGORY_NOT_MARK_FOR_DELETE - Categories are not marked for delete.
        CATEGORY_ALLOW_TO_DISPLAY - Categories are allowed to be displayed.
        CATEGORY_ENTITLED_IN_CONTRACT - Categories are entitled to the customer with respect to the contract.
        CATEGORY_IN_CURRENT_CATALOG - Categories are within the catalog that the customer is currently viewing.
        PROMOTION_CONTENT_ENTITLED_IN_CONTRACT - Promotion content is entitled to the customer with respect to the contract.
        Note: ASSOCIATE_CATENTRY_IN_CURRENT_CATALOG, CATENTRY_IN_CURRENT_CATALOG and CATEGORY_IN_CURRENT_CATALOG also check whether the catalog entry or category is marked for delete, even if the mark for delete flag has been turned off explicitly.
        Parameters:
        attribute - The result filtering flag.
      • setResultOrder

        public void setResultOrder(int attribute)
        Sets the flag that indicates the result ordering logic to be executed in the evaluate command. By default, the resulting order is randomized. Here are the available options:
        ESPOT_RESULT_ORDER_RANDOM - The order of the results are randomized.
        ESPOT_RESULT_ORDER_ORIGINAL - The order of result is the same as the order in which the content was selected when the campaign Web activity was created.
        Parameters:
        attribute - The result ordering flag.
      • setSourceCatalogEntryId

        public void setSourceCatalogEntryId(java.lang.String sourceCatalogEntryId)
        Sets the source catalog entry ID.
        Parameters:
        sourceCatalogEntryId - The source catalog entry ID.
      • setSourceCatalogGroupId

        public void setSourceCatalogGroupId(java.lang.String sourceCatalogGroupId)
        Sets the source catalog group ID.
        Parameters:
        sourceCatalogGroupId - The source catalog group ID.
      • setStoreId

        public void setStoreId(java.lang.Integer storeId)
        Sets the ID of the store to which this e-Marketing Spot has access.
        Parameters:
        storeId - The ID of the store to which this e-Marketing Spot has access.
      • setUserId

        public void setUserId(java.lang.Long userId)
        Sets the ID of the user accessing this e-Marketing Spot.
        Parameters:
        userId - The ID of the user accessing this e-Marketing Spot.