com.ibm.commerce.marketing.commands

Class IssueCouponControllerCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, IssueCouponControllerCmd, Protectable, 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 IssueCouponControllerCmdImpl
    extends ControllerCommandImpl
    implements IssueCouponControllerCmd

    This Controller Command issues Coupon to a Shopper. It implements IssueCouponControllerCmd interface. This command is mapped to CouponsIssue URL.

    If the command is executed as a URL Command the following url parameters must be set

    • promotionName (Name of the Promotion)

    Optionally the following parameters can be set

    • URL (URL to which the request should be redirected after the command is successfuly executed)
    • VIEW (VIEW to which the request should be forwarded after the command is successfuly executed)
    • couponCode (If you need to set a code for the Coupon)
    • userIdentifier (If for guest shopper we need to set a token which uniquely identifies her/him)
              Note: If both URL & VIEW parameters are specified, the request will be redirected to URL. 
                        If both are not specified the request will be forwarded to CouponsDisplayView.
     

    If executing this Command as a task Command,the methods listed below must be invoked before calling the command

    • setPromotionName
    • setURL or setViewName

    Optionally the following methods can be invoked

    • setCouponCode (If you need to set a code for the Coupon)
    • setUserIdentifier (If for guest shopper we need to set a token which uniquely identifies her/him)
    See Also:
    Serialized Form
    • Constructor Detail

      • IssueCouponControllerCmdImpl

        public IssueCouponControllerCmdImpl()
        Constructor
    • Method Detail

      • setCouponCode

        public void setCouponCode(java.lang.String couponC)
        This method sets the coupon code.
        Parameters:
        couponC - - The coupon code to set.
      • setPromotionName

        public void setPromotionName(java.lang.String promoName)
        This method sets the promotion name.
        Parameters:
        promoName - - The promotion name to set.
      • setPromotionID

        public void setPromotionID(java.lang.Integer promoID)
        This method sets the promotion id.
        Parameters:
        promoID - - The promotion name to set.
      • setUserIdentifier

        public void setUserIdentifier(java.lang.String userId)
        This method sets the user identifier.
        Parameters:
        userId - - The user identifier to set.
      • setURL

        public void setURL(java.lang.String urls)
        This method sets the Redirect URL.
        Parameters:
        urls - - the redirect URL to set.
      • setViewName

        public void setViewName(java.lang.String viewN)
        This method sets the view name.
        Parameters:
        viewN - - the view name to set.
      • getViewName

        public java.lang.String getViewName()
        This methods returns the view name.
        Returns:
        the view name.
      • getCouponCode

        public java.lang.String getCouponCode()
        This method gets the coupon code.
        Returns:
        The coupon code.
      • getPromotionName

        public java.lang.String getPromotionName()
        This method gets the promotion name.
        Returns:
        the promotion name.
      • getPromotionID

        public java.lang.Integer getPromotionID()
        This method gets the promotion id.
        Returns:
        the promotion id.
      • getUserIdentifier

        public java.lang.String getUserIdentifier()
        This method gets the userIdentifier.
        Returns:
        The user identifier.
      • getURL

        public java.lang.String getURL()
        This method gets the Redirect URL.
        Returns:
        the Redirect URL.