public class FinalizePaymentCmdImpl extends AEDPStoreTaskCmdImpl implements FinalizePaymentCmd
orderId | A Long that specifies the order ID. |
releaseId | A Long that specifies the release id. |
finalizationAmount | A BigDecimal that specifies the amount to be finalized. |
commandContext | The command context. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
The IBM Copyright notice field.
|
Constructor and Description |
---|
FinalizePaymentCmdImpl() |
Modifier and Type | Method and Description |
---|---|
void | executeFinalizePaymentTCs()
This method executes the paymentTCs required to call finalizepayment of Payment Rules.
|
java.math.BigDecimal | getFinalizationAmount()
This method returns the amount to be finalized as a BigDecimal Object.
|
OrderAccessBean | getOrderAccessBean()
This method returns a reference to the order access bean.
|
java.lang.Long | getReleaseId()
This method returns the current release 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()
This method executes the business logic of this command implementation.
|
void | processFG()
This method executes the foreground tasks.
|
void | reset()
This method resets the command fields.
|
void | setFinalizationAmount(java.math.BigDecimal paramFinalizationAmount)
This method sets the amount to be finalized.
|
void | setReleaseId(java.lang.Long paramReleaseId)
This method sets the ID of the release for which the amount is being finalized.
|
void | validateInsideProcessFG()
This method validates all parameters for this finalize payment operation.
|
public static final java.lang.String COPYRIGHT
public void setFinalizationAmount(java.math.BigDecimal paramFinalizationAmount)
public java.math.BigDecimal getFinalizationAmount()
public OrderAccessBean getOrderAccessBean()
This method returns a reference to the order access bean.
This method will first check if there is a local reference to the order access bean. If not present, it will create a new one.
public boolean isReadyToCallExecute()
public void setReleaseId(java.lang.Long paramReleaseId)
public java.lang.Long getReleaseId()
public void executeFinalizePaymentTCs() throws ECException
public void performExecute() throws ECException
public void reset()
This method resets the command fields.
After this method is invoked, and proper attributes are set, the command can be executed again.
public void processFG() throws EDPException, ECException
This method executes the foreground tasks.
It firstly checks the backend status of edp order, and if it is failed, then directly returns.
Then it updates the atomic payments with freshly acquired data from the backend. If any pending backend transaction exists, return.
It calculates the amount still to finalize for current release, and read payment rules configuration to decide what payment actions to execute.
If anything prevents payment rules from processing finalize payment event successfully in foreground. Tickler will be created because this is the last time payment rules get called in order life cycle
public void validateInsideProcessFG() throws EDPException