public class AddOrderItemWithPromotionCodeOrCouponCmdImpl extends OrderItemAddCmdImpl implements AddOrderItemWithPromotionCodeOrCouponCmd
AddOrderItemWithPromotionCodeOrCouponCmd
interface.
It is called in nested controller commands and redirects to page with different types of error messages
in case there is an error in running this command.
partNumber
or catEntryId
parameters are set, then add the item to the
customer's pending order. If partNumber
or catEntryId
parameters are not set,
then only create a pending order if one does not currently exist.promoCode
parameter is provided, then apply the promotion code to the pending order.
Otherwise, if the promoName
parameter is provided, then find the specified promotion, and
issue a coupon to the customer associated with that promotion. Then apply the coupon to the customer's pending
order.GENERATED_ORDERITEM, MANUAL_FULFILLMENT_CENTER, MANUAL_PRICE, NORMAL_ORDERITEM, STR_INVALID_INPUT_ERROR_VIEW
defaultCommandClassName
badPartNumberErrorView, badPartNumberList, badPartNumberQuantityList, goodPartNumberList, goodPartNumberQuantityList, multiplePartNumberCatalogEntriesList, multiplePartNumberList, multiplePartNumberQuantityList, NAME
defaultCommandClassName, NAME
Constructor and Description |
---|
AddOrderItemWithPromotionCodeOrCouponCmdImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
isReadyToCallExecute()
Checks to see if this controller command is ready to be invoked
|
void |
performExecute()
This method is responsible for adding a promotion code to an order.
|
void |
setGuestToken(java.lang.String aToken)
Sets the string identifier of a guest customer.
|
void |
setPromotionCode(java.lang.String pCode)
Sets promotion code.
|
void |
setPromotionName(java.lang.String pName)
Sets promotion name.
|
void |
setPromotionVersion(java.lang.Integer version)
Sets promotion version.
|
void |
setRequestProperties(TypedProperty aRequestProperties)
Sets the request properties of the controller command.
|
void |
validateParameters()
This method verifies the input parameters.
|
getATPParms, getCalculationUsageIds, getDeletedOrderItemCatEntryIds, getDeletedOrderItemIds, getIsExpedited, getNewOrderId, getNewOrderItemIds, getNonBuyableCatentryIds, getOrderField1, getOrderField2, getOrderField3, getOrderIds, getOrderItemIds, getOutOfInvItems, getRepriceOrderFlag, getResolvedRequestProperties, getResources, getTheUser, getTheUserId, getTieShipCode, reset, setAddressId, setATPParms, setAttrName, setAttrValue, setCalculationUsageIds, setCarrAccntNum, setCatEntryId, setChargeTypes, setComment, setComp_priceLocks, setComp_prices, setComp_quantities, setCompListId, setConfiguration, setConfigurationId, setContinue, setContractId, setCorrelationGroup, setDescription, setDk_price, setDk_priceLock, setDoPrice, setExpandConfigurationId, setField1, setField2, setFulfillmentCenterId, setIsExpedited, setListId, setMemberId, setOfferId, setOrderComment, setOrderDesc, setOrderField1, setOrderField2, setOrderField3, setOrderId, setOrderItemId, setOutOrderItemName, setOutOrderName, setPartNumber, setPhysicalStoreId, setQuantity, setQuantity, setRepriceOrderFlag, setRequestedShipDate, setShipAsComplete, setShipInstructions, setShipmodeId, setTieShipCode, setTradingId, setUom
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNonBuyableCatentryIds, getOrderIds, getOrderItemIds, setAddressId, setAttrName, setAttrValue, setCatEntryId, setComment, setConfigurationId, setContinue, setContractId, setCorrelationGroup, setDescription, setExpandConfigurationId, setField1, setField2, setFulfillmentCenterId, setListId, setMemberId, setOfferId, setOrderComment, setOrderDesc, setOrderId, setOutOrderItemName, setOutOrderName, setPartNumber, setQuantity, setShipmodeId, setTradingId, setUom
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
fulfills, getOwner
public AddOrderItemWithPromotionCodeOrCouponCmdImpl()
public void setPromotionCode(java.lang.String pCode)
AddOrderItemWithPromotionCodeOrCouponCmd
setPromotionCode
in interface AddOrderItemWithPromotionCodeOrCouponCmd
pCode
- the promotion codeAddOrderItemWithPromotionCodeOrCouponCmd.setPromotionCode(java.lang.String)
public void setPromotionName(java.lang.String pName)
AddOrderItemWithPromotionCodeOrCouponCmd
setPromotionName
in interface AddOrderItemWithPromotionCodeOrCouponCmd
pName
- the name of the promotionAddOrderItemWithPromotionCodeOrCouponCmd.setPromotionName(java.lang.String)
public void setPromotionVersion(java.lang.Integer version)
AddOrderItemWithPromotionCodeOrCouponCmd
setPromotionVersion
in interface AddOrderItemWithPromotionCodeOrCouponCmd
version
- set the version for promotion. Promotions with different
version numbers are considered different promotions. Among all
the promotions with same name in the same store, only one is
active at any given time. This one is identified by promotion
name, version or revision numbers, and store ID. The rest of
them will be marked as obsolete.AddOrderItemWithPromotionCodeOrCouponCmd.setPromotionVersion(java.lang.Integer)
public void setGuestToken(java.lang.String aToken)
AddOrderItemWithPromotionCodeOrCouponCmd
setGuestToken
in interface AddOrderItemWithPromotionCodeOrCouponCmd
aToken
- the string identifier of the guest customercom.ibm.commerce.marketing.commands.AddOrderItemWithPromotionCodeOrCouponCmd#setGuestToken(java.lang.Integer)
public boolean isReadyToCallExecute()
isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class AbstractECTargetableCommand
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class OrderItemBaseCmdImpl
ECException
- if an error is encountered.public void setRequestProperties(TypedProperty aRequestProperties) throws ECException
setRequestProperties
in interface ControllerCommand
setRequestProperties
in class OrderItemBaseCmdImpl
aRequestProperties
- The request properties to set to the controller command, for example "promoCode".ECException
- when an error is encountered on setting the request properties.ControllerCommand.setRequestProperties(com.ibm.commerce.datatype.TypedProperty)
public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class OrderItemBaseCmdImpl
ECException