com.ibm.commerce.order.commands

Class UpdateSpendingLimitCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, UpdateSpendingLimitCmd, 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 UpdateSpendingLimitCmdImpl
    extends TaskCommandImpl
    implements UpdateSpendingLimitCmd
    This is the default implementation of the UpdateSpendingLimitCmd task command.

    Behaviour:

      It checks account , spending limit and purchase order number, and updates some items if needed. It performs the following:
    • Makes sure that if there is a business account id, it is unique.
    • Checks if the trading agreement contains any purchase order terms and conditions; if so, then, purchase order number cannot be null .
    • Checks TA Spending Limit.
    • Validates PO Number.
    • Checks the purchase order (PO) spending limit.

    Task commands called:

    See Also:
    Serialized Form
    • Constructor Detail

      • UpdateSpendingLimitCmdImpl

        public UpdateSpendingLimitCmdImpl()
    • Method Detail

      • 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 UpdateSpendingLimitCmd
        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 UpdateSpendingLimitCmd
        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()
        This 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
      • isAllowPONumberAsNull

        public boolean isAllowPONumberAsNull()
        This method returns if allow purchase order number as Null.
        Specified by:
        isAllowPONumberAsNull in interface UpdateSpendingLimitCmd
        Returns:
        A boolean indicating if allow purchase order number as Null.
      • setAllowPONumberAsNull

        public void setAllowPONumberAsNull(boolean bAllowPONumberAsNull)
        This method sets if allow purchase order number as Null.
        Specified by:
        setAllowPONumberAsNull in interface UpdateSpendingLimitCmd
        Parameters:
        bAllowPONumberAsNull - A boolean indicating if allow purchase order number as Null.