com.ibm.commerce.returns.commands

Class CalculateReturnItemCreditCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, CalculateReturnItemCreditCmd, 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


    public class CalculateReturnItemCreditCmdImpl
    extends TaskCommandImpl
    implements CalculateReturnItemCreditCmd
    Default implementation of the CalculateReturnItemCreditCmd interface. Calculate the automatic credit for a return merchandise authorization (RMA) item associated with a complete order item.

    Behaviour

    • Call the task command CalculateReturnItemProductCreditCmd and set the CREDITAMOUNT field of the RMA item to its result.
    • Call the task command CalculateReturnItemAdjustmentCreditCmd and set the ADJUSTMENTCREDIT field of the RMA item to its result.
    • Call the business policy command CalculateReturnItemAdjustmentPolicyCmd to calculate the charges.

    Utilizes these access beans

    See Also:
    Serialized Form
    • Constructor Detail

      • CalculateReturnItemCreditCmdImpl

        public CalculateReturnItemCreditCmdImpl()
        CalculateReturnItemCreditCmdImpl constructor.
    • Method Detail

      • reset

        public void reset()
        Reset the command.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • 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.
      • validateParameters

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

        Parameters

        • StoreAccessBean
          • StoreAccessBean passed in the command context
        • OrderItemAB
          • OrderitemAccesBean of the Order item
        • RMAItemAB
          • RMAItemAccessBean of the RMA item
        • RMAAB
          • RMAAccessBean of the RMA
        • Quantity
          • quantity of items to return

        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