com.ibm.commerce.payment.commands
Class BalancePaymentCmdImpl

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

public class BalancePaymentCmdImpl
extends ControllerCommandImpl
implements BalancePaymentCmd

This BalancePaymentPMCmdImpl Controller Command implementation looks for Orders that have been shipped or fulfilled (Order Status 'S') and calls the DoDeposit Task command to have the payment deposited to the merchants financial account.

This command is normally run as a store level scheduled command and takes a store ID as input parameter for the command.

This command uses the following AccessBeans:

This command calls the following TaskCommands:

See Also:
Serialized Form

Field Summary
 
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.payment.commands. BalancePaymentCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand
COPYRIGHT
 
Constructor Summary
BalancePaymentCmdImpl()
           
 
Method Summary
  AccessVector getResources()
          Returns the resources accessed by this command.
 java.lang.Integer getStoreId()
          Gets the Store ID set as input parameter for the Command.
 boolean isReadyToCallExecute()
          This method is called by the Command Framework to check if all basic mandatory parameters have been set for this command.
 void performExecute()
          Performs the main business logic of the command.
 void setRequestProperties( TypedProperty reqProperties)
          The WebController calls the setRequestProperties method before invoking the execute method in this command.
protected  void setStoreId(java.lang.Integer storeId)
          Saves the Store ID for the command.
 void validateParameters()
          Checks that parameter storeId is specified.
 
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, 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, 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. ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.command. ControllerCommand
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command. AccCommand
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
 

Constructor Detail

BalancePaymentCmdImpl

public BalancePaymentCmdImpl()
Method Detail

getResources

public AccessVector getResources()
                          throws ECException
Returns the resources accessed by this command.

For this command, the resource accessed is the Store.

Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
AccessVector - a vector of resource action pairs
Throws:
ECException

getStoreId

public java.lang.Integer getStoreId()
Gets the Store ID set as input parameter for the Command.
Specified by:
getStoreId in interface ECCommand
Overrides:
getStoreId in class AbstractECTargetableCommand
Returns:
the Store ID

performExecute

public void performExecute()
                    throws ECException
Performs the main business logic of the command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException

setRequestProperties

public void setRequestProperties(TypedProperty reqProperties)
                          throws ECException
The WebController calls the setRequestProperties method before invoking the execute method in this command. It is the responsibility of the implementer of the ControllerCommand to extract the required input parameters from the request properties and perform parameter checking.

This method extracts the storeId parameters from the request properties.

Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
reqProperties - the TypedProperty object containing the request properties of the command
Throws:
ECException.
ECException

setStoreId

protected void setStoreId(java.lang.Integer storeId)
Saves the Store ID for the command.
Parameters:
storeId - the Store ID.

validateParameters

public void validateParameters()
                        throws ECException
Checks that parameter storeId is specified.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECApplicationException - If the storeId parameter is not specified.
ECException

isReadyToCallExecute

public boolean isReadyToCallExecute()
This method is called by the Command Framework to check if all basic mandatory parameters have been set for this command. This is done before the Framework calls the performExecute method of the command.
Overrides:
isReadyToCallExecute in class AbstractECTargetableCommand
Returns:
true if we can execute the command; false otherwise.