com.ibm.commerce.marketing.commands.elements

Class DisplayProductRankingActionTaskCmdImpl

    • Field Detail

      • COPYRIGHT

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

        public static final java.lang.String CLASSNAME
        The name of this class.
      • PARAM_OBJECT_GROUP

        public static final java.lang.String PARAM_OBJECT_GROUP
        Constant for the ranking parameter objectGroupId. For display best sellers and display top browsed, this is the category ID.
        See Also:
        Constant Field Values
      • PARAM_INCLUDE_SUB_CATEGORIES

        public static final java.lang.String PARAM_INCLUDE_SUB_CATEGORIES
        Constant for the ranking parameter includeSubCategories. This is to specify if the ranking list should be generated for every subcategory of the ranking category.
        See Also:
        Constant Field Values
      • PARAM_INTERVAL_UNIT

        public static final java.lang.String PARAM_INTERVAL_UNIT
        Constant for the ranking parameter interval unit.
        See Also:
        Constant Field Values
      • PARAM_INTERVAL_NUMBER

        public static final java.lang.String PARAM_INTERVAL_NUMBER
        Constant for the ranking parameter interval value.
        See Also:
        Constant Field Values
      • PARAM_POLICY

        public static final java.lang.String PARAM_POLICY
        Constant for the ranking parameter business policy id.
        See Also:
        Constant Field Values
      • PARAM_SIZE

        public static final java.lang.String PARAM_SIZE
        Constant for the ranking parameter size. This is the number of items to display in the ranking list.
        See Also:
        Constant Field Values
      • PARAM_LOCATION

        public static final java.lang.String PARAM_LOCATION
        Constant for the location parameter. It can have a value of "currentCategory" or "oneItemInList"
        See Also:
        Constant Field Values
      • PARAM_SPECIFIC_CATEGORY

        public static final java.lang.String PARAM_SPECIFIC_CATEGORY
        Constant for the specificCategory parameter.
        See Also:
        Constant Field Values
      • PARAM_CURRENT_CATEGORY

        public static final java.lang.String PARAM_CURRENT_CATEGORY
        Constant for the currentCategory parameter.
        See Also:
        Constant Field Values
      • PARAM_CURRENT_OR_SUB_CATEGORY

        public static final java.lang.String PARAM_CURRENT_OR_SUB_CATEGORY
        Constant for the currentOrSubCategory parameter.
        See Also:
        Constant Field Values
      • AMOUNT

        public static final java.lang.String AMOUNT
        Constant for the amount parameter that is returned to the storefront. On the e-Marketing Spot JSP snippet, this data can be retrieved: ${marketingSpotData.properties['amount']}.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DisplayProductRankingActionTaskCmdImpl

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

      • performExecute

        public void performExecute()
        This method gets the products to display in an e-Marketing Spot. The most browsed or purchased products will have been stored in the DMRANKINGITEM database table.
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class MarketingCampaignElementTaskCmdImpl
      • populateRankingList

        public void populateRankingList(java.lang.Integer elementId,
                                        java.lang.String groupId)
        This method populates the ranking list associated with this campaign element. The data is retrieved from the DMRANKINGITEM database table.
        Parameters:
        elementId - The ranking campaign element ID.
        groupId - The ranking group ID.
      • forwardTriggersForProcessing

        public void forwardTriggersForProcessing()
        This method is called once a day by the Process MarketingTrigger SendTriggers scheduled job. This method creates a Ranking object with the parameters of the ranking list defined by this campaign element. It then calls the following commands:
        • CleanupRankingPolicyCmd - to remove any obsolete data
        • GenerateRankingPolicyCmd - to create the new ranking list
        • InvalidateRankingServletCmd - to inform any cached pages that the ranking list has been updated
        Specified by:
        forwardTriggersForProcessing in interface MarketingCampaignElementTaskCmd
        Overrides:
        forwardTriggersForProcessing in class MarketingCampaignElementTaskCmdImpl
      • validateParameters

        public java.util.List validateParameters(java.util.Map elementParameters)
        This method validates that all the required name value pairs have been set for the campaign element. It checks for numberOfDays and repeatSchedule. If the repeatSchedule is runOnce, then the parameter maximumNumberOfDaysCartHasBeenAbandoned is required and this element must be the first element in the activity flow. As well, there can only be one element in the activity that has the runOnce repeat schedule defined.
        Specified by:
        validateParameters in interface MarketingCampaignElementTaskCmd
        Overrides:
        validateParameters in class MarketingCampaignElementTaskCmdImpl
        Parameters:
        elementParameters - The name value pairs for this element.
        Returns:
        This method returns a list of ApplicationError exceptions that contains any validation errors. The list may be empty or be null.