com.ibm.commerce.payment.commands
Class PaymentSummaryGenerateCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.payment.commands.PaymentSummaryGenerateCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, PaymentSummaryGenerateCmd, Protectable

public class PaymentSummaryGenerateCmdImpl
extends ControllerCommandImpl
implements PaymentSummaryGenerateCmd

This PaymentSummaryGenerateCmdImpl Controller Command implementation generates payment summary records for a Store by account by payment policy for charged amounts captured since this command last ran. This command is normally run as a Store level scheduled command and takes the storeId as parameter.


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.PaymentSummaryGenerateCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command.ECTargetableCommand
COPYRIGHT
 
Constructor Summary
PaymentSummaryGenerateCmdImpl()
           
 
Method Summary
 AccessVector getResources()
          Gets the resources accessed by this command.
 java.lang.Integer getStoreId()
          Get the Store reference number 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 reset()
          This method may be called after a command has been executed to reset its states variables.
 void setRequestProperties(TypedProperty reqProperties)
          The WebController calls the setRequestProperties method before invoking the execute method in this command.
protected  void setStoreId(java.lang.Integer anStoreId)
          Sets the store ID for the command.
 void validateParameters()
          Checks that the specified storeId is a valid storeId.
 
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
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, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Constructor Detail

PaymentSummaryGenerateCmdImpl

public PaymentSummaryGenerateCmdImpl()
Method Detail

getResources

public AccessVector getResources()
                          throws ECException
Gets the resources accessed by this command. For this command, the resources accessed are the Store and the Accounts for which payment summary records are to be generated.

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

getStoreId

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

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:
boolean - true if we can execute the command false if we canot execute the command

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
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
com.ibm.commerce.command.CommandException - The superclass for all ECExceptions.

reset

public void reset()
This method may be called after a command has been executed to reset its states variables. After the call to reset, we should be able to execute the command again.
Overrides:
reset in class AbstractECTargetableCommand

setRequestProperties

public void setRequestProperties(TypedProperty reqProperties)
                          throws ECException
The WebController calls the setRequestProperties method before invoking the execute method in this command. This method extracts the storeId parameters from the request properties.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
requestProperties - com.ibm.commerce.datatype.TypedProperty
Throws:
com.ibm.commerce.exception.ECApplicationException. -  

setStoreId

protected void setStoreId(java.lang.Integer anStoreId)
Sets the store ID for the command.
Parameters:
aStoreId - the store ID.

validateParameters

public void validateParameters()
                        throws ECException
Checks that the specified storeId is a valid storeId.

Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException. -