public class ReservePaymentCmdImpl extends AEDPStoreTaskCmdImpl implements ReservePaymentCmd
commandContext | The command context. |
orderId | A Long that indicates the id of the current order. |
reservationAmount | A BigDecimal that indicates the total reservation amount. |
releases | A HashMap that represents the list of the current releases and release amounts. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
The IBM Copyright notice field.
|
Constructor and Description |
---|
ReservePaymentCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected com.ibm.commerce.edp.activitylog.ActivityLoggerLocal | getActivityLoggerFacade()
This method gets the local interface of activity logger, which will store the history of payment/refund actions in database.
|
java.util.Collection | getReleaseIds()
Obtains the list of release ids to be reserved.
|
java.util.HashMap | getReleases()
This method gets the list of releases to be processed in this request.
|
java.math.BigDecimal | getReservationAmount()
This method gets the total amount to be reserved.
|
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()
This method executes the business logic of the command.
|
void | processFG()
This method executes the foreground tasks.
|
void | reset()
Resets the command fields.
|
void | setReleases(java.util.HashMap paramReleases)
This method sets the releases to be reserved.
|
void | setReservationAmount(java.math.BigDecimal paramReservationAmount)
This method sets the total order amount.
|
void | validateInsideProcessFG()
This method validates all parameters for this reverse payment business event.
|
public static final java.lang.String COPYRIGHT
public boolean isReadyToCallExecute()
public void setReleases(java.util.HashMap paramReleases)
public java.util.HashMap getReleases()
public void setReservationAmount(java.math.BigDecimal paramReservationAmount)
public java.math.BigDecimal getReservationAmount()
public void performExecute() throws ECException
It firstly checks the backend job status. If the status is working ,sets the priority of event as HIGH then the ECEvent will process the event immediately. After this, if the BG status is still on working ,throw ECApplicationException.
public void reset()
Resets the command fields.
After this method is invoked, and proper attributes are set, the command can be executed again.
public java.util.Collection getReleaseIds()
public void processFG() throws EDPException, ECException
This method executes the foreground tasks.
1. It checks if any unresolved failures in background.
2. It updates atomic payments with freshly acquired data from backend.
3. It calculates the amount to process in current phase, and decides what payment actions should be executed from the payment rule configurations.
public void validateInsideProcessFG() throws EDPException
protected com.ibm.commerce.edp.activitylog.ActivityLoggerLocal getActivityLoggerFacade() throws J2EEException