com.ibm.commerce.order.commands

Class SSFSOrderCopyCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, SSFSOrderCopyCmd, 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 SSFSOrderCopyCmdImpl
    extends ControllerCommandImpl
    implements SSFSOrderCopyCmd
    This is the default implementation of the OrderCopy controller command. It first invokes Sterling OMS API getCompleteOrderDetails to get a remote order detail information and then create or update the local destination order with that information.

    Input parameters:

    Name Description
    langId Sets or resets the preferred language for the duration of the session; the supported languages for a store are found in the STORELANG table.
    forUser The log on ID of the user on whose behalf the command will be run. Only a person with the authority to process orders can specify this parameter.
    forUserId Same as forUser, but identifying the user by the internal user ID, as found in the USERS table.
    storeId Sets the store ID of the destination order. It is also used to resolve special abbreviations. (".", "*", ".t", ".**.", and "*t") when they appear in fromOrderId_i, toOrderId, orderInfoFrom, and payInfoFrom. For example, the following command refers to all pending orders of member 1001 in store 1: fromOrderId_1=*&memberId_1=1001&storeId=1.
    URL Mandatory, the redirection URL that is called when the command successfully completes.
    outOrderItemName Specifies the names of name-value pairs to be added to the redirection URL. The value of each added name-value pair is the reference number of a destination order item. The default value is "orderItemId". This parameter can be repeated.
    outOrderName Specifies the names of name-value pairs to be added to the redirection URL. The value of each added name-value pair is the reference number of a destination order. The default value is "orderId". This parameter can be repeated.
    toOrderId Specifies the order to be created or modified. It can be specified as an order reference number or as one of the special abbreviations ".", "*", ".t", "*t", "**" and ".**.". If it is not specified, it defaults to "**", which creates a new order. If more than one order is specified, it is as if only the most recently updated one was specified. Abbreviations are resolved using the current customer (the customer running this command) and the store specified in the storeId parameter.
    ShipAsComplete Specifies the ShipAsComplete flag of the destination order.
    prepare Controls whether the destination order will be prepared by OrderPrepare command or not.
    calculate Controls whether the destination order will be calculated by OrderCalculate command or not.
    copyAutoAddedOrderItems Controls whether the auto added order items to be copied from source order to destination order.
    sensitiveInfoCopy Controls whether the sensitive information to be copied from the source order to the destination order.
    copyOrderPromotionCode Controls whether the order public promotion code to be copied from the source order to the destination order. Default is 'N' which means not to copy promotion codes.
    copyOrderUniquePromotionCode Controls whether the order unique promotion code to be copied from the source order to the destination order. Default is 'N' which means not to copy unique promotion codes.
    OrderHeaderKey Specifies remote order's unique identifier.
    OrderNo Specifies remote order's order number.

    Output parameters:

    Name Description
    the value of the outOrderId the order Id of the output orders.
    the value of the outOrderItemId the orderItem Id of the output orderItems.

    Behavior:

    • Call the copyOrderInfo() method to copy the order level information.
    • Call the copyOrderItemsInfo() method to copy order item level information.
    • Call the prepareOrder() method which may call the PrepareOrderCmd task command if istrPrepare is "Y".
    • Call the calculateOrder() method which may call the CalculateOrderCmd task command if istrCalculate is "Y".
    • Set the viewTaskName response property to "RedirectView".

    Task commands called:

    AccessBeans used:

    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • EC_SHIPASCOMPLETE

        public static final java.lang.String EC_SHIPASCOMPLETE
        The string of ship as complete.
        See Also:
        Constant Field Values
      • EC_PREPARE

        public static final java.lang.String EC_PREPARE
        The string of order prepare.
        See Also:
        Constant Field Values
      • EC_CALCULATE

        public static final java.lang.String EC_CALCULATE
        The string of order calculate.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SSFSOrderCopyCmdImpl

        public SSFSOrderCopyCmdImpl()
    • Method Detail

      • reset

        public void reset()
        Resets instance variables to their initial values.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • getItemsToBeRemoved

        public java.util.Vector getItemsToBeRemoved()
        To Retrieve items to be removed after copy.
        Specified by:
        getItemsToBeRemoved in interface SSFSOrderCopyCmd
        Returns:
        The items to be removed.
      • setShipAsComplete

        public void setShipAsComplete(java.lang.String astrShipAsComplete)
        Set if the order should be set as ShipAsComplete.
        Specified by:
        setShipAsComplete in interface SSFSOrderCopyCmd
        Parameters:
        astrShipAsComplete - The value can be ("Y") or ("N"). Default is ("Y").
      • setPrepare

        public void setPrepare(java.lang.String astrPrepare)
        Set if the order should be Prepared.
        Specified by:
        setPrepare in interface SSFSOrderCopyCmd
        Parameters:
        astrPrepare - The value can be ("Y") or ("N"). Default is ("N").
      • setCalculate

        public void setCalculate(java.lang.String astrCalculate)
        Set if the order should be calculated.
        Specified by:
        setCalculate in interface SSFSOrderCopyCmd
        Parameters:
        astrCalculate - The value can be "0" (not for calculation) or "1" (Default: for calculation).
      • setCopyAutoAddedOrderItemsFlag

        public void setCopyAutoAddedOrderItemsFlag(boolean abCopyAutoAddedOrderItemsFlag)
        Set the flag which decides whether to copy auto added order item. The default value is false, indicating that the auto added item will not be copied.
        Specified by:
        setCopyAutoAddedOrderItemsFlag in interface SSFSOrderCopyCmd
        Parameters:
        abCopyAutoAddedOrderItemsFlag -
      • setSensitiveInfoCopyFlag

        public void setSensitiveInfoCopyFlag(java.lang.String astrSensitiveInfoCopyFlag)
        Set the flag which decides whether to copy sensitive (payment and so forth) info or not.
        Specified by:
        setSensitiveInfoCopyFlag in interface SSFSOrderCopyCmd
        Parameters:
        astrSensitiveInfoCopyFlag - The sensitive information copy flag.
      • setOrderPromotionCodeCopyFlag

        public void setOrderPromotionCodeCopyFlag(java.lang.String astrOrderPromotionCodeCopyFlag)
        Set the order promotion code copy flag. The default value is "N" indicating the promotion codes need not be copied. If it is set as "Y", the order promotion codes need to be copied to the target order.
        Specified by:
        setOrderPromotionCodeCopyFlag in interface SSFSOrderCopyCmd
        Parameters:
        astrOrderPromotionCodeCopyFlag - The order promotion code copy flag.
      • setOrderUniquePromotionCodeCopyFlag

        public void setOrderUniquePromotionCodeCopyFlag(java.lang.String astrOrderUniquePromotionCodeCopyFlag)
        Set the order unique promotion codes copy flag. The default value is "N" indicating the unique promotion codes need not be copied. If it is set as "Y", the unique promotion codes need to be copied to the target order.
        Specified by:
        setOrderUniquePromotionCodeCopyFlag in interface SSFSOrderCopyCmd
        Parameters:
        astrOrderUniquePromotionCodeCopyFlag - The order unique promotion code copy flag.
      • setOutOrderItemNames

        public void setOutOrderItemNames(java.lang.String[] astrOutOrderItemNames)
        Sets the names of the orderItemId properties to be appended to the redirection URL. Each name causes properties to be appended to the redirection URL with the specified name. And with values of the OrderItemIds that were created or updated.
        Specified by:
        setOutOrderItemNames in interface SSFSOrderCopyCmd
        Parameters:
        astrOutOrderItemNames - The names of the orderItemId properties.
      • setOutOrderNames

        public void setOutOrderNames(java.lang.String[] astrOutOrderNames)
        Sets the names of the orderId properties to be appended to the redirection URL. Each name causes properties to be appended to the redirection URL with the specified name. And with values of the OrderId that was created or updated.
        Specified by:
        setOutOrderNames in interface SSFSOrderCopyCmd
        Parameters:
        astrOutOrderNames - The names of the orderId properties.
      • setToOrderAbbreviations

        public void setToOrderAbbreviations(java.lang.String[] astrToOrderAbbreviations)
        Set the target order.
        Specified by:
        setToOrderAbbreviations in interface SSFSOrderCopyCmd
        Parameters:
        astrToOrderAbbreviations - The target order.
      • setOrderHeaderKey

        public void setOrderHeaderKey(java.lang.String astrFromOrderHeaderKey)
        Set the unique key of the order.
        Specified by:
        setOrderHeaderKey in interface SSFSOrderCopyCmd
        Parameters:
        astrFromOrderHeaderKey - The unique key of the order.
      • setOrderNo

        public void setOrderNo(java.lang.String astrFromOrderNo)
        Set the order number of the order.
        Specified by:
        setOrderNo in interface SSFSOrderCopyCmd
        Parameters:
        astrFromOrderNo - The order number of the order.