com.ibm.commerce.orderitems.commands
Interface OrderItemUpdateCmd

All Superinterfaces:
AccCommand, ControllerCommand, ECCommand, Protectable
All Known Subinterfaces:
AdminOrderItemUpdateCmd, RequisitionListItemUpdateCmd
All Known Implementing Classes:
OrderItemBaseCmdImpl, OrderItemUpdateCmdImpl

public interface OrderItemUpdateCmd
extends ControllerCommand

Add products or items to the order list or update the products and items in the existing order list.

This command can do all that OrderItemAdd command can do. In addition, it can also update products and items in the existing order list.

This command accepts enumeration type of parameters. That is, it accepts parameterName_i=parameterValue.

For example, to add three catalog entries with id 15, 16, and 17 to the OrderItems, you can pass catEntryId_1=15&catEntryId_2=16&catEntryId_3=17 to the command. If you call the individual set method to pass the above parameters, you need to create a hashtable and add the following to the hashtable:

      hashtable.put(new Integer(1), new String("15")); 
      hashtable.put(new Integer(2), new String("16")); 
      hashtable.put(new Integer(3), new String("17"));
 
then passed the hashtable to the method setCatEntryId(Hashtable).

The command will execute each enumeration group one by one. But the order of execution is not guaranteed. So if you pass two orderItemId with the same number, the result is unpredictable.

When updating the order item with qunatity = 0, this order item will be deleted. If you delete the same order item twice in one transaction, it will throw a remote exception. Behavior

View: Exception conditions


Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String defaultCommandClassName
           
static java.lang.String NAME
           
 
Method Summary
 java.lang.String[] getOrderIds()
          Return a list of order ids which are touched or created by the command.
 java.lang.String[] getOrderItemIds()
          Return a list of order item ids which are created or updated by the command.
 void setAddressId(java.util.Hashtable ahshAddress_id)
          Set the address id parameters (optional).
 void setAttrName(java.util.Hashtable ahshAttr_name)
          Set the attribute name parameters (optional).
 void setAttrValue(java.util.Hashtable ahshAttr_value)
          Set the attribute value parameters (optional).
 void setCatEntryId(java.util.Hashtable ahshCatentry_id)
          Set the attribute name parameters.
 void setComment(java.util.Hashtable ahshComment)
          Set the comment parameters (optional).
 void setConfigurationId(java.util.Hashtable ahshConfigurationId)
          Set the configurationId parameters (optional).
 void setContractId(java.util.Hashtable ahshContract_id)
          Set the contract id parameters (optional).
 void setCorrelationGroup(java.util.Hashtable ahshCorrelationGroup)
          Set the correlation group parameters.
 void setDescription(java.util.Hashtable ahshDescription)
          Set the description parameters (optional).
 void setField1(java.util.Hashtable ahshField1)
          Set the field1 parameters (optional).
 void setField2(java.util.Hashtable ahshField2)
          Set the field2 parameters (optional).
 void setListId(java.lang.String[] aList_id)
          Set the interest item list id parameters (optional).
 void setMemberId(java.util.Hashtable ahshMember_id)
          Set the member id parameters (optional).
 void setOfferId(java.util.Hashtable ahshOffer_id)
          Set the offer id parameters (optional).
 void setOrderDesc(java.lang.String aOrder_desc)
          Set the Order description parameter (optional).
 void setOrderId(java.lang.String[] aOrder_id)
          Set the order id parameters (optional).
 void setOrderItemId(java.util.Hashtable ahshOrderitem_id)
          Set the order item ids for which to update.
 void setOutOrderItemName(java.lang.String[] aOut_orderitem_name)
          Set the out order item name parameters (optional).
 void setOutOrderName(java.lang.String[] aarrOutOrderName)
          Set the out order name parameters (optional).
 void setPartNumber(java.util.Hashtable ahshPart_number)
          Set the part number parameters (optional).
 void setQuantity(java.util.Hashtable ahshQuantity)
          Set the quantity parameters.
 void setShipmodeId(java.util.Hashtable ahshShipmode_id)
          Set the ship mode id parameters (optional).
 void setTradingId(java.util.Hashtable ahshTrading_id)
          Set the trading id parameters (optional).
 void setUom(java.util.Hashtable ahshUom)
          Set the unit of measure parameters (optional).
 
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, performExecute, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT

defaultCommandClassName

public static final java.lang.String defaultCommandClassName

NAME

public static final java.lang.String NAME
Method Detail

getOrderIds

public java.lang.String[] getOrderIds()
Return a list of order ids which are touched or created by the command. These order ids are also appended to redirection url.

getOrderItemIds

public java.lang.String[] getOrderItemIds()
Return a list of order item ids which are created or updated by the command. These order item ids are also appended to redirection url.

setAddressId

public void setAddressId(java.util.Hashtable ahshAddress_id)
Set the address id parameters (optional).
Parameters:
ahshAddress_id - Contains a list of address ids. The key is the enumeration group (Integer) and the value is the address id (String). For example, if you have input parameters: addressId_1=123&addressId=234, the hashtable can be constructed by:
    ahshAddress_id.put(new Integer(1), new String("123"));
    ahshAddress_id.put(new Integer(2), new String("234"));
 

setAttrName

public void setAttrName(java.util.Hashtable ahshAttr_name)
Set the attribute name parameters (optional). The attribute name, together with the attribute value are used to determine a SKU.
Parameters:
ahshAttr_name - Contains a list of attribute names. The key is the enumeration group (Integer) and the value is the attribute name (String[]). For example, if you have input parameters: attrName_1=123&attrName_1=234&attrName_2=123, the hashtable can be constructed by:
    ahshAttr_name.put(new Integer(1), new String[] {"123", "234"});
    ahshAttr_name.put(new Integer(2), new String[] {"123"});
 

setAttrValue

public void setAttrValue(java.util.Hashtable ahshAttr_value)
Set the attribute value parameters (optional). The attribute name, together with the attribute value are used to determine a SKU.

setCatEntryId

public void setCatEntryId(java.util.Hashtable ahshCatentry_id)
Set the attribute name parameters. This parameter is mandatory if the partNumber parameter is not set. This parameter is ignored when the partNumber parameter is set.

setComment

public void setComment(java.util.Hashtable ahshComment)
Set the comment parameters (optional).

setConfigurationId

public void setConfigurationId(java.util.Hashtable ahshConfigurationId)
Set the configurationId parameters (optional).

setContractId

public void setContractId(java.util.Hashtable ahshContract_id)
Set the contract id parameters (optional). It is used to calculate the price.

setCorrelationGroup

public void setCorrelationGroup(java.util.Hashtable ahshCorrelationGroup)
Set the correlation group parameters. It is optional.

setDescription

public void setDescription(java.util.Hashtable ahshDescription)
Set the description parameters (optional).

setField1

public void setField1(java.util.Hashtable ahshField1)
Set the field1 parameters (optional).

setField2

public void setField2(java.util.Hashtable ahshField2)
Set the field2 parameters (optional).

setListId

public void setListId(java.lang.String[] aList_id)
Set the interest item list id parameters (optional).

setMemberId

public void setMemberId(java.util.Hashtable ahshMember_id)
Set the member id parameters (optional). It is the catalog owner's member id. It is necessary when the partNumber parameter is set. Together with the partNumber, the catalog entry id can uniquely be determined.

setOfferId

public void setOfferId(java.util.Hashtable ahshOffer_id)
Set the offer id parameters (optional). It is used to calculate the price.

setOrderDesc

public void setOrderDesc(java.lang.String aOrder_desc)
Set the Order description parameter (optional).

setOrderId

public void setOrderId(java.lang.String[] aOrder_id)
Set the order id parameters (optional). If it is not set, the current pending order id will be used. If there is no current pending order, a new order will be created.

setOrderItemId

public void setOrderItemId(java.util.Hashtable ahshOrderitem_id)
Set the order item ids for which to update.

setOutOrderItemName

public void setOutOrderItemName(java.lang.String[] aOut_orderitem_name)
Set the out order item name parameters (optional). If it is not set, the default name is "orderItemId".

setOutOrderName

public void setOutOrderName(java.lang.String[] aarrOutOrderName)
Set the out order name parameters (optional). If it is not set, the default name is "orderId".

setPartNumber

public void setPartNumber(java.util.Hashtable ahshPart_number)
Set the part number parameters (optional).

setQuantity

public void setQuantity(java.util.Hashtable ahshQuantity)
Set the quantity parameters. It is mandatory if adding a new order item.

setShipmodeId

public void setShipmodeId(java.util.Hashtable ahshShipmode_id)
Set the ship mode id parameters (optional).

setTradingId

public void setTradingId(java.util.Hashtable ahshTrading_id)
Set the trading id parameters (optional). It is used to calculate the price.

setUom

public void setUom(java.util.Hashtable ahshUom)
Set the unit of measure parameters (optional).