com.ibm.commerce.couponwallet.commands
Class PersistCouponForLaterUseCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.couponwallet.commands.PersistCouponForLaterUseCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, PersistCouponForLaterUseCmd

public class PersistCouponForLaterUseCmdImpl
extends ControllerCommandImpl
implements PersistCouponForLaterUseCmd

For each cpwalletId in the input parameter, the STATE of the eCoupon is updated in CouponWalletAccessBean to SAVED. ViewNames SearchWalletView : After saving the coupons successfully if no URL was specified.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.couponwallet.commands. PersistCouponForLaterUseCmd
defaultCommandClassName
 
Constructor Summary
PersistCouponForLaterUseCmdImpl()
          PersistCouponForLaterUseCmdImpl constructor call super.
 
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 SAVED.
 void setCouponId(java.lang.Long[] newCouponId)
          Sets the coupon IDs to be saved.
 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. AccCommand
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command. ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
See Also:
Constant Field Values
Constructor Detail

PersistCouponForLaterUseCmdImpl

public PersistCouponForLaterUseCmdImpl()
PersistCouponForLaterUseCmdImpl constructor call super.
Method Detail

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

performExecute

public void performExecute()
                    throws ECException
For each cpwalletId in the input parameter, the STATE of the eCoupon is updated in CouponWalletAccessBean to SAVED.
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 saved.
Parameters:
newCouponId - the coupon IDs of the coupons to be saved.

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