com.ibm.commerce.order.commands

Class CheckPaymentTCsCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, CheckPaymentTCsCmd, 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 CheckPaymentTCsCmdImpl
    extends TaskCommandImpl
    implements CheckPaymentTCsCmd
    This command checks account, spending limit and purchase order number.
    See Also:
    Serialized Form
    • Constructor Detail

      • CheckPaymentTCsCmdImpl

        public CheckPaymentTCsCmdImpl()
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException

        This method executes some check (TCs) before payments. It performs the following:

        1. Makes sure that if there is a business account id, it is unique
        2. Checks if the trading agreement contains any purchase order terms and conditions; if so, then, purchase order number cannot be null
        3. Checks TA Spending Limit
        4. Validates PO Number
        5. Checks the purchase order (PO) spending limit
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException - in case of a failure
      • getOrder

        public OrderAccessBean getOrder()

        This method gets the order access bean associated with this command.

        Returns:
        The OrderAccessBean that corresponds to the order associated with this request
      • setOrder

        public void setOrder(OrderAccessBean bean)
        This method sets the order access bean associated with this command.
        Specified by:
        setOrder in interface CheckPaymentTCsCmd
        Parameters:
        bean - The OrderAccessBean that corresponds to the order associated with this request
      • setPONumber

        public void setPONumber(java.lang.String sPONumber)
        This method sets the purchase order number.
        Specified by:
        setPONumber in interface CheckPaymentTCsCmd
        Parameters:
        sPONumber - the purchase order number specified by the buyer
      • getPONumber

        public java.lang.String getPONumber()
        This method gets the PONumber attribute passed to the command by the caller.
        Returns:
        The PONumber attribute value
      • reset

        public void reset()
        The method resets the instance variables of the command. The reset() method will reset all instance variables. This command includes some output values that are accessible via getters. 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 com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand