com.ibm.commerce.emarketing.emailtemplate.tag

Class TagLinkBase

  • java.lang.Object
    • com.ibm.commerce.emarketing.emailtemplate.tag.TagLinkBase
  • All Implemented Interfaces:
    Tag
    Direct Known Subclasses:
    TagLink


    public abstract class TagLinkBase
    extends java.lang.Object
    implements Tag
    An abstract base tag class to extend for the email template link tag implementation classes
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      COPYRIGHT
    • Constructor Summary

      Constructors 
      Constructor and Description
      TagLinkBase()
      Default Constructor..
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String generateURLForEmailAction(java.lang.String url)
      Based on the 'emailAction' value, this function modifies the url passed...
      java.lang.String getAddToInterestItemURL()
      Returns the Add to wishlist URL
      java.lang.String getAddToShoppingCartURL()
      Returns the Add to shopping cart url
      java.lang.String getCatalogId()
      Returns the Catalog ID to use in the URL.
      java.lang.String getCategoryDisplayURL()
      Returns the category display url
      java.lang.String getCategoryImagePath(java.lang.String categoryId)
      This method returns the image path for the given category Id
      com.ibm.commerce.command.CommandContext getCommandContext()
      Returns the command context
      java.lang.String getIssueCouponURL()
      return the issue coupon url
      java.lang.String getProductDisplayURL()
      Returns the product display url
      java.lang.String getProductImagePath(java.lang.String catalogId, java.lang.String sku)
      For the given catalogId and PartNumber, this method returns the image path
      java.lang.String getShortDescription()
      Returns the short description
      java.util.Hashtable getTagParameters()
      Returns the tag parameters
      java.lang.String optOutURL(java.lang.String forThisURL)
      Modifies the given URL, so that the user can opt out of the mailing list by clicking on this URL
      java.lang.String recordNumberOfClicksURL(java.lang.String forThisURL)
      This function modifies the given url, so that number of clicks for this url can be recorded
      void setCommandContext(com.ibm.commerce.command.CommandContext cc)
      Sets the command Context..
      void setTagParameters(java.util.Hashtable tagParametersCopy)
      Copies the hash table containing key-value parameter required to evaluate this tag, into the class level variable...
      void setTagParameters(java.lang.String tagParamName, java.lang.String tagParamValue)
      Sets the key-value parameter, required to evaluate this tag..
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.ibm.commerce.emarketing.emailtemplate.tag.Tag

        getTagValue
    • Constructor Detail

      • TagLinkBase

        public TagLinkBase()
        Default Constructor..
    • Method Detail

      • generateURLForEmailAction

        public java.lang.String generateURLForEmailAction(java.lang.String url)
        Based on the 'emailAction' value, this function modifies the url passed...
        Parameters:
        url - - URL to be modified
        Returns:
        String - modified URL
      • getAddToInterestItemURL

        public java.lang.String getAddToInterestItemURL()
        Returns the Add to wishlist URL
        Returns:
        The add to wishlist url
      • getAddToShoppingCartURL

        public java.lang.String getAddToShoppingCartURL()
        Returns the Add to shopping cart url
        Returns:
        The add to shopping cart url
      • getCatalogId

        public java.lang.String getCatalogId()
                                      throws java.lang.Exception
        Returns the Catalog ID to use in the URL. If a the tag 'overrideCatalogId' is specified, that value will be returned. If a default catalog ID is specified on the store and no override is provided, the default catalog will be returned. Otherwise the master catalog ID will be returned.
        Returns:
        The catalog ID to use in the URL.
        Throws:
        java.lang.Exception
      • getCategoryDisplayURL

        public java.lang.String getCategoryDisplayURL()
        Returns the category display url
        Returns:
        The category display url
      • getCategoryImagePath

        public java.lang.String getCategoryImagePath(java.lang.String categoryId)
        This method returns the image path for the given category Id
        Parameters:
        categoryId -
        Returns:
        String - image path
      • getCommandContext

        public com.ibm.commerce.command.CommandContext getCommandContext()
        Returns the command context
        Returns:
        The command context
      • getIssueCouponURL

        public java.lang.String getIssueCouponURL()
        return the issue coupon url
        Returns:
        the url for coupon issue
      • getProductDisplayURL

        public java.lang.String getProductDisplayURL()
        Returns the product display url
        Returns:
        The product display url
      • getProductImagePath

        public java.lang.String getProductImagePath(java.lang.String catalogId,
                                                    java.lang.String sku)
        For the given catalogId and PartNumber, this method returns the image path
        Parameters:
        catalogId -
        sku -
        Returns:
        String - image Path for the given part number
      • getShortDescription

        public java.lang.String getShortDescription()
        Returns the short description
        Returns:
        String - short description of the partnumber
      • getTagParameters

        public java.util.Hashtable getTagParameters()
        Returns the tag parameters
        Returns:
        The tag parameters
      • optOutURL

        public java.lang.String optOutURL(java.lang.String forThisURL)
        Modifies the given URL, so that the user can opt out of the mailing list by clicking on this URL
        Parameters:
        forThisURL - - url
        Returns:
        String - modified URL
      • recordNumberOfClicksURL

        public java.lang.String recordNumberOfClicksURL(java.lang.String forThisURL)
        This function modifies the given url, so that number of clicks for this url can be recorded
        Parameters:
        forThisURL - - URL for which we need to record number of clicks
        Returns:
        String - modified url
      • setCommandContext

        public void setCommandContext(com.ibm.commerce.command.CommandContext cc)
        Sets the command Context..
        Specified by:
        setCommandContext in interface Tag
        Parameters:
        cc - Command Context
      • setTagParameters

        public void setTagParameters(java.util.Hashtable tagParametersCopy)
        Copies the hash table containing key-value parameter required to evaluate this tag, into the class level variable...
        Specified by:
        setTagParameters in interface Tag
        Parameters:
        tagParametersCopy - Hashtable containing tag parameters.
      • setTagParameters

        public void setTagParameters(java.lang.String tagParamName,
                                     java.lang.String tagParamValue)
        Sets the key-value parameter, required to evaluate this tag.. Recipient Id is the mandatory key, that needs to be set..
        Specified by:
        setTagParameters in interface Tag
        Parameters:
        tagParamName - - key name
        tagParamValue - - value of the tag parameter