com.ibm.commerce.payment.commands

Interface ValidatePONumberCmd

  • 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:
    ValidatePONumberCmdImpl


    public interface ValidatePONumberCmd
    extends TaskCommand
    This task command is used to perform the checks on the specified buyerPONumber. The default implementation of this command is ValidatePONumberCmdImpl.

    Parameter:
    Parameter Name Type Descriptions
    order OrderAccessBean The OrderAccessBean
    account AccountAccessBean The AccountAccessBean representing the common account object of all the Trading Agreements specified by the OrderItems of the Order.
    buyerPONumber String The Buyer Purchase Order Number
    errorViewName String Optional error view name passed in by the Caller.
    createFlag boolean Flag to indicate if the command may create BuyerPurchaseOrder object as a by-product of the validation. By default, this flag is set to true.


    Behavior:
    • Checks the buyerPONumber against predefined POs (Limited or Blanket PO) in the Trading Agreement (of the Account). If the buyerPONumber is one of the predefined PO but the PO is no longer active, then throws an ECApplicationException.
    • If the buyerPONumber is not a predefined PO and individualPO is not specified for the Trading Agreement, then the buyerPONumber is invalid. Throws an ECApplicationException.
    • If the buyerPONumber is not a predefined PO and individualPO is specified for the Trading Agreement (of the Account). Then make sure this "individual" PONumber has not been used for this Account if uniqueness is in the PurchaseOrderTC (POTCIndividual). Otherwise, throws an ECApplicationException.
    Returned Parameters:
    • buyerPOType (Same value as the buyerPOTyp_id) to indicate the Type of buyerPO,
    • buyerPOId (ID of the BuyerPurchaseOrder object if one exists or is created. Otherwise, null).
    Default Error View Name:
    • ValidatePONumberErrorView (This is the default ErrorViewName if none is passed into the command.)
    ErrorCodes:
    See Also:
    ValidatePONumberCmdImpl
    • Field Detail

      • COPYRIGHT

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

        static final java.lang.String NAME
        The full name of this command.
        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
        The name of the default error view for this command. The constant value of this field is "ValidatePONumberErrorView".
        See Also:
        Constant Field Values
    • Method Detail

      • getBuyerPOId

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

        void setAccount(AccountAccessBean abAccount)
        This method sets the Account property of the command.
        Parameters:
        abAccount - The AccountAccessBean of the order is associated with.
      • setBuyerPONumber

        void setBuyerPONumber(java.lang.String sBPONum)
        This method sets the BuyerPONumber property of the command.
        Parameters:
        sBPONum - A String that specifies the actual buyer purchase order number specified by the customer for the purchase.
      • setCreateFlag

        void setCreateFlag(boolean createFlag)
        This method sets the createFlag property of the command. By default, the flag is set to true. And the command will create new BuyerPO record for a new Individual Purchase Order after verifying that an Individual Purchase Order is allowed. Set the flag to false if you do not want the command to create any BuyerPO record as a by-product of the validation.
        Parameters:
        createFlag - A boolean that indicates if the command will create a new BuyerPO record if needed.
      • setErrorViewName

        void setErrorViewName(java.lang.String sEVN)
        This method sets the error view to be used to report error.
        Parameters:
        sEVN - A String that specifies the Error View name.
      • setOrder

        void setOrder(OrderAccessBean abOrder)
        This method sets the order property of the command.
        Parameters:
        abOrder - The OrderAccessBean of the order to be processed.