public class OrderCopyCmdImpl extends OrderBaseCmdImpl implements OrderConstants, OrderCopyCmd
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 logon 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. |
isPONumberCopied | Controls whether the PO number of source order will be copied to the destination order. |
field1 | Sets the field1 value of the destination order, respectively. If not specified, the corresponding field value of the "orderInfoFrom" order will be used, if there is one. |
field2 | Sets the field2 value of the destination order, respectively. If not specified, the corresponding field value of the "orderInfoFrom" order will be used, if there is one. |
field3 | Sets the field3 value of the destination order, respectively. If not specified, the corresponding field value of the "orderInfoFrom" order will be used, if there is one. |
billingAddressId | Sets the billing address ID of the destination order. If not specified, the billing address ID of the "orderInfoFrom" order will be used, if there is one. |
displaySeq | Sets the display sequence of the destination order. If not specified, the display sequence "orderInforFrom" order will be used, if there is one. |
orderInfoFrom | Specifies the reference number of an order from which to copy order level information: values for the DESCRIPTION, ADDRESS_ID, SEQUENCE, FIELD1, FIELD2, and FIELD3 columns in the ORDERS table. This parameter can be repeated. If more than one order is specified, it is as if only the most recently updated of those orders were specified. If "**" is specified, order level information is not copied from any order. If this parameter is not specified, and there is only one source order specified by the fromOrderId_i parameters, then it is as if order was specified. Otherwise, it defaults to "**". Abbreviations are resolved using the current customer and the store specified by the storeId parameter. |
payInfoFrom | Specifies the reference number of an order from which to copy payment information obtained by calling the GetOrderPaymentInfoCmd task command. If more than one order is specified, it is as if only the most recently updated of those orders were specified. This parameter can be repeated. If "**" is specified, order level information is not copied from any order. If this parameter is not specified, and there is only one source order specified by the fromOrderId_i parameters, then it is as if order was specified. Otherwise, it defaults to "**". Abbreviations are resolved using the current customer and the store specified by the storeId parameter. |
description | Sets the description of the destination order. If not specified, the description of the "orderInforFrom" order will be used, if there is one. |
orderComment | Sets the order comment if specified. |
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. |
status | Specifies the status of the destination order. Only I (submitted) and P (pending) are valid values. The default is P. If I is specified, then after the destination order is updated. It is prepared for display and locked, as if OrderPrepare had been called, and then the status is set to I. This prepares the order to be accepted by OrderProcess, and prevents it from being further modified by the customer. |
prepare | Controls whether the destination order will be prepared by OrderPrepare command or not. |
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. |
tcId | Specifies the term and condition Id of the destination order. |
continue | Controls whether the order copy continues when one or more of the order items cannot be copied. A value of 0 terminates and rolls back execution if an order item cannot be created or updated in the target order. A value of 1 ignores the create or update operation for that order item and continues execution. The default value is 0. |
ShipAsComplete | Specifies the ShipAsComplete flag of the destination order. |
sensitiveInfoCopy | Controls whether the sensitive information to be copied from the source order to the destination order. |
blockInfoCopy | Controls whether the block information of the source order to be copied to destination order. |
requestedShipDate | Specifies the request ship date of the destination order. |
copyAutoAddedOrderItems | Controls whether the auto added order items to be copied from source order to destination order. |
shippingAddressFromOrderProfile | The shippingAddressFromOrderProfile flag controls whether the default shipping address of the order profile will be used. If the value of the parameter 'shippingAddressFromOrderProfile' is set to '1', and if the toOrder is not null. It will try to copy the default shipping address of the order profile to all the order items of the order specified in the 'toOrderId'. |
shippingModeFromOrderProfile | The shippingModeFromOrderProfile flag controls whether the default shipping mode of the order profile will be used. If the value of the parameter 'shippingModeFromOrderProfile' is set to '1', and if the toOrder is not null. It will try to copy the default shipping mode of the order profile to all the order items of the order specified in the 'toOrderId'. |
merge | A list of OrderItems that should be merged with other OrderItems in the same order if possible, regardless of their correlationGroup attributes. This parameter can be repeated. |
remerge | A list of the OrderItems that should be merged with other OrderItems in the same order and with the same correlationGroup attribute, if possible. This parameter can be repeated. |
check | A list of OrderItems that should be checked by the CheckInventory task command. This parameter can be repeated. |
allocate | A list of OrderItems that should be allocated from existing inventory. This parameter can be repeated. |
backorder | A list of OrderItems that should be allocated from expected inventory. This parameter can be repeated. |
reverse | A list of OrderItems whose allocations should be released (that is, de-allocated from existing or expected inventory as appropriate). This parameter can be repeated. |
pay_paymentname | Sets the payment name value pairs of the destination order. This parameter can be repeated. For example the following command refers to the payment name-value pair "creditCardNumber==2222222222": pay_creditCardNumber=2222222222 These payment name-value pairs will be added to the ORDPAYINFO table through the SetOrderPaymentInfoCmd task command. If not specified, the payment name-value pairs of the payInfoFrom order will be used, if there is one. |
addressId_i | The reference number of the address to which the order items in the enumeration group specified by i are to be shipped. The address must belong to the customer executing this command. |
catEntryId_i | Sets the catalog entry ID of the order items in enumeration group i. |
comment_i | A comment included with the item to be passed to the OrderItemUpdate command when order items are added to or updated in the destination. |
contractId_i | The contract reference number associated with the order. It will be passed to the OrderItemUpdate command when order items are added to or updated in the destination. |
description_i | Sets the description of the order items in enumeration group i. |
copyOrderItemId_i | Specifies which order items should be copied from the source orders specified by fromOrderId_i and added to the destination order specified by toOrderId. This parameter can be repeated. If it is not specified, or "*" is specified, the parameter refers to all order items that belong to the orders specified by fromOrderId_i. If "." is specified the parameter refers to the most recently updated order item that belongs to the orders specified by fromOrderId_i. If "**" is specified the parameter refers to a single new order item that will be added to the destination order. It uses information only from other parameters in the enumeration group specified by i, but not from the source orders for that enumeration group. In this case, catEntryId_i or partNumber_i must be specified. The OrderCopy command calls the OrderItemUpdate command to add new order items to the destination order. |
field1_i | Specifies an integer value to be passed to the OrderItemUpdate command. When order items are added to or updated in the destination order, for the enumeration group specified by i. |
field2_i | Specifies a character string to be passed to the OrderItemUpdate command. When order items are added to or updated in the destination order, for the enumeration group specified by i. |
fromOrderId_i | Specifies zero or more source orders from which order items will be copied when enumeration group i is processed. The special abbreviations "." , "*", " .t" , "*t" and "q" are resolved using memberId_i and storeId. This parameter can be repeated. |
memberId_i | The reference number of a member, used to resolve special abbreviations (".", "*", ".t", ".**.", and "*t") when they appear in fromOrderId_i. For example, the following command refers to all pending orders of member 1001: fromOrderId_1=*&memberId_1=1001 The default value is the member ID of the current user. If the current customer attempts to access the orders of other customers but is not authorized to do so, an exception is thrown. |
offerId_i | A list of offer IDs to be chosen from when creating a new order item. This list will be passed to the OrderItemUpdate command. There is no default value. |
partNumber_i | The part number to be resolved to a catalog entry ID. It overrides catEntryId_i. |
partOwnerId_i | The member ID of the part owner, used with partNumber_i; defaults to the owner of the store. |
quantity_i | Sets the quantity of the order items in enumeration group i. |
shipModeId_i | Specifies a shipping mode reference number, to be passed to the OrderItemUpdate command. When order items are added to or updated in the destination order, for the enumeration group specified by i. This reference number is associated with a particular shipping service. |
UOM_i | The unit of measure for the quantity_i. |
updateOrderItemId_i | Specifies order items in the destination order to be updated. It is updated using information from other parameters in the enumeration group specified by i. But not from the source orders for that enumeration group and not from catEntryId_i and partNumber_i. Note that the catalog entry ID of an order item cannot be updated. The OrderCopy command calls the OrderItemUpdate command to update order items in the destination order. This parameter can be repeated. If "*" is specified, it means all order items in the destination order. If "." is specified, it means the most recently updated order item. |
currency_i | Sets the currency of the order items in enumeration group i. |
price_i | Sets the price of the order items in enumeration group i. |
configurationId_i | If the OrderItem represents a configured Dynamic Kit, this is the configuration ID. This parameter can be repeated. |
correlationGroup_i | The group to which this OrderItem is related. Normally, the correlationGroup is the same as the OrderItemID. OrderItems with the same correlationGroup attribute value represent the same object the customer wants to buy. A value for correlationGroup can be specified and propagated. When either OrderItems are split when inventory is allocated. Such as when two fulfillment centers must be used to fill an order for the same item if one fulfillment center has insufficient supply. Or when a price quotation is received for an OrderItem. When an OrderItem is split at inventory allocation, the newly created OrderItem inherits the correlationGroup value from the original OrderItem. In a quotation situation, the OrderItem inherits the correlationGroup value from the corresponding OrderItem in the parent order. |
attr_i_attrname | Specifies an attribute name and value to be passed to the OrderItemUpdate command. When adding order items for the enumeration group specified by i to the destination order. For example, the following command refers to part ABC123 with attribute "length"=="10":partNumber_1=ABC123&attr_1_length=10 |
inventoryValidation | Specifies whether inventory status should be validated for adding to cart. Default is "false" which means order items can be added to cart regardless of inventory status. |
Name | Description |
---|---|
the value of the outOrderId | the order Ids of the output orders. |
the value of the outOrderItemId | the orderItem Ids of the output orderItems. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright notice field.
|
Constructor and Description |
---|
OrderCopyCmdImpl()
default constructor
|
Modifier and Type | Method and Description |
---|---|
protected OrderItemUpdateCmd | callOrderItemUpdate(OrderItemUpdateCmd aOrderItemUpdateCmd)
This method is called by the copyOrderItemsInfo() method to execute the OrderItemUpdateCmd command.
|
protected java.util.Hashtable | combineOrderPaymentInfo(java.util.Hashtable ahshOrderPaymentInfo1, java.util.Hashtable ahshOrderPaymentInfo2)
This method combines the two orders' payment info.
|
protected void | copyOrderInfo()
If a new Order is to be created, create it and set its status to P.
|
protected void | copyOrderItemsInfo()
This method is used to copy order items level information.
|
protected void | copyShipInfo()
This method is used to copy ship info for order ship mode level and OrderItem level.
|
protected java.lang.String | getCopyShipInfoOrderFrom()
This method returns the order id to copy shipInfo from.
|
protected OrderCopyCmd.Group[] | getGroups()
This method gets the enumeration groups.
|
java.util.Vector | getItemsToBeRemoved()
To Retrieve items to be removed after copy
|
protected OrderItemUpdateCmd | getOrderItemUpdateCmd()
Get the OrderItemUpdateCmd to be used by OrderCopyCmdImpl.
|
AccessVector | getResources()
Returns an AccessVector containing the Protectable resources with the actions this command will perform on them.
|
protected boolean | isCopyAutoAddedOrderItems()
This method returns a boolean value to indicate whether to copy automatically added order items.
|
protected boolean | isNewToOrder()
This method returns a boolean value to indicate whether the toOrder is new created.
|
void | performExecute()
Executes the main business logic of the command.
|
void | reset()
Resets instance variables to their initial values.
|
void | setBillingAddressId(java.lang.Long anBillingAddressId)
Set the addressId of the billing address.
|
void | setBlockInfoCopyFlag(java.lang.String astrBlockInfoCopyFlag)
Set the flag indicating whether to copy block information
|
void | setContinue(java.lang.String astrContinue)
Set the continue parameter (optional).
|
void | setCopyOrderInfoFrom(java.lang.String[] astrCopyOrderInfoFrom)
Set the source order from which the order info (for example billingAddress) will be copied.
|
void | setCopyOrderPromotionCodeFrom(java.lang.String[] astrCopyOrderPromotionCodeFrom)
Set the source order from which the order promotion codes are copied.
|
void | setCopyPaymentInfoFrom(java.lang.String[] astrCopyPaymentInfoFrom)
Set the source order from which the payment info will be copied.
|
void | setDescription(java.lang.String astrDescription)
Set the description of the target order.
|
void | setDisplaySequence(java.lang.Double adDisplaySequence)
Set the display sequence of the target order.
|
void | setField1(java.lang.Integer anField1)
Set field1 of the target order.
|
void | setField2(java.math.BigDecimal adField2)
Set field2 of the target order.
|
void | setField3(java.lang.String astrField3)
Set field3 of the target order.
|
void | setGroups(OrderCopyCmd.Group[] aGroups)
Set the enumeration groups.
|
void | setOrderComment(java.lang.String astrOrderComment)
Set the order comment (optional).
|
protected void | setOrderPaymentInfo(OrderAccessBean aabOrder, java.util.Hashtable ahshOrderPaymentInfo)
This method sets the payment info to the order.
|
void | setOrderPromotionCodeCopyFlag(java.lang.String astrOrderPromotionCodeCopyFlag)
Set the order promotion code copy flag.
|
void | setOrdPayInfoCopyFlag(java.lang.String astrOrdPayInfoCopyFlag)
Set the order payment info copy flag.
|
void | setOutOrderItemNames(java.lang.String[] astrOutOrderItemNames)
Sets the names of the orderItemId properties to be appended to the redirection URL.
|
void | setOutOrderNames(java.lang.String[] astrOutOrderNames)
Sets the names of the orderId properties to be appended to the redirection URL.
|
void | setPayment(java.util.Hashtable ahshPayment)
Set the payment information of the target order.
|
void | setPrepare(java.lang.String astrPrepare)
Set if the order should be Prepared .
|
protected void | setPriceAndCurrency(java.lang.Integer an, java.math.BigDecimal adPrice, java.lang.String astrCurrency)
Deprecated.
Default implementation does nothing. Method should not be used. There is no replacement.
|
void | setRequestProperties(TypedProperty ahshRequestProperties)
Extracts input parameters from the specified request properties.
|
void | setSensitiveInfoCopyFlag(java.lang.String astrSensitiveInfoCopyFlag)
Set the flag which decides whether to copy sensitive (payment and so forth) info or not
|
void | setShippingAddressFromOrderProfile(java.lang.String anShippingAddressFromOrderProfile)
Set the shippingAddressFromOrderProfile flag
|
void | setStatus(java.lang.String astrStatus)
Set the status of the target order.
|
void | setTcId(java.lang.Long anTcId)
Set the PaymentTC that the billing address will be checked against.
|
void | setToOrderAbbreviations(java.lang.String[] astrToOrderAbbreviations)
Set the target order.
|
void | validateParameters()
Validates the input parameters.
|
public static final java.lang.String COPYRIGHT
protected java.util.Hashtable combineOrderPaymentInfo(java.util.Hashtable ahshOrderPaymentInfo1, java.util.Hashtable ahshOrderPaymentInfo2)
protected OrderItemUpdateCmd getOrderItemUpdateCmd() throws ECException
public AccessVector getResources() throws ECException
public void performExecute() throws ECException
protected void copyShipInfo() throws ECException
public void reset()
public void setBillingAddressId(java.lang.Long anBillingAddressId)
public void setCopyOrderInfoFrom(java.lang.String[] astrCopyOrderInfoFrom)
public void setCopyPaymentInfoFrom(java.lang.String[] astrCopyPaymentInfoFrom)
public void setSensitiveInfoCopyFlag(java.lang.String astrSensitiveInfoCopyFlag)
public void setBlockInfoCopyFlag(java.lang.String astrBlockInfoCopyFlag)
public void setDescription(java.lang.String astrDescription)
public void setDisplaySequence(java.lang.Double adDisplaySequence)
public void setField1(java.lang.Integer anField1)
public void setField2(java.math.BigDecimal adField2)
public void setField3(java.lang.String astrField3)
public void setGroups(OrderCopyCmd.Group[] aGroups)
protected void setOrderPaymentInfo(OrderAccessBean aabOrder, java.util.Hashtable ahshOrderPaymentInfo) throws ECException
public void setOutOrderItemNames(java.lang.String[] astrOutOrderItemNames)
public void setOutOrderNames(java.lang.String[] astrOutOrderNames)
public void setPayment(java.util.Hashtable ahshPayment)
protected void setPriceAndCurrency(java.lang.Integer an, java.math.BigDecimal adPrice, java.lang.String astrCurrency) throws ECException
public void setRequestProperties(TypedProperty ahshRequestProperties) throws ECApplicationException
public void setStatus(java.lang.String astrStatus)
public void setPrepare(java.lang.String astrPrepare)
public void setShippingAddressFromOrderProfile(java.lang.String anShippingAddressFromOrderProfile)
public void setTcId(java.lang.Long anTcId)
public void setToOrderAbbreviations(java.lang.String[] astrToOrderAbbreviations)
public void validateParameters() throws ECException
public void setContinue(java.lang.String astrContinue)
public void setOrderComment(java.lang.String astrOrderComment)
public java.util.Vector getItemsToBeRemoved()
protected void copyOrderInfo() throws ECException
protected void copyOrderItemsInfo() throws ECException
protected OrderItemUpdateCmd callOrderItemUpdate(OrderItemUpdateCmd aOrderItemUpdateCmd) throws ECException
protected boolean isNewToOrder()
protected java.lang.String getCopyShipInfoOrderFrom()
protected boolean isCopyAutoAddedOrderItems()
protected OrderCopyCmd.Group[] getGroups()
public void setOrderPromotionCodeCopyFlag(java.lang.String astrOrderPromotionCodeCopyFlag)
public void setCopyOrderPromotionCodeFrom(java.lang.String[] astrCopyOrderPromotionCodeFrom)
public void setOrdPayInfoCopyFlag(java.lang.String astrOrdPayInfoCopyFlag)