com.ibm.commerce.tools.ecoupon

Class ECouponPromotionUpdateCmdImpl

    • Field Detail

      • COPYRIGHT

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

      • ECouponPromotionUpdateCmdImpl

        public ECouponPromotionUpdateCmdImpl()
        Deprecated. 
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        Deprecated. 
        Invokes the task command UpdateECouponPromotionTaskCmd to update coupon promotion associated tables, for the promo ID and the coupon promotion XML.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException -

        Behaviour

        The command does the following

        1. Creates the UpdateECouponPromotionTaskCmd.
          1. Sets the language ID, the XML, the promo ID, the store ID, the locale and the command context parameters of the task command.
            1. Executes the task command.
              1. If the task command returns an error, sets the response properties with the error returned and throws ECApplicationException with response properties and NotebookNavigation View.
                1. If everything is successful, it redirects to the view ECConstants.EC_GENERIC_REDIRECTVIEW.
                  1. This gets redirected to the view of coupon promotion update, with a successful finish message.
      • validateParameters

        public void validateParameters()
                                throws ECException
        Deprecated. 
        Gets the XML file, the language ID, the store ID and the promotion ID from the command context and the request properties and assigns to appropriate class variables.
        Specified by:
        validateParameters in interface ECCommand
        Overrides:
        validateParameters in class AbstractECTargetableCommand
        Throws:
        ECException
        See Also:
        Here is a summary of all the parameters passed in request properties hashtable.
        Parameter Name Valid Type Optional/Mandatory
        ECECouponConstant.EC_Promo_IdString - Name of promotion Mandatory
        EC_XMLOBJECTVector - Contains a hashtable of coupon promotion parameter values in an object named EC_XMLMandatory
        A summary of all the parameters expected in the hashtable EC_XML.
        Parameter Name Valid Type Optional/Mandatory
        eCouponName String - Name of promotion Mandatory
        eCouponCurr String - Currency Mandatory
        eCouponDesc String - Merchant viewable description Optional
        shortDesc String - customer viewable short description Optional
        longDesc String - customer viewable long description Optional
        fullImagePath String - customer viewable full image path Optional
        thumbNailPath String - customer viewable thumbnail path Optional
        hasDateTimeRange String - "true"/"false" Mandatory
        eCouponStartYear String representing an year Mandatory if hasDateTimeRange="true"
        eCouponStartMonth String representing a month Mandatory if hasDateTimeRange="true"
        eCouponStartDay String representing a day Mandatory if hasDateTimeRange="true"
        eCouponEndYear String representing an year Mandatory if hasDateTimeRange="true"
        eCouponEndMonth String representing a month Mandatory if hasDateTimeRange="true"
        eCouponEndDay String representing a day Mandatory if hasDateTimeRange="true"
        eCouponStartTimeSelectedIndex String representing an hour Mandatory if hasDateTimeRange="true"
        eCouponEndTimeSelectedIndex String representing an hour Mandatory if hasDateTimeRange="true"
        hasNumOffer String - "true"/"false" Mandatory
        eCouponNumOffer String - number of coupons Mandatory if hasNumOffer="true"
        purchaseConditionType String - "0"(product), "1"(order), "2"(category) Mandatory
        minAmt String - a double representing minimum qualifying amount for order type coupon Mandatory if purchaseConditionType=0
        hasMax String - "true"/"false" Mandatory if purchaseConditionType=0
        maxAmt String - a double representing minimum qualifying amount for order type coupon Mandatory if hasMax="true"
        orderType String - "0"(percentage), "1"(fixed) - discount type on order Mandatory if purchaseConditionType=0
        orderPercentageAmt String - percentage discount amount Mandatory if orderType=0
        orderFixedAmt String - fixed discount amount Mandatory if orderType=1
        product Hashtable of product SKUs in the purchase condition Mandatory if purchaseConditionType=1
        checkedProducts Hashtable of product SKUs to be discounted Mandatory if purchaseConditionType=1
        productType String - "0"(percentage), "1"(fixed) - discount type on products Mandatory if purchaseConditionType=1
        productPercentageAmt String - percentage discount amount Mandatory if productType=0
        productFixedAmt String - fixed discount amount Mandatory if productType=1
        catalogId String - The catalogId on which the coupon is defined Mandatory if purchaseConditionType=2
        category Hashtable of category identifiers in the purchase condition Mandatory if purchaseConditionType=2
        checkedCategorys Hashtable of category identifiers to be discounted Mandatory if purchaseConditionType=2
        categoryType String - "0"(percentage), "1"(fixed) - discount type on categories Mandatory if purchaseConditionType=2
        categoryPercentageAmt String - percentage discount amount Mandatory if productType=2
        categoryFixedAmt String - fixed discount amount Mandatory if productType=2

        Behaviour

        The command does the following

        1. It obatins the store ID and the language ID from the command context.
          1. It obtains the XML and the promotion ID from the request properties.
            1. If any parameter is not found, it throws an exception with the message ECMessage._ERR_CMD_MISSING_PARAM and name of the missing parameter.