com.ibm.commerce.edp.commands

Class PrimePaymentVoidCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, AEDPPaymentTaskCmd, AEDPStoreTaskCmd, AEDPTaskCmd, PrimePaymentCmd, 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 PrimePaymentVoidCmdImpl
    extends AEDPStoreTaskCmdImpl
    implements PrimePaymentCmd
    This is the void implementation of the PrimePaymentCmd task command.

    Behaviour:

    • This PrimePaymentCmd implementation class will set the order and all order items to status OrderConstants.ORDER_COMPLETED. If unsuccessful, the command throws the ECSystemException
    • The void implementation of commands is used when anyone is intended to disable the command while keeping the single code base. Note that please use the void implementation of all commands once you decide to disable the command implementation.

    Input parameters:

    None.

    Output parameters:

    None.

    Task commands called:

    None.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The IBM Copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PrimePaymentVoidCmdImpl

        public PrimePaymentVoidCmdImpl()
    • Method Detail

      • getAccount

        public AccountAccessBean getAccount()

        This method returns the AccountAccessBean representing the account if an account ID is present.

        If no account ID is set, null is returned.

        This method will first check if the local variable iabAccount is set. If not, it will attempt to retrieve the AccountAccessBean using the specified account ID.

        Returns:
        The reference to the account access bean(AccountAccessBean) if account ID is present; null otherwise .
      • setAccountId

        public void setAccountId(java.lang.Long n)
        This method sets the account ID. This is the common account ID if one is specified by the trading agreements used by the order items of the order being processed. If there is no common account ID, this method should not be called.
        Parameters:
        n - A Long that specifies the account ID.
      • getAccountId

        public java.lang.Long getAccountId()
        This method returns the common account ID if one is specified by the trading agreements used by the order items of the order being processed. If there is no account associated with any of the trading agreements, null is returned.
        Returns:
        A Long that specifies the account ID.
      • setBuyerPOId

        public void setBuyerPOId(java.lang.Long n)
        This method sets the BuyerPO ID. This is the internal ID of the BuyerPO record associated with the purchase order number specified by the buyer. If no purchase order number is specified, this method should not be called.
        Parameters:
        n - A Long that specifies the BuyerPO ID.
      • getBuyerPOId

        public java.lang.Long getBuyerPOId()
        This method returns the internal ID of the BuyerPO record if a buyer purchase order number is specified. Otherwise returns a null.
        Returns:
        A Long that specifies the internal ID of the BuyerPO record or null.
      • setEDPWarning

        public void setEDPWarning(java.lang.String warning)
        This method sets the payment rule warning information.
        Parameters:
        warning - A String that specifies the payment rule warning information to set.
      • getEDPWarning

        public java.lang.String getEDPWarning()
        This method returns the payment rule warning information.
        Specified by:
        getEDPWarning in interface PrimePaymentCmd
        Returns:
        A String that specifies the payment rule warning information.
      • setInitialAmount

        public void setInitialAmount(java.math.BigDecimal initialAmount)
        This method sets the initial amount.
        Specified by:
        setInitialAmount in interface PrimePaymentCmd
        Parameters:
        initialAmount - A BigDecimal that specifies the initial amount to set.
      • getInitialAmount

        public java.math.BigDecimal getInitialAmount()
        This method returns the initial amount.
        Returns:
        A BigDecimal that specifies the initial amount.
      • setOrderAccessBean

        public void setOrderAccessBean(OrderAccessBean abOrder)
        This method sets a reference to the order access bean.
        Parameters:
        abOrder - An OrderAccessBean that represents the reference to the order access bean.
      • getOrderAccessBean

        public OrderAccessBean getOrderAccessBean()
        This method returns a reference to the order access bean. This method will first check if there is a local reference to the order access bean. If not present, it will create a new one.
        Returns:
        A OrderAccessBean that corresponds to the Order to paid for.
      • getPONumber

        public java.lang.String getPONumber()
        This method returns the PONumber attribute passed to the command by the caller.
        Returns:
        A String that specifies the PONumber attribute value.
      • setPaymentAttributes

        public void setPaymentAttributes(TypedProperty paymentAttributes)
        This method sets the paymentAttributes property of the command.
        Specified by:
        setPaymentAttributes in interface PrimePaymentCmd
        Parameters:
        paymentAttributes - A TypedProperty that represents the requestProperties object that contains all the command parameters to be passed to this command. It supports both wallet based and non-wallet based payments
      • setPaymentMethodId

        public void setPaymentMethodId(java.lang.String nPayMthdId)

        This method sets the payment method ID to be used with the payments rules subcomponent.

        This method is to be used when there is only a single payment method for the entire order.

        Specified by:
        setPaymentMethodId in interface PrimePaymentCmd
        Parameters:
        nPayMthdId - A String that specifies the payments rules payment method ID.
      • getPaymentMethodId

        public java.lang.String getPaymentMethodId()
        This method returns the payment method ID to be used for the payment of the order.
        Returns:
        A String that specifies the payment method ID.
      • 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 com.ibm.websphere.command.Command
        Overrides:
        isReadyToCallExecute in class AbstractECTargetableCommand
        Returns:
        A boolean that is true if the command is ready to execute and false otherwise.
      • setTotalAmount

        public void setTotalAmount(java.math.BigDecimal totalAmount)
        This method sets the total order amount.
        Specified by:
        setTotalAmount in interface PrimePaymentCmd
        Parameters:
        totalAmount - A BigDecimal that specifies the total order amount.
      • getTotalAmount

        public java.math.BigDecimal getTotalAmount()
        This method returns the total order amount.
        Returns:
        A BigDecimal that specifies the total order amounts; null may be returned
      • performExecute

        public void performExecute()
                            throws ECException
        This method executes the business logic of this command implementation. Here it does nothing.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException - This exception is thrown in case of failures.
      • reset

        public void reset()

        This method resets the command fields.

        After this method is invoked, and proper attributes are set, the command can be executed again.

        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AEDPPaymentTaskCmdImpl