com.ibm.commerce.marketing.commands
Class AbstractRedeemPromotionCodeToOrderTaskCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- com.ibm.commerce.command.AbstractECTargetableCommand
-
- com.ibm.commerce.command.TaskCommandImpl
-
- com.ibm.commerce.marketing.commands.AbstractRedeemPromotionCodeToOrderTaskCmdImpl
-
- All Implemented Interfaces:
- com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, RedeemPromotionCodeToOrderTaskCmd, 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
- Direct Known Subclasses:
- RedeemPromotionCodeToOrderCOTaskCmdImpl, RedeemPromotionCodeToOrderTaskCmdImpl
public abstract class AbstractRedeemPromotionCodeToOrderTaskCmdImpl extends TaskCommandImpl implements RedeemPromotionCodeToOrderTaskCmd
The abstract class implements RedeemPromotionCodeToOrderTaskCmd and is used for redeeming a promotion codes for an order. It provides an abstract method to support the unique promotion code implementation.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.ibm.commerce.marketing.commands.RedeemPromotionCodeToOrderTaskCmd
defaultCommandClassName, NAME
-
-
Constructor Summary
Constructors Constructor and Description AbstractRedeemPromotionCodeToOrderTaskCmdImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods 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.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.-
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
-
-
-
Constructor Detail
-
AbstractRedeemPromotionCodeToOrderTaskCmdImpl
public AbstractRedeemPromotionCodeToOrderTaskCmdImpl()
-
-
Method Detail
-
performExecute
public void performExecute() throws ECException
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.- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- Throws:
ECException
- This exception is thrown when any kind of Exception catch.
-
validateParameters
public void validateParameters() throws ECException
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.- Specified by:
validateParameters
in interfaceECCommand
- Overrides:
validateParameters
in classAbstractECTargetableCommand
- Throws:
ECException
- This exception is thrown when the order id or promotion code is not correctly set
-
setPromotionId
public void setPromotionId(java.lang.Integer promotionId)
Description copied from interface:RedeemPromotionCodeToOrderTaskCmd
This is the method to set promotion id. The promotion indicates which order need to redeem with the promotion.- Specified by:
setPromotionId
in interfaceRedeemPromotionCodeToOrderTaskCmd
- Parameters:
promotionId
- An Integer representing the promotion id to be used in the command.- See Also:
RedeemPromotionCodeToOrderTaskCmd.setPromotionId(java.lang.Integer)
-
setOrderId
public void setOrderId(java.lang.Long orderId)
Description copied from interface:RedeemPromotionCodeToOrderTaskCmd
This is the method declaration to Set Order Id.- Specified by:
setOrderId
in interfaceRedeemPromotionCodeToOrderTaskCmd
- Parameters:
orderId
- A Long representing the order id to be used in the command.- See Also:
RedeemPromotionCodeToOrderTaskCmd.setOrderId(java.lang.Long)
-
setPromotionCode
public void setPromotionCode(java.lang.String promotionCode)
Description copied from interface:RedeemPromotionCodeToOrderTaskCmd
This is the method declaration to Set Promotion Code.- Specified by:
setPromotionCode
in interfaceRedeemPromotionCodeToOrderTaskCmd
- Parameters:
promotionCode
- A String representing the promotion code to be used in the command.- See Also:
RedeemPromotionCodeToOrderTaskCmd.setPromotionCode(java.lang.String)
-
setPromotionCodeType
public void setPromotionCodeType(java.lang.Short promotionCodeType)
Description copied from interface:RedeemPromotionCodeToOrderTaskCmd
This method sets the implementation type that is used for promotion code. 1 indicates the promotion code is implemented with unique promotion code framework.- Specified by:
setPromotionCodeType
in interfaceRedeemPromotionCodeToOrderTaskCmd
- Parameters:
promotionCodeType
- A Short representing the promotion code implementation type to be used in the command.- See Also:
RedeemPromotionCodeToOrderTaskCmd.setPromotionCodeType(java.lang.Short)
-
-