|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.commerce.command.AbstractECCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.couponredemption.commands.UseCouponIdTaskCmdImpl
This command is invoked when the shopper specifies a set of eCoupon codes explicitly while checking out.
The input to this command is :
If the given set of BCIDs aren't valid for this shopper from the CPWALLET, then an error page is send to the user. If the above condition is true then, the following steps are performed. The CheckValidityCmd command is called to find the eCoupons that are not expired and for not expired eCoupons, CheckApplicabilityCmd command is called to find out which eCoupons are applicable for this order. For applicable coupons, CalculateDiscountAmtCmd command is called to calculate the discount amount and CouponDSSTaskCmd command is called to check for any conflict.
Field Summary | |
protected java.lang.Integer |
calculationUsage
|
protected java.util.Hashtable |
conflicts
|
protected java.lang.Long[] |
couponIds
|
protected java.lang.String |
currency
|
protected java.lang.Integer |
errorCode
|
protected java.util.Vector |
invalidCoupons
|
protected int |
numCoupons
|
protected java.lang.Long |
orderId
|
protected CommandContext |
processingContext
|
protected TypedProperty |
requestProperties
|
protected java.lang.Long |
shopperId
|
protected java.lang.Integer |
storeId
|
protected boolean |
validSelection
|
protected java.util.Vector |
vecInpCouponId
|
Fields inherited from class com.ibm.commerce.command.AbstractECCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.couponredemption.commands.UseCouponIdTaskCmd |
COPYRIGHT, defaultCommandClassName, Name |
Constructor Summary | |
UseCouponIdTaskCmdImpl()
UseCouponIdCmdImpl constructor call super. |
Method Summary | |
boolean |
checkCouponIdShopperState()
Returns true if the CouopnId are for this shopper and in Usable state. |
java.lang.Integer |
getCalculationUsage()
Returns the calculationUsage. |
java.util.Hashtable |
getConflicts()
Returns the conflicts. |
java.lang.Long[] |
getCouponIds()
Returns the couponIds. |
java.lang.String |
getCurrency()
Get the currency. |
java.lang.Integer |
getErrorCode()
Returns the error code. |
java.util.Vector |
getInvalidCoupons()
Returns the invalid coupons. |
int |
getNumCoupons()
Returns the number of coupons. |
java.lang.Long |
getOrderId()
Get the order id. |
CommandContext |
getProcessingContext()
Returns the processing context. |
TypedProperty |
getRequestProperties()
Returns the request properties. |
java.lang.Long |
getShopperId()
Get the shoperId. |
void |
insertIntoDB(java.lang.Long orderId,
java.util.Hashtable couponHashtable)
Insert data into database. |
boolean |
isValidSelection()
Returns true if the selection was valid. |
void |
performExecute()
This command is invoked when the shopper specifies a set of eCoupon codes explicitly while checking out. |
void |
removeExistingAdjustments(java.lang.Long anOrderId)
Removes the existing adjustments for this order. |
void |
removeOldEntries()
It removes the old entries from the TORCPMAP and TCPITMAP tables. |
void |
setCalculationUsage(java.lang.Integer newCalculationUsage)
Sets the calculation usage. |
void |
setConflicts(java.util.Hashtable newConflicts)
Sets the conflicts. |
void |
setCouponIds(java.lang.Long[] newCouponIds)
Sets the couponIds. |
void |
setCurrency(java.lang.String newCurrency)
It set the currency. |
void |
setErrorCode(java.lang.Integer newErrorCode)
Sets the errorcode. |
void |
setInvalidCoupons(java.util.Vector newInvalidCoupons)
Sets the invalidCoupons. |
void |
setNumCoupons(int newNumCoupons)
Sets teh number of coupons. |
void |
setOrderId(java.lang.Long newOrderId)
Set the order id. |
void |
setProcessingContext(CommandContext newProcessingContext)
Sets the processing context. |
void |
setRequestProperties(TypedProperty newRequestProperties)
Sets the processing context. |
void |
setShopperId(java.lang.Long newShopperId)
Set the shopperId. |
void |
setValidSelection(boolean newValidSelection)
Sets the validSelect field. |
void |
validateParameters()
Extracts the couponIds to be used in the command from the request. |
Methods inherited from class com.ibm.commerce.command.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Field Detail |
protected java.lang.Integer calculationUsage
protected java.util.Hashtable conflicts
protected java.lang.Long[] couponIds
protected java.lang.String currency
protected java.lang.Integer errorCode
protected java.util.Vector invalidCoupons
protected int numCoupons
protected java.lang.Long orderId
protected CommandContext processingContext
protected TypedProperty requestProperties
protected java.lang.Long shopperId
protected java.lang.Integer storeId
protected boolean validSelection
protected java.util.Vector vecInpCouponId
Constructor Detail |
public UseCouponIdTaskCmdImpl()
Method Detail |
public boolean checkCouponIdShopperState() throws ECSystemException
public java.lang.Integer getCalculationUsage()
public java.util.Hashtable getConflicts()
getConflicts
in interface UseCouponIdTaskCmd
public java.lang.Long[] getCouponIds()
public java.lang.String getCurrency()
public java.lang.Integer getErrorCode()
getErrorCode
in interface UseCouponIdTaskCmd
public java.util.Vector getInvalidCoupons()
getInvalidCoupons
in interface UseCouponIdTaskCmd
public int getNumCoupons()
getNumCoupons
in interface UseCouponIdTaskCmd
public java.lang.Long getOrderId()
public CommandContext getProcessingContext()
public TypedProperty getRequestProperties()
public java.lang.Long getShopperId()
public void insertIntoDB(java.lang.Long orderId, java.util.Hashtable couponHashtable) throws ECSystemException
couponHashTable
- java.util.Hashtablepublic boolean isValidSelection()
isValidSelection
in interface UseCouponIdTaskCmd
public void performExecute() throws ECException
This command is invoked when the shopper specifies a set of eCoupon codes explicitly while checking out.
If the given set of BCIDs aren't valid for this shopper from the CPWALLET, then an error page is send to the
user. If the above condition is true then, the following steps are performed. The CheckValidityCmd command is called
to find the eCoupons that are not expired and for not expired eCoupons, CheckApplicabilityCmd command is called
to find out which eCoupons are applicable for this order. For applicable coupons, CalculateDiscountAmtCmd command
is called to calculate the discount amount and CouponDSSTaskCmd command is called to check for any conflict.
performExecute
in interface ECCommand
performExecute
in class AbstractECCommand
ECException
- public void removeExistingAdjustments(java.lang.Long anOrderId) throws ECSystemException
anOrderId
- java.lang.Longpublic void removeOldEntries() throws ECSystemException
:
- com.ibm.commerce.exception.ECException.public void setCalculationUsage(java.lang.Integer newCalculationUsage)
newCalculationUsage
- java.lang.Integerpublic void setConflicts(java.util.Hashtable newConflicts)
newConflicts
- java.util.Hashtablepublic void setCouponIds(java.lang.Long[] newCouponIds)
setCouponIds
in interface UseCouponIdTaskCmd
newCouponIds
- java.lang.Long[]public void setCurrency(java.lang.String newCurrency)
newCurrency
- java.lang.Stringpublic void setErrorCode(java.lang.Integer newErrorCode)
newErrorCode
- java.lang.Integerpublic void setInvalidCoupons(java.util.Vector newInvalidCoupons)
newInvalidCoupons
- java.util.Vectorpublic void setNumCoupons(int newNumCoupons)
newNumCoupons
- intpublic void setOrderId(java.lang.Long newOrderId)
setOrderId
in interface UseCouponIdTaskCmd
newOrderId
- java.lang.Longpublic void setProcessingContext(CommandContext newProcessingContext)
newProcessingContext
- com.ibm.commerce.command.CommandContextpublic void setRequestProperties(TypedProperty newRequestProperties)
setRequestProperties
in interface UseCouponIdTaskCmd
newRequestProperties
- com.ibm.commerce.datatype.TypedPropertypublic void setShopperId(java.lang.Long newShopperId)
setShopperId
in interface UseCouponIdTaskCmd
newShopperId
- java.lang.Longpublic void setValidSelection(boolean newValidSelection)
newValidSelection
- booleanpublic void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECCommand
ECException.
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |