com.ibm.commerce.couponwallet.commands
Class DeleteCouponsFromWalletCmdImpl
java.lang.Object
|
+--CacheableCommandImpl
|
+--com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.couponwallet.commands.DeleteCouponsFromWalletCmdImpl
- All Implemented Interfaces:
-
AccCommand,
ControllerCommand,
DeleteCouponsFromWalletCmd,
ECCommand,
ECTargetableCommand
- public class DeleteCouponsFromWalletCmdImpl
- extends
ControllerCommandImpl
- implements
DeleteCouponsFromWalletCmd
For each cpwalletId
in the input parameter, the STATE of the
eCoupon is updated in CouponWalletAccessBean
to DELETED.
ViewNames SearchWalletView : After deleting the coupons successfully if
no URL was specified.
- See Also:
- Serialized
Form
Field Summary |
protected
java.lang.Long[] |
couponId
The coupons to be deleted. |
protected
int |
numCoupons
The number of coupons to be deleted. |
protected
boolean |
selectionOK
True if the selection by user is correct. |
Method Summary |
java.lang.Long[] |
getCouponId()
Gets the coupon IDs. |
int |
getNumCoupons()
Gets the number of coupons. |
AccessVector |
getResources()
Gets the resources for access control purpose. |
boolean |
isReadyToCallExecute()
It always returns true. |
void |
performExecute()
For each cpwalletId in the input parameter, the STATE of
the eCoupon is updated in CouponWalletAccessBean to
DELETED. |
void |
setCouponId(java.lang.Long[] newCouponId)
Sets the coupon IDs to be deleted. |
void |
setNumCoupons(int newNumCoupons)
Sets the number of coupons. |
void |
validateParameters()
It extracts the parameters from the request and command context and
checks for their correctness. |
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,
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 |
numCoupons
protected int numCoupons
- The number of coupons to be deleted.
couponId
protected java.lang.Long[] couponId
- The coupons to be deleted.
selectionOK
protected boolean selectionOK
- True if the selection by user is correct.
DeleteCouponsFromWalletCmdImpl
public DeleteCouponsFromWalletCmdImpl()
- DeleteCouponsFromWalletCmdImpl constructor call super.
getCouponId
public java.lang.Long[] getCouponId()
- Gets the coupon IDs.
-
- Returns:
- the coupon IDs.
getNumCoupons
public int getNumCoupons()
- Gets the number of coupons.
-
- Returns:
- the number of coupons.
getResources
public AccessVector getResources()
throws ECSystemException
- Gets the resources for access control purpose.
-
- Specified by:
-
getResources
in interface
ECCommand
- Overrides:
-
getResources
in class
AbstractECTargetableCommand
-
- Returns:
- the resources.
- Throws:
-
ECSystemException
isReadyToCallExecute
public boolean isReadyToCallExecute()
- It always returns true.
-
- Overrides:
-
isReadyToCallExecute
in class
AbstractECTargetableCommand
-
- Returns:
- true
public void performExecute()
throws ECException
- For each
cpwalletId
in the input parameter, the STATE of the
eCoupon is updated in CouponWalletAccessBean
to DELETED.
-
- Specified by:
-
performExecute
in interface
ECCommand
- Overrides:
-
performExecute
in class
AbstractECTargetableCommand
-
- Throws:
-
ECException
- If a problem is encountered while creating or finding an
EJB.
setCouponId
public void setCouponId(java.lang.Long[] newCouponId)
- Sets the coupon IDs to be deleted.
-
- Parameters:
newCouponId
- the coupon IDs of the coupons to be
deleted.
setNumCoupons
public void setNumCoupons(int newNumCoupons)
- Sets the number of coupons.
-
- Parameters:
newNumCoupons
- int
validateParameters
public void validateParameters()
throws ECException
- It extracts the parameters from the request and command context and checks
for their correctness.
-
- Specified by:
-
validateParameters
in interface
ECCommand
- Overrides:
-
validateParameters
in class
AbstractECTargetableCommand
-
- Throws:
-
ECException