com.ibm.commerce.marketing.dialog.util

Class URLCommandTaskCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, URLCommandTaskCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class URLCommandTaskCmdImpl
    extends TaskCommandImpl
    implements URLCommandTaskCmd
    This class handles the parsing of the click URL link from marketing content. Customizations may want to extend the implementation class if different commands are used for content click url links than are provided in Management Center.
    See Also:
    Serialized Form
    • 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.
        See Also:
        Constant Field Values
    • Constructor Detail

      • URLCommandTaskCmdImpl

        public URLCommandTaskCmdImpl()
    • Method Detail

      • getUrlCommandType

        public java.lang.String getUrlCommandType(java.lang.String commandUrl)
        This method gets the command name from the full command url associated with a marketing content. It will return one of the known commands: ProductDisplay, CategoryDisplay, OrderItemAdd, InterestItemAdd, DiscountDetailsDisplayView, CouponsIssue, AddOrderItemWithPromotionCodeOrCoupon, AcceptCouponFromBA.
        Specified by:
        getUrlCommandType in interface URLCommandTaskCmd
        Parameters:
        commandUrl - The full command url from a marketing content.
        Returns:
        This method returns the command name from the full command url if it is one of the known commands.
      • isMarketingContentURLPromotionRelated

        public boolean isMarketingContentURLPromotionRelated(MarketingContentType marketingContent)
        This method evaluates if the marketing content click action URL is promotion-related.
        Specified by:
        isMarketingContentURLPromotionRelated in interface URLCommandTaskCmd
        Parameters:
        marketingContent - The marketing content to evaluate.
        Returns:
        This methods returns true if the the marketing content click action URL is promotion related, and false otherwise.
      • isMarketingCommandPromotionRelated

        public boolean isMarketingCommandPromotionRelated(java.lang.String marketingCommand)
        This method evaluates if the marketing content click action command is promotion related.
        Specified by:
        isMarketingCommandPromotionRelated in interface URLCommandTaskCmd
        Parameters:
        marketingCommand - The marketing content command to evaluate.
        Returns:
        This methods returns true if the the marketing content click action command is promotion related, and false otherwise.
      • isMarketingContentCommandEqual

        public boolean isMarketingContentCommandEqual(MarketingContentType marketingContent,
                                                      java.lang.String command)
        This method compares the marketing content click action command with a specified command.
        Specified by:
        isMarketingContentCommandEqual in interface URLCommandTaskCmd
        Parameters:
        marketingContent - The marketing content to evaluate.
        command - The command to evaluate against.
        Returns:
        This method returns true if the marketing content click action command matches the specified command.
      • isMarketingCommandProductRelated

        public boolean isMarketingCommandProductRelated(java.lang.String commandType)
        This method gets if the marketing content url is associated with a product. It currently checks if the command name is one of ProductDisplay, OrderItemAdd, InterestItemAdd, or AddOrderItemWithPromotionCodeOrCoupon.
        Specified by:
        isMarketingCommandProductRelated in interface URLCommandTaskCmd
        Parameters:
        commandType - The command name from the command url.
        Returns:
        This method returns true if the command name is associated with a product.
      • isMarketingCommandCategoryRelated

        public boolean isMarketingCommandCategoryRelated(java.lang.String commandType)
        This method gets if the marketing content url is associated with a category. It currently checks if the command name is CategoryDisplay.
        Specified by:
        isMarketingCommandCategoryRelated in interface URLCommandTaskCmd
        Parameters:
        commandType - The command name from the command url.
        Returns:
        This method returns true if the command name is associated with a category.
      • isMarketingCommandCategoryDisplayRelated

        public boolean isMarketingCommandCategoryDisplayRelated(java.lang.String commandType)
        This method gets if the marketing content url is associated with a category display. It currently checks if the command name is CategoryDisplay.
        Specified by:
        isMarketingCommandCategoryDisplayRelated in interface URLCommandTaskCmd
        Parameters:
        commandType - The command name from the command url.
        Returns:
        This method returns true if the command name is associated with a category display.
      • isMarketingCommandProductDisplayRelated

        public boolean isMarketingCommandProductDisplayRelated(java.lang.String commandType)
        This method gets if the marketing content url is associated with a product display. It currently checks if the command name is ProductDisplay.
        Specified by:
        isMarketingCommandProductDisplayRelated in interface URLCommandTaskCmd
        Parameters:
        commandType - The command name from the command url.
        Returns:
        This method returns true if the command name is associated with a product display.
      • isMarketingCommandContentPageRelated

        public boolean isMarketingCommandContentPageRelated(java.lang.String commandType)
        This method gets if the marketing content url is associated with a content page. It currently checks if the command name is GenericStaticContentPageLayoutView.
        Specified by:
        isMarketingCommandContentPageRelated in interface URLCommandTaskCmd
        Parameters:
        commandType - The command name from the command url.
        Returns:
        This method returns true if the command name is associated with a content page.
      • getUrlCommandParameter

        public java.lang.String getUrlCommandParameter(java.lang.String commandUrl,
                                                       java.lang.String commandUrlCommandType,
                                                       java.lang.Long[] memberIds,
                                                       java.lang.Integer storeId)
        This method gets the product ID if the command url is associated with a product, or it gets the category ID if the command url is associated with a category. The command url is the url associated with a marketing content.
        Specified by:
        getUrlCommandParameter in interface URLCommandTaskCmd
        Parameters:
        commandUrl - The full command url with the command name and parameters.
        commandUrlCommandType - The command name from the command url.
        memberIds - The list of member IDs that own the catalogs in the store. If this parameter is null, then the information needs to be retrieved. If this parameter is not null, then the current information is used.
        storeId - The ID of the store.
        Returns:
        This method returns either a product ID or a category ID if one can be found that is associated with the marketing content url. If nothing can be found, then null is returned.
      • getUrlCommandParameter

        public java.lang.String getUrlCommandParameter(java.lang.String url,
                                                       java.lang.String commandType)
        This method gets the product ID if the command url is associated with a product, or it gets the category ID if the command url is associated with a category. The command url is the url associated with a marketing content.
        Specified by:
        getUrlCommandParameter in interface URLCommandTaskCmd
        Parameters:
        url - The full command url with the command name and parameters.
        commandType - The command name from the command url.
        Returns:
        This method returns either a product ID or a category ID if one can be found that is associated with the marketing content url. If nothing can be found, then null is returned.