public class RefundWithDependentSupportPolicyCmdImpl
extends com.ibm.commerce.returns.commands.RefundByMethodPolicyCmdImpl
implements com.ibm.commerce.returns.commands.RefundByMethodPolicyCmd
RefundByMethodPolicyCmd
, which corresponds to the scenarios
where payment methods used in placing order can be choosed as the refund
method. The command supports both dependent credit
and independent credit, and it also supports multiple refund methods.
Behavior
This command is called by PrimeRefundCmd
to create refund
instruction and refund information in Payment Rules.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
RefundWithDependentSupportPolicyCmdImpl() |
Modifier and Type | Method and Description |
---|---|
void |
performExecute()
This method executes the main business logic of this command.
|
void |
reset()
This method resets the instance variable of this command.
|
getAmount, getCurrentStoreId, getLocale, getOrderChannel, getPaymentInstructionsInOrder, getPaymentPolicyId, getRefundInstructions, getRMAAB, setAmount, setPaymentPolicyId, setRefundInstructions, setRMAAB
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, 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
getRefundInstructions, setAmount, setPaymentPolicyId, setRMAAB
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties
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 RefundWithDependentSupportPolicyCmdImpl()
public void performExecute() throws ECException
This method firstly gets all payment instructions as an ArrayList from
the order this RMA corresponds to. And then traverses the ArrayList to
get the payment instructions used against the order. For each payment instruction,
this method checks whether it is dependent credit required, and composes a new
refund instruction with appropriate amount accordingly. Then the method sets
the necessary attributes to the new refund instructions, then sets it to the ArrayList.
Later PrimeRefundCmd
creates the Refund Instruction and refund information
of Payment Rules in database according to the Refund Instruction in this ArrayList.
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECException
- In case of any ECException
public void reset()
reset
in interface com.ibm.websphere.command.Command
reset
in class AbstractECTargetableCommand