com.ibm.commerce.payment.commands

Class UpdatePOSpendingForLimitCheckCmdImpl

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

    Behaviour:

      This implementation updates Purchase Order's Spending for the given order and buyerPurchaseOrder.
    • The default implementation inserts a row into the LPOPURAMT Table if the purchase was done specifying a Limited Purchase Order. (No row is created if the Purchase Order specified is NOT a Limited Purchase Order.)
    • Throws an ECApplicationException if the purchase amount exceeds the Purchase Order spending limits specified via a PurchaseOrderTC for Limited Purchase Order.
    • The purchase was made using a currency that is different from the currency specified for the Limited Purchase Order. The total amount will be converted to the purchase order currency before storing it in the LPOPURAMT Table.
    • Since this Task Command may be called more than once, skip the insert if the row already exists.
    • The Total Purchase Amount of the Limited Purchase Order is not decremented if a Refund is issued later against the Order.

    Task commands called:

    None
    See Also:
    Serialized Form
    • Constructor Detail

      • UpdatePOSpendingForLimitCheckCmdImpl

        public UpdatePOSpendingForLimitCheckCmdImpl()
    • Method Detail

      • reset

        public void reset()
        This command 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 com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • setErrorViewName

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

        public void setOrder(OrderAccessBean ab)
        This command sets the order property of the command.
        Specified by:
        setOrder in interface UpdatePOSpendingCmd
        Parameters:
        ab - The OrderAccessBean of the order.
      • setTotalAmount

        public void setTotalAmount(java.math.BigDecimal nTA)
        This command sets the totalAmount property of the command.
        Specified by:
        setTotalAmount in interface UpdatePOSpendingCmd
        Parameters:
        nTA - the total amount for the purchase order spending limit record update