public abstract class AbstractRedeemPromotionCodeToOrderTaskCmdImpl extends TaskCommandImpl implements RedeemPromotionCodeToOrderTaskCmd
Constructor and Description |
---|
AbstractRedeemPromotionCodeToOrderTaskCmdImpl() |
Modifier and Type | Method and Description |
---|---|
void | performExecute()
This method executes the business logic of this command implementation.
The business logic of this command implementation is responsible for redeeming a promotion code to an order. |
protected void | redeemPublicPromotionCodeToOrder(java.lang.Long orderId, java.lang.Integer promotionId, java.lang.String code)
This method is used to handle a promotion code.
|
protected abstract void | redeemUniquePromotionCodeToOrder(java.lang.Long orderId, java.lang.Integer promotionId, java.lang.String code)
This abstract method is used to redeem unique promotion code to order
|
void | setOrderId(java.lang.Long orderId)
This is the method declaration to Set Order Id.
|
void | setPromotionCode(java.lang.String promotionCode)
This is the method declaration to Set Promotion Code.
|
void | setPromotionCodeType(java.lang.Short promotionCodeType)
This method sets the implementation type that is used for promotion code.
|
void | setPromotionId(java.lang.Integer promotionId)
This is the method to set promotion id.
|
void | validateParameters()
This method validates if the task command can be executed or not.
If the order id or promotion code is not correctly set, throw exception. |
public AbstractRedeemPromotionCodeToOrderTaskCmdImpl()
public void performExecute() throws ECException
protected void redeemPublicPromotionCodeToOrder(java.lang.Long orderId, java.lang.Integer promotionId, java.lang.String code) throws ECException
protected abstract void redeemUniquePromotionCodeToOrder(java.lang.Long orderId, java.lang.Integer promotionId, java.lang.String code) throws ECException
public void validateParameters() throws ECException
public void setPromotionId(java.lang.Integer promotionId)
public void setOrderId(java.lang.Long orderId)
public void setPromotionCode(java.lang.String promotionCode)
public void setPromotionCodeType(java.lang.Short promotionCodeType)