com.ibm.commerce.payment.commands
Class PayCleanupPMCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.payment.commands.PayCleanupPMCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, PayCleanupCmd, Protectable
- public class PayCleanupPMCmdImpl
- extends ControllerCommandImpl
- implements PayCleanupCmd
This PayCleanupPMCmd
Controller Command implementation cancels WebSphere Commerce Orders
that have their payment authorization rejected by the financial institution and further action
have not been attempted for a configurable amount of time. The time in seconds after which
rejected orders are candidate for cancellation is specified in the REJECTEDORDEXPIRY column
of the Store Table.
This command is normally run as a store level scheduled command and takes the storeId as an
input parameter.
Method Summary |
AccessVector |
getResources()
Gets the resources accessed by this command. |
java.lang.Integer |
getStoreId()
Gets the store ID |
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()
Resets the instance variables 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 |
void |
validateParameters()
Checks that parameter storeId is specified. |
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 |
PayCleanupPMCmdImpl
public PayCleanupPMCmdImpl()
getResources
public AccessVector getResources()
throws ECException
- Gets 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
getStoreId
public java.lang.Integer getStoreId()
- Gets the store ID
- Specified by:
getStoreId
in interface ECCommand
- Overrides:
getStoreId
in class AbstractECTargetableCommand
- Returns:
- java.lang.Integer
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()
- Resets the instance variables of the command.
The reset() method will reset all instance variables.
If the command includes any output values that are accessible via
getters, then make sure those values are no longer needed before calling
this method to reset the instance variables of the command.
This is useful if the command instance is to be called multiple times with
different command parameters.
- 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.
It is the responsibility of the implementer of the ControllerCommand to extract the
required input parameters from the request properties and perform parameter checking.
- 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 storeId)
- Saves the store ID
- Parameters:
storeId
- java.lang.Integer
validateParameters
public void validateParameters()
throws ECException
- Checks that parameter storeId is specified.
- Specified by:
validateParameters
in interface ECCommand
- Overrides:
validateParameters
in class AbstractECTargetableCommand
- Throws:
ECException.
-