com.ibm.commerce.couponredemption.commands
Interface CheckApplicabilityCmd

All Superinterfaces:
ECCommand, TaskCommand
All Known Implementing Classes:
CheckApplicabilityCmdImpl

public interface CheckApplicabilityCmd
extends TaskCommand

The purpose of this command is to check for aplicability of the coupons i.e., the purchase order condition is satisfied and the information is put in applicable variable which is used by the calling command.

The input to this command are:

First the order amount is calculated. Then the cppmnId is found out by using corresponding cpwalletId for that eCoupon. If the purchase order condition type for an eCoupon promotion is of product type, then the required products and their minumum quantities are found out from cppmnprod table. If all the required products are present in the order with the required quantities, then the applicable eCoupons are found out.If the purchase order condition type for an eCoupon promotion is of type order, then the required amount for that order is found from cppmnord table and the currency from cppmn table. If the order amount satisfies the boundary conditions, then the eCoupon is applicable. These above steps are performed for each cpwalletId.


Field Summary
static java.lang.String COPYRIGHT
          defaultCommandClassName is the default implementation class used by command factory to instantiate this command if the interface com.ibm.commerce.template.commands.TaskCmdTemplate is not defined in the CMDREG table
static java.lang.String defaultCommandClassName
           
static java.lang.String Name
           
 
Method Summary
 java.util.Vector[] getApplicableItems()
           
 TypedProperty getResponseProperties()
          Get the responce properties.
 boolean[] getValidCoupons()
          Get the valid Coupons.
 void setBcIds(java.lang.Long[] paramBcIds)
          Set the eCoupon ids.
 void setOrderId(java.lang.Long newOrderId)
          Set the order ids.
 void setProcessingContext(CommandContext newProcessingContext)
          Set the processing context.
 void setRequestProperties(TypedProperty param)
          Set the request properties.
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, performExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
defaultCommandClassName is the default implementation class used by command factory to instantiate this command if the interface com.ibm.commerce.template.commands.TaskCmdTemplate is not defined in the CMDREG table

defaultCommandClassName

public static final java.lang.String defaultCommandClassName

Name

public static final java.lang.String Name
Method Detail

getApplicableItems

public java.util.Vector[] getApplicableItems()

getResponseProperties

public TypedProperty getResponseProperties()
Get the responce properties.
Returns:
com.ibm.commerce.datatype.TypedProperty

getValidCoupons

public boolean[] getValidCoupons()
Get the valid Coupons.
Returns:
boolean.

setBcIds

public void setBcIds(java.lang.Long[] paramBcIds)
Set the eCoupon ids.
Parameters:
paramBcId - java.lang.Long

setOrderId

public void setOrderId(java.lang.Long newOrderId)
Set the order ids.
Parameters:
newOrderId - java.lang.Integer

setProcessingContext

public void setProcessingContext(CommandContext newProcessingContext)
Set the processing context.
Parameters:
newProcessingContext - com.ibm.commerce.command.CommandContext

setRequestProperties

public void setRequestProperties(TypedProperty param)
Set the request properties.
Parameters:
param - com.ibm.commerce.datatype.TypedProperty