com.ibm.commerce.couponredemption.commands
Class UseCouponIdCmdImpl
java.lang.Object
|
+--CacheableCommandImpl
|
+--com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.couponredemption.commands.UseCouponIdCmdImpl
- All Implemented Interfaces:
-
AccCommand,
ControllerCommand,
ECCommand,
ECTargetableCommand,
UseCouponIdCmd
- public class UseCouponIdCmdImpl
- extends
ControllerCommandImpl
- implements
UseCouponIdCmd
This command is invoked when the customer specifies a set of eCoupon codes
explicitly while checking out. This command just processes the parameters and
then calls the UseCouponIdTaskCmd
. Also, based on the parameters,
it would redirect to the view to appropriate URL.
- See Also:
- Serialized
Form
Field Summary |
protected
java.lang.Long[] |
couponId
The coupons to be used. |
protected
java.util.Vector |
iResourceList
The resources required by this command (for accesscontrol
purpose). |
protected
java.lang.Long |
orderId
The order on which coupons are to be applied. |
protected
CommandContext |
processingContext
The command context holder |
protected
boolean |
selectionOK
True if the user inputs are OK. |
protected
java.lang.Long |
shopperId
The customer who has invoked this command. |
protected
java.lang.Integer |
storeId
Store ID for which the order is placed. |
Methods inherited from class
com.ibm.commerce.command.
ControllerCommandImpl |
checkPermission,
fulfills,
getForUserId,
getGeneric,
getOwner,
getRequestProperties,
getResolvedRequestProperties,
getResourceOwners,
getResponseProperties,
getRetriable,
getViewInputProperties,
isGeneric,
isRetriable,
mergeProperties,
setForUserId,
setGeneric,
setOwner,
setRequestProperties,
setResponseProperties,
setRetriable,
setViewInputProperties |
Methods inherited from class
com.ibm.commerce.command.
AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
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.
ControllerCommand |
checkPermission,
execute,
getGeneric,
getRequestProperties,
getResolvedRequestProperties,
getResponseProperties,
getRetriable,
getViewInputProperties,
isGeneric,
isRetriable,
mergeProperties,
setGeneric,
setRequestProperties,
setRetriable,
setViewInputProperties |
Methods inherited from interface
com.ibm.commerce.command.
ECCommand |
checkIsAllowed,
checkResourcePermission,
createCommandExecutionEvent,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getStoreId,
getUser,
getUserId,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
couponId
protected java.lang.Long[] couponId
- The coupons to be used.
processingContext
protected CommandContext processingContext
- The command context holder
shopperId
protected java.lang.Long shopperId
- The customer who has invoked this command.
storeId
protected java.lang.Integer storeId
- Store ID for which the order is placed.
orderId
protected java.lang.Long orderId
- The order on which coupons are to be applied.
iResourceList
protected java.util.Vector iResourceList
- The resources required by this command (for accesscontrol purpose).
selectionOK
protected boolean selectionOK
- True if the user inputs are OK.
UseCouponIdCmdImpl
public UseCouponIdCmdImpl()
- UseCouponIdCmdImpl constructor call super.
getResources
public AccessVector getResources()
throws ECSystemException
- Gets the resourses.
-
- Specified by:
-
getResources
in interface
ECCommand
- Overrides:
-
getResources
in class
AbstractECTargetableCommand
-
- Returns:
- the resources.
- Throws:
-
ECSystemException
public void performExecute()
throws ECException
- If the coupon selection is incorrect then it throws an error page,
otherwise, it calls
UseCouponIdTaskCmd
. Subsequently, it redirects
to the appropriate view.
-
- Specified by:
-
performExecute
in interface
ECCommand
- Overrides:
-
performExecute
in class
AbstractECTargetableCommand
-
- Throws:
-
ECException
validateParameters
public void validateParameters()
throws ECException
- It extracts and validates the parameters.
-
- Specified by:
-
validateParameters
in interface
ECCommand
- Overrides:
-
validateParameters
in class
AbstractECTargetableCommand
-
- Throws:
-
ECException