public class FinalizePaymentCmdImpl extends AEDPStoreTaskCmdImpl implements FinalizePaymentCmd
FinalizePaymentCmd
task command.
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.
|
defaultCommandClassName, NAME
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.
|
getCurrency, getOrderAmount, getPaymentInstructions, setCurrency, setOrderAmount, setPaymentInstructions
getErrorMessageMap, getStoreId, insertActionListToActionDetailHash, insertActionListToEditActionDetailHash, isBgJobInWorking, isProcessBGExecutableInFG, setBgJobStatusInDb, setErrorMessageMap, setStoreId, toString
getEdpException, getEDPOrderId, getEDPResults, getLanguageId, getLocale, getOrderChannel, getOrderId, getStatus, isIdempotent, isProcessBGTasksRequired, resetServices, setBGProcessFinished, setEdpException, setEDPOrderId, setEDPResults, setOrderChannel, setOrderId, setProcessBGTasksRequired, setStatus
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCurrency, getEDPResults, getLanguageId, getLocale, getOrderChannel, getOrderId, setEDPResults, setOrderId
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
public static final java.lang.String COPYRIGHT
public void setFinalizationAmount(java.math.BigDecimal paramFinalizationAmount)
setFinalizationAmount
in interface FinalizePaymentCmd
paramFinalizationAmount
- A BigDecimal that specifies the amount to be finalized.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.
OrderAccessBean
that corresponds to the Order to paid for.public boolean isReadyToCallExecute()
isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class AbstractECTargetableCommand
public void setReleaseId(java.lang.Long paramReleaseId)
setReleaseId
in interface FinalizePaymentCmd
paramReleaseId
- A Long that specifies the sets the ID of the release.public java.lang.Long getReleaseId()
public void executeFinalizePaymentTCs() throws ECException
ECException
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
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.
reset
in interface com.ibm.websphere.command.Command
reset
in class AEDPPaymentTaskCmdImpl
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
EDPException
ECException
public void validateInsideProcessFG() throws EDPException
validateInsideProcessFG
in class AEDPStoreTaskCmdImpl
EDPException
- This exception is thrown if some parameter is invalid.