com.ibm.commerce.payment.commands
Class DoRefundCLCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- com.ibm.commerce.command.AbstractECTargetableCommand
-
- com.ibm.commerce.command.TaskCommandImpl
-
- com.ibm.commerce.command.BusinessPolicyCommandImpl
-
- com.ibm.commerce.payment.commands.DoRefundCLCmdImpl
-
- All Implemented Interfaces:
- BusinessPolicyCommand, com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, DoRefundPolicyCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
Deprecated.Replaced byDoPaymentActionsPolicyCmdImpl
public class DoRefundCLCmdImpl extends BusinessPolicyCommandImpl implements DoRefundPolicyCmd
ThisDoRefundPolicy
business policy command implementation class is the default implementation class for refunding payment for CreditLine.
(The original payment method of the Order may be different)Parameters:
Parameter Name Type Descriptions abRMA RMAAccessBean The RMAAccessBean for the Return Merchandise Authorization (RMA) record abOrder OrderAccessBean The OrderAccessBean of the order associated with the RMA bdRefundAmount BigDecimal The amount of the refund in the currency of the Order. errorViewName String Optional error view name passed in by the Caller. Behavior:
- Make sure the Credit Line of the Account is still active.
- If the CreditLine of the Account is still active, creates a record in the ORDPAYMTHD Table to represent this refund using the RMA_ID as the REFUNDNUMBER and "LOC" and "0" as the PAYMETHOD and PAYDEVICE respectively. The RMA_ID is also stored in the ORDPAYMTHD.RMA_ID column as a foreign key to the RMA Table. Note that the ORDPAYMTHD.ActualAmount (in the currency of the Order) and the ORDPAYMTHD.CHARGEAMOUNT (in the default currency of the Store) for a Refund entry are negative decimal amounts. (If the Currency of the Order is the same as the default currency of the Store, then ActualAmount and ChargeAmount are the same. Otherwise, a conversion from the currency of the order to the default currency of the Store is required.)
- Stores the creditLineId, policyId, TradingId and AccountId in the new record and sets the CHARGETIME column to the current time..
Default Error View Name:
- DoRefundErrorView
ErrorCodes:
PaymentConstants.ERR_CODE_CURRENCY_CONVERT_FAIL
(1961) - Currency conversion not available or failed.PaymentConstants.ERR_CODE_CREDIT_LINE_NOT_AVAILABLE
(1981) - Credit Line not available or no longer active.
This command uses the following AccessBeans:
AccountAccessBean
CreditLineAccessBean
OrderAccessBean
OrderPaymentMethodAccessBean
RMAAccessBean
StoreAccessBean
TradingAgreementAccessBean
This command does not call other TaskCommand.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.ibm.commerce.payment.commands.DoRefundPolicyCmd
defaultCommandClassName, ERRTASK_NAME, NAME
-
-
Constructor Summary
Constructors Constructor and Description DoRefundCLCmdImpl()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description boolean
isReadyToCallExecute()
Deprecated.This method is called by the Command Framework to check if all basic mandatory parameters have been set for this command.void
performExecute()
Deprecated.Performs the main business logic of the command.void
reset()
Deprecated.Resets the instance variables of the command.void
setErrorViewName(java.lang.String sEVN)
Deprecated.Sets the error view to be used to report error.void
setOrder(OrderAccessBean ab)
Deprecated.Sets the order property of the command.void
setRefundAmount(java.math.BigDecimal refundAmount)
Deprecated.Sets the refundAmount property of the command.void
setRMA(RMAAccessBean ab)
Deprecated.Sets the RMA AccessBean representing the Return Merchandise Authorization record that authorizes the return of the merchandise..-
Methods inherited from class com.ibm.commerce.command.BusinessPolicyCommandImpl
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties
-
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
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
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.commerce.command.BusinessPolicyCommand
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties
-
Methods inherited from interface com.ibm.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
-
-
-
-
Method Detail
-
isReadyToCallExecute
public boolean isReadyToCallExecute()
Deprecated.This method is called by the Command Framework to check if all basic mandatory parameters have been set for this command. This is done before the Framework calls the performExecute method of the command.- Specified by:
isReadyToCallExecute
in interfacecom.ibm.websphere.command.Command
- Overrides:
isReadyToCallExecute
in classAbstractECTargetableCommand
- Returns:
- true if we can execute the command; false otherwise.
-
performExecute
public void performExecute() throws ECException
Deprecated.Performs the main business logic of the command.- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- Throws:
ECException
-
reset
public void reset()
Deprecated.Resets the instance variables of the command. The reset() method will reset all instance variables. If the command includes any output values that are accessible via getters, then make sure those values are no longer needed before calling this method to reset the instance variables of the command.This is useful if the command instance is to be called multiple times with different command parameters.
- Specified by:
reset
in interfacecom.ibm.websphere.command.Command
- Overrides:
reset
in classAbstractECTargetableCommand
-
setErrorViewName
public void setErrorViewName(java.lang.String sEVN)
Deprecated.Sets the error view to be used to report error. This overrides the default error view of the command.- Specified by:
setErrorViewName
in interfaceDoRefundPolicyCmd
- Parameters:
sEVN
- the Error View name- See Also:
DoRefundPolicyCmd.ERRTASK_NAME
-
setOrder
public void setOrder(OrderAccessBean ab)
Deprecated.Sets the order property of the command.- Specified by:
setOrder
in interfaceDoRefundPolicyCmd
- Parameters:
ab
- the OrderAccessBean representing the Order associated with the Return Merchandise Authorization.
-
setRefundAmount
public void setRefundAmount(java.math.BigDecimal refundAmount)
Deprecated.Sets the refundAmount property of the command.- Specified by:
setRefundAmount
in interfaceDoRefundPolicyCmd
- Parameters:
refundAmount
- the amount to be refunded.
-
setRMA
public void setRMA(RMAAccessBean ab)
Deprecated.Sets the RMA AccessBean representing the Return Merchandise Authorization record that authorizes the return of the merchandise..- Specified by:
setRMA
in interfaceDoRefundPolicyCmd
- Parameters:
ab
- the RMAAccessBean
-
-