com.ibm.commerce.returns.commands
Class CalculateReturnItemCreditCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.returns.commands.CalculateReturnItemCreditCmdImpl
All Implemented Interfaces:
CalculateReturnItemCreditCmd, ECCommand, ECTargetableCommand, TaskCommand

public class CalculateReturnItemCreditCmdImpl
extends TaskCommandImpl
implements CalculateReturnItemCreditCmd

Default implementation of the CalculateReturnItemCreditCmd interface. Calculate the automatic credit for a return mechandise authorization (RMA) item associated with a complete order item.

Behaviour

Utilizes these access beans

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.returns.commands. CalculateReturnItemCreditCmd
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
CalculateReturnItemCreditCmdImpl()
          CalculateReturnItemCreditCmdImpl constructor.
 
Method Summary
protected   OrderItemAccessBean getOrderItemAB()
          Get the order item access bean..
protected  java.lang.Double getQuantity()
          Get the quantity.
protected   RMAAccessBean getRMAAB()
          Get the RMA access bean..
protected   RMAItemAccessBean getRMAItemAB()
          Get the RMA item access bean.
 void performExecute()
          Execute the command.
 void reset()
          Reset the command.
 void setOrderItemAB( OrderItemAccessBean anOrderItemAB)
          Set the orderItem being returned/refunded.
 void setQuantity(java.lang.Double aQuantity)
          Set the quantity to be credited.
 void setRMAAB( RMAAccessBean anRMAAB)
          Set the RMA for which the refund is being requested.
 void setRMAItemAB( RMAItemAccessBean newRMAItemAB)
          Set the RMA Item access bean which will have its amounts updated.
 void validateParameters()
          Check mandatory parameters.
 
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
 

Constructor Detail

CalculateReturnItemCreditCmdImpl

public CalculateReturnItemCreditCmdImpl()
CalculateReturnItemCreditCmdImpl constructor.
Method Detail

getOrderItemAB

protected OrderItemAccessBean getOrderItemAB()
Get the order item access bean..
Returns:
The order item access bean.

getQuantity

protected java.lang.Double getQuantity()
Get the quantity.
Returns:
The quantity being returned.

getRMAAB

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

getRMAItemAB

protected RMAItemAccessBean getRMAItemAB()
Get the RMA item access bean.
Returns:
The RMA item access bean.

performExecute

public void performExecute()
                    throws ECException
Execute the command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
ECException

reset

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

setOrderItemAB

public void setOrderItemAB(OrderItemAccessBean anOrderItemAB)
Set the orderItem being returned/refunded.
Specified by:
setOrderItemAB in interface CalculateReturnItemCreditCmd
Parameters:
anOrderItemAB - The orderItem access bean.

setQuantity

public void setQuantity(java.lang.Double aQuantity)
Set the quantity to be credited.
Specified by:
setQuantity in interface CalculateReturnItemCreditCmd
Parameters:
aQuantity - The quantity to be credited.

setRMAAB

public void setRMAAB(RMAAccessBean anRMAAB)
Set the RMA for which the refund is being requested.
Specified by:
setRMAAB in interface CalculateReturnItemCreditCmd
Parameters:
anRMAAB - The RMA access bean.

setRMAItemAB

public void setRMAItemAB(RMAItemAccessBean newRMAItemAB)
Set the RMA Item access bean which will have its amounts updated.
Specified by:
setRMAItemAB in interface CalculateReturnItemCreditCmd
Parameters:
newRMAItemAB - The RMA item access bean.

validateParameters

public void validateParameters()
                        throws ECException
Check mandatory parameters. Checks the following parameters:

Parameters

Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECApplicationException - If there is no StoreAccessBean or there is no RMAItemAccessBean or there is no OrderItemAccessBean or there is no RMAccessBean or a quantity has not be specified , throws com.ibm.commerce.exception.ECApplicationException with ECMessage._ERR_BAD_MISSING_CMD_PARAMETER
ECException