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_VIEWdefaultCommandClassNamebadPartNumberErrorView, badPartNumberList, badPartNumberQuantityList, goodPartNumberList, goodPartNumberQuantityList, multiplePartNumberCatalogEntriesList, multiplePartNumberList, multiplePartNumberQuantityList, NAMEdefaultCommandClassName, 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, setUomcheckPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputPropertiesaccessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiesexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCachegetCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicyequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNonBuyableCatentryIds, 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, setUomcheckPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputPropertiesexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCachegetCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputPropertiesaccessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwnercheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiesfulfills, getOwnerpublic AddOrderItemWithPromotionCodeOrCouponCmdImpl()
public void setPromotionCode(java.lang.String pCode)
AddOrderItemWithPromotionCodeOrCouponCmdsetPromotionCode in interface AddOrderItemWithPromotionCodeOrCouponCmdpCode - the promotion codeAddOrderItemWithPromotionCodeOrCouponCmd.setPromotionCode(java.lang.String)public void setPromotionName(java.lang.String pName)
AddOrderItemWithPromotionCodeOrCouponCmdsetPromotionName in interface AddOrderItemWithPromotionCodeOrCouponCmdpName - the name of the promotionAddOrderItemWithPromotionCodeOrCouponCmd.setPromotionName(java.lang.String)public void setPromotionVersion(java.lang.Integer version)
AddOrderItemWithPromotionCodeOrCouponCmdsetPromotionVersion in interface AddOrderItemWithPromotionCodeOrCouponCmdversion - 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)
AddOrderItemWithPromotionCodeOrCouponCmdsetGuestToken in interface AddOrderItemWithPromotionCodeOrCouponCmdaToken - 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.CommandisReadyToCallExecute in class AbstractECTargetableCommandpublic void performExecute()
throws ECException
performExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class OrderItemBaseCmdImplECException - if an error is encountered.public void setRequestProperties(TypedProperty aRequestProperties) throws ECException
setRequestProperties in interface ControllerCommandsetRequestProperties in class OrderItemBaseCmdImplaRequestProperties - 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 ECCommandvalidateParameters in class OrderItemBaseCmdImplECException