public class TrackPaymentActionsCmdImpl extends TaskCommandImpl implements TrackPaymentActionsCmd
TrackPaymentActionsCmd
. This class:
If the parameter
out-of-box just provides implementations for some basic data's retrieval and restore logic e.g transactionCompensationAction
is configured as 'track', this command is called both during
transaction rolling back and rolled back. When transaction rolling back, the command retrieves relative payment data from database
for successful payment action and cache them in class variables. The successful payment action refers to the
payment action that has been successfully executed within the current transaction. The Payment data may include edpPayInst
,
edpAtmPay
, ppcPayInst
, ppcPayment
, ppcPayTran
, ppcExtData
,
edpRelease
, ppcCredit
, edpRefInst
.
When transaction rolled back, the command restores these cached data back to database.
edpPayInst
and does not provide overall implementation.
You can extend the methods
retrievePaymentData()
and restorePaymentData()
to give implementation according to your specific usage scenarios and requirements.
actionData
(
setActionData(ActionData actionData)
): This parameter is the original action data that has been successfully executed.
Modifier and Type | Field and Description |
---|---|
static java.lang.Short |
QUERY_ACTION
action type -- query action
|
static java.lang.Short |
RESTORE_ACTION
action type -- restore action
|
defaultCommandClassName, NAME
Constructor and Description |
---|
TrackPaymentActionsCmdImpl() |
Modifier and Type | Method and Description |
---|---|
ActionData |
getActionData()
This method gets the action data that has been successfully executed.
|
java.lang.Short |
getActionType()
This method gets the action type for this command which determines whether to retrieve or restore payment data for the payment action.
|
com.ibm.commerce.edp.model.AtomicPaymentData |
getEDPAtmPay()
This method gets
edpAtmPay data. |
com.ibm.commerce.edp.model.PaymentInstructionData |
getEDPPayInst()
This method gets
edpPayInst data. |
com.ibm.commerce.edp.refunds.RefundInstructionData |
getEDPRefInst()
This method gets
edpRefInst data. |
java.util.Collection |
getEDPReleases()
This method gets
edpRelease data. |
java.lang.Integer |
getPhase()
This method gets the phase when the payment action is executed.
|
com.ibm.commerce.payments.plugincontroller.beans.PPCCreditData |
getPPCCredit()
This method gets
ppcCredit data. |
java.util.Collection |
getPPCExtDataForPayInst()
This method gets
ppcExtData for ppcPayInst . |
java.util.Collection |
getPPCExtDataForPayTran()
This method gets
ppcExtData for ppcPayTran . |
com.ibm.commerce.payments.plugincontroller.beans.PPCPayInstData |
getPPCPayInst()
This method gets
ppcPayInst data. |
com.ibm.commerce.payments.plugincontroller.beans.PPCPaymentData |
getPPCPayment()
This method gets
ppcPayment data. |
com.ibm.commerce.payments.plugincontroller.beans.PPCPayTranData |
getPPCPayTran()
This method gets
ppcPayTran data. |
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 main logic of this command.
|
void |
reset()
This method resets the command fields.
|
void |
setActionData(ActionData localActionData)
This method sets the action data that has been successfully executed.
|
void |
setActionType(java.lang.Short localActionType)
This method sets the action type for this command which determines whether to retrieve or restore payment data for the payment action.
|
void |
setEDPAtmPay(com.ibm.commerce.edp.model.AtomicPaymentData localEdpAtmPay)
This method sets
edpAtmPay data. |
void |
setEDPPayInst(com.ibm.commerce.edp.model.PaymentInstructionData localEdpPayInst)
This method sets
edpPayInst data. |
void |
setEDPRefInst(com.ibm.commerce.edp.refunds.RefundInstructionData localEdpRefInst)
This method sets
edpRefInst data. |
void |
setEDPReleases(java.util.Collection localEdpReleases)
This method sets
edpRelease data. |
void |
setOrderId(java.lang.Long localOrderId)
This method sets
orderId data of the payment action. |
void |
setPhase(java.lang.Integer localPhase)
This method sets the phase when the payment action is executed.
|
void |
setPPCCredit(com.ibm.commerce.payments.plugincontroller.beans.PPCCreditData localPpcCredit)
This method sets
ppcCredit data. |
void |
setPPCExtDataForPayInst(java.util.Collection localPPCExtData)
This method sets
ppcExtData for ppcPayInst . |
void |
setPPCExtDataForPayTran(java.util.Collection localPPCExtData)
This method sets
ppcExtData for ppcPayTran . |
void |
setPPCPayInst(com.ibm.commerce.payments.plugincontroller.beans.PPCPayInstData localPpcPayInst)
This method sets
ppcPayInst data. |
void |
setPPCPayment(com.ibm.commerce.payments.plugincontroller.beans.PPCPaymentData localPpcPayment)
This method sets
ppcPayment data. |
void |
setPPCPayTran(com.ibm.commerce.payments.plugincontroller.beans.PPCPayTranData localPpcPayTran)
This method sets
ppcPayTran data. |
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, 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, toString, wait, wait, wait
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.Short QUERY_ACTION
public static final java.lang.Short RESTORE_ACTION
public java.util.Collection getEDPReleases()
edpRelease
data.getEDPReleases
in interface TrackPaymentActionsCmd
edpRelease
data.public void setEDPReleases(java.util.Collection localEdpReleases)
edpRelease
data.setEDPReleases
in interface TrackPaymentActionsCmd
localEdpReleases
- the edpRelease
data.public com.ibm.commerce.payments.plugincontroller.beans.PPCCreditData getPPCCredit()
ppcCredit
data.getPPCCredit
in interface TrackPaymentActionsCmd
ppcCredit
data.public void setPPCCredit(com.ibm.commerce.payments.plugincontroller.beans.PPCCreditData localPpcCredit)
ppcCredit
data.setPPCCredit
in interface TrackPaymentActionsCmd
localPpcCredit
- the ppcCredit
data.public com.ibm.commerce.edp.refunds.RefundInstructionData getEDPRefInst()
edpRefInst
data.getEDPRefInst
in interface TrackPaymentActionsCmd
edpRefInst
data.public void setEDPRefInst(com.ibm.commerce.edp.refunds.RefundInstructionData localEdpRefInst)
edpRefInst
data.setEDPRefInst
in interface TrackPaymentActionsCmd
localEdpRefInst
- the edpRefInst
data.public void setActionData(ActionData localActionData)
setActionData
in interface TrackPaymentActionsCmd
localActionData
- the action data that has been successfully executed.public java.lang.Short getActionType()
public void setActionType(java.lang.Short localActionType)
setActionType
in interface TrackPaymentActionsCmd
localActionType
- the action type to set to the command.public ActionData getActionData()
public void setOrderId(java.lang.Long localOrderId)
orderId
data of the payment action.setOrderId
in interface TrackPaymentActionsCmd
localOrderId
- the orderId
data of the payment action.public java.lang.Integer getPhase()
public void setPhase(java.lang.Integer localPhase)
localPhase
- The phase to set.public com.ibm.commerce.payments.plugincontroller.beans.PPCPayInstData getPPCPayInst()
ppcPayInst
data.getPPCPayInst
in interface TrackPaymentActionsCmd
ppcPayInst
data.public void setPPCPayInst(com.ibm.commerce.payments.plugincontroller.beans.PPCPayInstData localPpcPayInst)
ppcPayInst
data.setPPCPayInst
in interface TrackPaymentActionsCmd
localPpcPayInst
- the ppcPayInst
data.public com.ibm.commerce.payments.plugincontroller.beans.PPCPaymentData getPPCPayment()
ppcPayment
data.getPPCPayment
in interface TrackPaymentActionsCmd
ppcPayment
data.public void setPPCPayment(com.ibm.commerce.payments.plugincontroller.beans.PPCPaymentData localPpcPayment)
ppcPayment
data.setPPCPayment
in interface TrackPaymentActionsCmd
localPpcPayment
- the ppcPayment
data.public com.ibm.commerce.payments.plugincontroller.beans.PPCPayTranData getPPCPayTran()
ppcPayTran
data.getPPCPayTran
in interface TrackPaymentActionsCmd
ppcPayTran
data.public void setPPCPayTran(com.ibm.commerce.payments.plugincontroller.beans.PPCPayTranData localPpcPayTran)
ppcPayTran
data.setPPCPayTran
in interface TrackPaymentActionsCmd
localPpcPayTran
- the ppcPayTran
data.public com.ibm.commerce.edp.model.PaymentInstructionData getEDPPayInst()
edpPayInst
data.getEDPPayInst
in interface TrackPaymentActionsCmd
edpPayInst
data.public void setEDPPayInst(com.ibm.commerce.edp.model.PaymentInstructionData localEdpPayInst)
edpPayInst
data.setEDPPayInst
in interface TrackPaymentActionsCmd
localEdpPayInst
- the edpPayInst
data.public com.ibm.commerce.edp.model.AtomicPaymentData getEDPAtmPay()
edpAtmPay
data.getEDPAtmPay
in interface TrackPaymentActionsCmd
edpAtmPay
data.public void setEDPAtmPay(com.ibm.commerce.edp.model.AtomicPaymentData localEdpAtmPay)
edpAtmPay
data.setEDPAtmPay
in interface TrackPaymentActionsCmd
localEdpAtmPay
- the edpAtmPay
data.public java.util.Collection getPPCExtDataForPayInst()
ppcExtData
for ppcPayInst
.getPPCExtDataForPayInst
in interface TrackPaymentActionsCmd
ppcExtData
for ppcPayInst
.public void setPPCExtDataForPayInst(java.util.Collection localPPCExtData)
ppcExtData
for ppcPayInst
.setPPCExtDataForPayInst
in interface TrackPaymentActionsCmd
localPPCExtData
- the ppcExtData
for ppcPayInst
.public java.util.Collection getPPCExtDataForPayTran()
ppcExtData
for ppcPayTran
.getPPCExtDataForPayTran
in interface TrackPaymentActionsCmd
ppcExtData
for ppcPayTran
.public void setPPCExtDataForPayTran(java.util.Collection localPPCExtData)
ppcExtData
for ppcPayTran
.setPPCExtDataForPayTran
in interface TrackPaymentActionsCmd
localPPCExtData
- the ppcExtData
for ppcPayTran
.public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
- in case of any WebSphere Commerce related failurepublic 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 AbstractECTargetableCommand
public boolean isReadyToCallExecute()
isReadyToCallExecute
in interface com.ibm.websphere.command.Command
isReadyToCallExecute
in class AbstractECTargetableCommand