com.ibm.commerce.returns.commands
Class RefundPaymentPolicyCmdImpl

java.lang.Object
  |
  +--com.ibm.commerce.command.AbstractECCommand
        |
        +--com.ibm.commerce.command.TaskCommandImpl
              |
              +--com.ibm.commerce.command.BusinessPolicyCommandImpl
                    |
                    +--com.ibm.commerce.returns.commands.RefundPaymentPolicyCmdImpl
All Implemented Interfaces:
BusinessPolicyCommand, ECCommand, RefundPaymentPolicyCmd, TaskCommand
Direct Known Subclasses:
RefundByCreditPolicyCmdImpl, RefundByOriginalPaymentPolicyCmdImpl

public abstract class RefundPaymentPolicyCmdImpl
extends BusinessPolicyCommandImpl
implements RefundPaymentPolicyCmd

Abstract base class that is the framework for implementing a refund payment policy. This implementation calls doWork().


Fields inherited from class com.ibm.commerce.command.BusinessPolicyCommandImpl
policyId, requestProperties
 
Fields inherited from class com.ibm.commerce.command.AbstractECCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.returns.commands.RefundPaymentPolicyCmd
COPYRIGHT, defaultCommandClassName, NAME
 
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.AbstractECCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, 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
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 

Constructor Detail

RefundPaymentPolicyCmdImpl

public RefundPaymentPolicyCmdImpl()
RefundPaymentPolicyCmdImpl constructor.
Method Detail

callDoRefundPolicy

protected void callDoRefundPolicy(java.lang.Long aPaymentPolicyId)
                           throws ECException
Call the DoRefundPolicyCmd policy command for the payment policy id.
Parameters:
aPaymentPolicyId - The payment policy identifier.

doWork

protected abstract void doWork()
                        throws ECException
Do the real work.

getErrorViewName

protected java.lang.String getErrorViewName()
Get the error view name.
Returns:
The error view name.

getOrder

protected OrderAccessBean getOrder()
Get the order access bean.
Returns:
The order access bean.

getPaymentPolicyId

protected java.lang.Long getPaymentPolicyId()
Get the payment policy id.
Returns:
The payment policy identifier.

getRefundAmount

protected java.math.BigDecimal getRefundAmount()
Get the refund amount.
Returns:
The refund amount.

getRMA

protected RMAAccessBean getRMA()
Get the RMA access bean.
Returns:
The RMA access bean.

performExecute

public void performExecute()
                    throws ECException
Execute the command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
com.ibm.commerce.command.CommandException - The superclass for all ECExceptions.

reset

public void reset()
Reset the command.
Overrides:
reset in class AbstractECCommand

setErrorViewName

public void setErrorViewName(java.lang.String sEVN)
Description copied from interface: RefundPaymentPolicyCmd
(Optional) error view name passed in by the caller. This is passed to the doRefundPolicyCmd policy command.
Specified by:
setErrorViewName in interface RefundPaymentPolicyCmd
Following copied from interface: com.ibm.commerce.returns.commands.RefundPaymentPolicyCmd
Parameters:
sEVN - The error view name.

setOrder

public void setOrder(OrderAccessBean ab)
Description copied from interface: RefundPaymentPolicyCmd
The order to be refunded.
Specified by:
setOrder in interface RefundPaymentPolicyCmd
Following copied from interface: com.ibm.commerce.returns.commands.RefundPaymentPolicyCmd
Parameters:
ab - The order access bean.

setPaymentPolicyId

public void setPaymentPolicyId(java.lang.Long aPolicyId)
Description copied from interface: RefundPaymentPolicyCmd
The id of the policy used to pay for the order originally.
Specified by:
setPaymentPolicyId in interface RefundPaymentPolicyCmd
Following copied from interface: com.ibm.commerce.returns.commands.RefundPaymentPolicyCmd
Parameters:
aPolicyId - The payment policy Id.

setRefundAmount

public void setRefundAmount(java.math.BigDecimal refundAmount)
Description copied from interface: RefundPaymentPolicyCmd
The amount to refund.
Specified by:
setRefundAmount in interface RefundPaymentPolicyCmd
Following copied from interface: com.ibm.commerce.returns.commands.RefundPaymentPolicyCmd
Parameters:
refundAmount - The amount to refund.

setRMA

public void setRMA(RMAAccessBean anRMA)
Description copied from interface: RefundPaymentPolicyCmd
The RMA to refund to.
Specified by:
setRMA in interface RefundPaymentPolicyCmd
Following copied from interface: com.ibm.commerce.returns.commands.RefundPaymentPolicyCmd
Parameters:
anRMA - The RMA access bean.

validateParameters

public void validateParameters()
                        throws ECException
Check mandatory parameters.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
ECException. -