com.ibm.commerce.requisitionlist.commands

Class RequisitionListSubmitCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, RequisitionListSubmitCmd, Protectable, 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 RequisitionListSubmitCmdImpl
    extends RequisitionListBaseCmdImpl
    implements RequisitionListSubmitCmd
    This is the default implementation of the RequisitionListSubmitCmd controller command.

    Input parameters:

    NameTypeRequirementDescription
    requisitionListIdLongmandatoryThe id of the requisition list to be submitted.
    contractIdLong[]optionalAn array of contract ids for price calculation.
    offerIdLong[]optionalAn array of offer ids for price calculation.

    Output parameters:

    NameTypeDescription
    orderIdLongthe created pending order list id

    Behavior:

    • Copy the requisition list and create a new pending order.
    • If the contractId or offerId is specified, they will be used to calculate the price for all order items created.
    • Call OrderPrepare to prepare the order.

    View:

    • RedirectView.
    This command calls the following TaskCommands: This command uses the following AccessBeans:
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

      • RequisitionListSubmitCmdImpl

        public RequisitionListSubmitCmdImpl()
    • Method Detail

      • getMergeToCurrentPendingOrder

        public java.lang.String getMergeToCurrentPendingOrder()
        This method returns the indicator to represent whether the requisition list is to be merged into current pending order.
        Returns:
        the String value "Y" to merge the requisition list into current pending order; "N" not to merge.
      • setMergeToCurrentPendingOrder

        public void setMergeToCurrentPendingOrder(java.lang.String flag)
        This method sets the indicator to represent whether the requisition list is to be merged into current pending order.
        Parameters:
        flag - the String value "Y" to merge the requisition list into current pending order; "N" not to merge.
      • addOrderItemNVPs

        public void addOrderItemNVPs(TypedProperty req,
                                     OrderItemAccessBean orderItemAB,
                                     int i)
                              throws java.sql.SQLException,
                                     ECException
        This method adds some name value pairs to the request properties based on the columns in the orderItamAB. If the catalogEntryId in orderItemAB is not null, it will add an nvp ("catEntryId_i", orderItemAB.getCatalogEntryId()) to request properties. The following columns are checked:
        • catalogEntryId
        • quantity
        • addressId
        • shippingModeId
        • comment
        • field1
        • field2
        Parameters:
        req - request properties
        orderItemAB - OrderItemAccessBean
        i - int
        Throws:
        ECException
        java.sql.SQLException
      • getOrderId

        public java.lang.Long getOrderId()
        This method returns the order id.
        Returns:
        order id.
      • setContractId

        public void setContractId(java.lang.Long[] id)
        This method specifies an array of contract ids for price calculation.
        Specified by:
        setContractId in interface RequisitionListSubmitCmd
        Parameters:
        id - an array of contract ids.
      • setOfferId

        public void setOfferId(java.lang.Long[] id)
        This method specifies an array of offer ids for price calculation.
        Specified by:
        setOfferId in interface RequisitionListSubmitCmd
        Parameters:
        id - an array of offer ids.
      • setRequisitionListId

        public void setRequisitionListId(java.lang.Long id)
        This method specifies the requisition list id to be submitted.
        Specified by:
        setRequisitionListId in interface RequisitionListSubmitCmd
        Parameters:
        id - requisition list id
      • validateParameters

        public void validateParameters()
                                throws ECException
        This method validates the input parameters.

        It checks the following mandatory parameters:

        • requisitionListId
        It also checks the validation of the following parameter values:
        • requisitionListId

        Exception:

        • It throws an ECApplicationException with the message key _ERR_BAD_MISSING_CMD_PARAMETER, if the input parameter requisitionListId is not found.
        • It throws an ECApplicationException with the message key _ERR_INVALID_ORDER_REFNUM, if the input parameter requisitionListId is not a valid order id.
        Specified by:
        validateParameters in interface ECCommand
        Overrides:
        validateParameters in class AbstractECTargetableCommand
        Throws:
        ECException