public abstract class AbstractAddPromotionCodeToOrderTaskCmdImpl extends TaskCommandImpl implements AddPromotionCodeToOrderTaskCmd
Constructor and Description |
---|
AbstractAddPromotionCodeToOrderTaskCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected void | addPublicPromotionCodeToOrder(java.lang.Long orderId, java.lang.String code)
This method is used to add a record in ordpromocd table regardless of the code implementation.
|
protected abstract void | addUniquePromotionCodeToOrder(java.lang.Long orderId, java.lang.String code)
This abstract method is for handling the promotion code in px_cdusage table.
|
void | performExecute()
This method executes the business logic of this command implementation.
|
void | setOrderId(java.lang.Long orderId)
This is the method to set order id.
|
void | setPromotionCode(java.lang.String promotionCode)
This is the method to set promotion code.
|
void | setPromotionCodeType(java.lang.Short promotionCodeType)
This method sets the implementation type that is used for promotion code.
|
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 AbstractAddPromotionCodeToOrderTaskCmdImpl()
public void performExecute() throws ECException
The business logic of this command implementation is responsible for adding a promotion code to an order.
protected void addPublicPromotionCodeToOrder(java.lang.Long orderId, java.lang.String code) throws ECException
protected abstract void addUniquePromotionCodeToOrder(java.lang.Long orderId, java.lang.String code) throws ECException
public void validateParameters() throws ECException
public void setOrderId(java.lang.Long orderId)
public void setPromotionCode(java.lang.String promotionCode)
public void setPromotionCodeType(java.lang.Short promotionCodeType)