com.ibm.commerce.payment.commands

Interface CheckPOSpendingLimitCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ECCommand, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, TaskCommand
    All Known Implementing Classes:
    CheckPOSpendingLimitCmdImpl


    public interface CheckPOSpendingLimitCmd
    extends TaskCommand
    Checks if the Spending Limit of a Limited PO would be exceeded by the specified Order.

    Parameter:
    Parameter Name Type Descriptions
    order OrderAccessBean The Order Access Bean
    buyerPurchaseOrder BuyerPurchaseOrder AccessBean The BuyerPurchaseOrderAccessBean representing the buyer purchase order record.
    totalAmount BigDecimal The Total Amount to be checked. This amount is in the currency of the order.
    errorViewName String Optional error view name passed in by the Caller.

    Behavior:
    • Checks if Spending Limit of Purchase Order would be exceeded.
    • Records of the Purchase Amount of purchases registered against a Limited Purchase Order is kept in the same currency specified for the Limited PO. These records are kept in Table LPOPURAMT. (Note that the currency specified by the Limited PO must not change once the PO is used for any purchases.)
    • Purchases can be made using different currencies. Checking involves doing a currency conversion if necessary and then check.
    • If the check fails, the command throws an ECApplicationException.
    Note that CheckPOSpendingLimit may be called several times by various command during Order Flow. (for example, from Order Capture commands, the OrderProcess command, and so on.). The actual update of the PO Spending Amount is made during ReleaseToFulfillment by the CheckPaymentAcceptCmdImpl Task Command Implementation class when bReleaseToFulfillment is set to true.

    Default Error View Name:
    • CheckPOSpendingLimitErrorView
    ErrorCodes:
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • defaultCommandClassName

        static final java.lang.String defaultCommandClassName
        The default implementation of this command.
        See Also:
        Constant Field Values
      • ERRTASK_NAME

        static final java.lang.String ERRTASK_NAME
        Name of the default error view for this command. The constant value of this field is "CheckPOSpendingLimitErrorView".
        See Also:
        Constant Field Values
    • Method Detail

      • setBuyerPurchaseOrder

        void setBuyerPurchaseOrder(BuyerPurchaseOrderAccessBean abBPOA)
        Specifies the BuyerPurchaseOrderAccessBean representing the Purchase Order specified for the purchase.
        Parameters:
        abBPOA - the BuyerPurchaseOrderAccessBean
      • setErrorViewName

        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.
        Parameters:
        sEVN - the Error View name
      • setOrder

        void setOrder(OrderAccessBean abOrder)
        Sets the order property of the command.
        Parameters:
        abOrder - the OrderAccessBean of the Order
      • setTotalAmount

        void setTotalAmount(java.math.BigDecimal nTotalAmount)
        Sets the totalAmount property of the command.
        Parameters:
        nTotalAmount - the amount to be checked against the Spending Limit of the Limited Purchase Order