Class DoDepositCLCmdImpl

  • All Implemented Interfaces:
    BusinessPolicyCommand,, ECCommand, ECTargetableCommand, TaskCommand, DoDepositPolicyCmd,,,,,,


    public class DoDepositCLCmdImpl
    extends BusinessPolicyCommandImpl
    implements DoDepositPolicyCmd
    This DoDepositPolicy business policy command implementation class is the default implementation class for depositing payment previously authorized to use the CreditLine.


    Parameter Name Type Descriptions
    order OrderAccessBean The Order Access Bean
    depositAmount BigDecimal The amount of the deposit
    errorViewName String Optional error view name passed in by the Caller.


    • Checks if the CreditLine specified for the purchase is still active.
    • If it is, stores the depositAmount in the ORDPAYMTHD.ACTUALAMOUNT column.
    • If the CreditLine currency is different from the currency of the Order, converts the ORDPAYMTHD.ACTUALAMOUNT (for each of the ORDPAYMTHD entries if more than one) to the currency specified for the CreditLine and store the resulting amount and currency in the ChargeAmount and ChargeAmtCurr column of ORDPAYMTHD respectively. If no currency conversion is needed, store the ActualAmount and Order currency in the two columns. (Note: the currency of the CreditLine is the default currency of the default Language of the Store.)
    • Update the ORDPAYMTHD.CHARGETIME column (for each of the ORDPAYMTHD entries) with the current time.

    Default Error View Name:

    • DoDepositErrorView


    This command uses the following AccessBeans:

    This command does not call other TaskCommand.

    See Also:
    Serialized Form
    • Constructor Detail

      • DoDepositCLCmdImpl

        public DoDepositCLCmdImpl()
    • Method Detail

      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        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 interface
        isReadyToCallExecute in class AbstractECTargetableCommand
        true if we can execute the command; false otherwise.
      • reset

        public void reset()
        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 interface
        reset in class AbstractECTargetableCommand
      • setDepositAmount

        public void setDepositAmount(java.math.BigDecimal depositAmount)
        Sets the depositAmount property of the command.
        Specified by:
        setDepositAmount in interface DoDepositPolicyCmd
        depositAmount - the amount to be deposited.
      • setErrorViewName

        public void setErrorViewName(java.lang.String sEVN)
        Sets the error view to be used to report error. This overrides the default error view of the command.
        Specified by:
        setErrorViewName in interface DoDepositPolicyCmd
        sEVN - the Error View name
        See Also:
      • setOrder

        public void setOrder(OrderAccessBean ab)
        Sets the order property of the command.
        Specified by:
        setOrder in interface DoDepositPolicyCmd
        ab - the OrderAccessBean of the Order whose payment is to be deposited