java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.command.BusinessPolicyCommandImpl | +--com.ibm.commerce.returns.commands.RefundPaymentPolicyCmdImpl
Abstract base class that is the framework for implementing a refund payment policy. This implementation calls doWork(). This class invokes the Task command DoRefundPolicy
Utilizes these access beans
Field Summary |
---|
Fields inherited from class com.ibm.commerce.command. BusinessPolicyCommandImpl |
policyId,
requestProperties |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.returns.commands. RefundPaymentPolicyCmd |
COPYRIGHT,
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand |
COPYRIGHT |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
RefundPaymentPolicyCmdImpl() RefundPaymentPolicyCmdImpl constructor. |
Method Summary | |
---|---|
protected
void |
callDoRefundPolicy(java.lang.Long aPaymentPolicyId) Call the DoRefundPolicyCmd policy command for the payment policy id. |
protected
abstract void |
doWork() Do the real work. |
protected
java.lang.String |
getErrorViewName() Get the error view name. |
protected
OrderAccessBean |
getOrder() Get the order access bean. |
protected
java.lang.Long |
getPaymentPolicyId() Get the payment policy id. |
protected
java.math.BigDecimal |
getRefundAmount() Get the refund amount. |
protected
RMAAccessBean |
getRMA() Get the RMA access bean. |
void |
performExecute() Execute the command. |
void |
reset() Reset the command. |
void |
setErrorViewName(java.lang.String sEVN) (Optional) error view name passed in by the caller. |
void |
setOrder(
OrderAccessBean ab) The order to be refunded. |
void |
setPaymentPolicyId(java.lang.Long aPolicyId) The id of the policy used to pay for the order originally. |
void |
setRefundAmount(java.math.BigDecimal refundAmount) The amount to refund. |
void |
setRMA(
RMAAccessBean anRMA) The RMA to refund to. |
void |
validateParameters() Check mandatory parameters. |
Methods inherited from class com.ibm.commerce.command. BusinessPolicyCommandImpl |
getPolicyId,
getRequestProperties,
setPolicyId,
setRequestProperties |
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
accessControlCheck,
checkIsAllowed,
checkParameters,
checkResourcePermission,
createCommandExecutionEvent,
execute,
finalize,
getAccCheck,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getResources,
getStoreId,
getUser,
getUserId,
isReadyToCallExecute,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Methods inherited from interface com.ibm.commerce.command. BusinessPolicyCommand |
getPolicyId,
getRequestProperties,
setPolicyId,
setRequestProperties |
Constructor Detail |
---|
public RefundPaymentPolicyCmdImpl()
Method Detail |
---|
protected void callDoRefundPolicy(java.lang.Long aPaymentPolicyId) throws ECException
aPaymentPolicyId
- The payment policy identifier.ECException
protected abstract void doWork() throws ECException
ECException
protected java.lang.String getErrorViewName()
protected OrderAccessBean getOrder()
protected java.lang.Long getPaymentPolicyId()
protected java.math.BigDecimal getRefundAmount()
protected RMAAccessBean getRMA()
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
public void reset()
reset
in class
AbstractECTargetableCommand
public void setErrorViewName(java.lang.String sEVN)
RefundPaymentPolicyCmd
setErrorViewName
in interface
RefundPaymentPolicyCmd
sEVN
- The error view name.public void setOrder(OrderAccessBean ab)
RefundPaymentPolicyCmd
setOrder
in interface
RefundPaymentPolicyCmd
ab
- The order access bean.public void setPaymentPolicyId(java.lang.Long aPolicyId)
RefundPaymentPolicyCmd
setPaymentPolicyId
in interface
RefundPaymentPolicyCmd
aPolicyId
- The payment policy Id.public void setRefundAmount(java.math.BigDecimal refundAmount)
RefundPaymentPolicyCmd
setRefundAmount
in interface
RefundPaymentPolicyCmd
refundAmount
- The amount to refund.public void setRMA(RMAAccessBean anRMA)
RefundPaymentPolicyCmd
setRMA
in interface
RefundPaymentPolicyCmd
anRMA
- The RMA access bean.public void validateParameters() throws ECException
Parameters
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECApplicationException
- If there is no RMAAccessBean or there is no
OrderAccessBean or there is no Payment Policy Id or there is no amount to be
refunded specified, throws com.ibm.commerce.exception.ECApplicationException
with ECMessage._ERR_BAD_MISSING_CMD_PARAMETERECException