com.ibm.commerce.orderitems.commands
Class OrderItemBaseCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.orderitems.commands.OrderItemBaseCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, OrderItemAddCmd, OrderItemUpdateCmd
Direct Known Subclasses:
OrderItemAddCmdImpl, OrderItemUpdateCmdImpl

public class OrderItemBaseCmdImpl
extends ControllerCommandImpl
implements OrderItemAddCmd, OrderItemUpdateCmd

This is the base class for OrderItemAdd and OrderItemUpdate. This command calls the following TaskCommands:

This command uses the following AccessBeans:
See Also:
Serialized Form

Field Summary
protected   CatalogEntryAccessBean cachedCurrentCatEntryAB
          Deprecated.  
protected static java.lang.String CONTINUE_FALSE
          Deprecated.  
protected static java.lang.String CONTINUE_TRUE
          Deprecated.  
static java.lang.String COPYRIGHT
          IBM copyright notice field.
static int GENERATED_ORDERITEM
          Deprecated.  
protected   ATPParameters iATPParms
          ATP parameters.
protected  boolean iCommandExecuted
          Deprecated.  
protected  java.lang.String iContinue
          Input parameter: continue.
protected  java.util.Hashtable ihsATPParmsDefaults
          ATP parameter defaults.
protected  java.util.Hashtable ihsCatalogEntryAccessBeans
          A list of cached catalog entry access beans.
protected  java.util.Hashtable ihshAddress_id
          Input parameter: addressId.
protected  java.util.Hashtable ihshAttr_name
          Input parameter: attrName.
protected  java.util.Hashtable ihshAttr_value
          Input parameter: attrValue.
protected  java.util.Hashtable ihshCatentry_id
          Input parameter: catEntryId.
protected  java.util.Hashtable ihshComment
          Input parameter: comment.
protected  java.util.Hashtable ihshConfigurationId
          Input parameter: configurationId.
protected  java.util.Hashtable ihshContract_id
          Input parameter: contractId.
protected  java.util.Hashtable ihshCorrelationGroup
          Input parameter: correlationGroup.
protected  java.util.Hashtable ihshDescription
          Input parameter: description.
protected  java.util.Hashtable ihshExpandConfigurationId
          Input parameter: expandConfigurationId.
protected  java.util.Hashtable ihshField1
          Input parameter: field1.
protected  java.util.Hashtable ihshField2
          Input parameter: field2.
protected  java.util.Hashtable ihshKey
          Keys contains all enumeration group.
protected  java.util.Hashtable ihshMember_id
          Input parameter: memberId.
protected  java.util.Hashtable ihshOffer_id
          Input parameter: offerId.
protected  java.util.Hashtable ihshOrderitem_id
          Input parameter: orderItemId.
protected  java.util.Hashtable ihshOrderResourceList
          Resource list for orders.
protected  java.util.Hashtable ihshOutOrderItemId
          Out order item ids.
protected  java.util.Hashtable ihshPart_number
          Input parameter: partNumber.
protected  java.util.Hashtable ihshQuantity
          Input parameter: quantity.
protected  java.util.Hashtable ihshShipmode_id
          Input parameter: shipModeId.
protected  java.util.Hashtable ihshStoreResourceList
          Resource list for stores.
protected  java.util.Hashtable ihshUom
          Input parameter: UOM.
protected  java.lang.String[] iList_id
          Input parameter: listId.
protected  java.lang.Long iList_order_id
          Order id for newly created order when listId is specified.
protected  java.lang.String iNew_order_id
          Order id for newly created order.
protected  boolean iNewQuantity
          Keeps track of quanity changes or if new order item is inserted.
protected  java.lang.Long inItemSpecId
          Instance variable.
protected  java.lang.String iOrder_desc
          Input parameter: orderDesc.
protected  java.lang.String iOrderComment
          Input parameter: orderComment.
protected  TypedProperty iOrderIdProperty
          Order id list.
protected  java.util.Hashtable iOrderItemIndex
          A map from order item id to the enumeration group i.
protected  java.lang.String[] iOut_order_name
          Input parameter: outOrderName.
protected  java.lang.String[] iOut_orderitem_name
          Input parameter: outOrderItemName.
protected  java.util.Vector iResolvedOrderIdList
          Resolved order id list.
protected  TypedProperty iResolvedRequestProperties
          Resolved request properties used by user traffic.
protected  AccessVector iResourcelist
          Resource list.
protected  java.lang.Long iSavedItemSpecId
          ItemspcId.
protected  java.util.Set isetDeletedOrderitemIds
          Deleted order item id set.
protected  java.util.Hashtable iUniqueOrderIdList
          Unique order id list.
protected  java.util.Hashtable iUniqueOrderitemIdList
          Unique order item id list.
protected  java.util.Hashtable iUniqueStoreIdList
          Unique store id list.
protected  java.lang.String[] iValidInputPOrderValues
          Instance variable.
protected  java.util.Vector ivecComponentList
          Instance variable.
static int MANUAL_FULFILLMENT_CENTER
          Deprecated.  
static int MANUAL_PRICE
          Deprecated.  
static int NORMAL_ORDERITEM
          Deprecated.  
protected static int QUOTATION_ORDERITEM
          Deprecated.  
protected static java.lang.String STR_ADDRESS_ID
          Deprecated.  
protected static java.lang.String STR_ATTR_NAME
          Deprecated.  
protected static java.lang.String STR_ATTR_VALUE
          Deprecated.  
protected static java.lang.String STR_CATENTRY_ID
          Deprecated.  
protected static java.lang.String STR_COMMENT
          Deprecated.  
protected static java.lang.String STR_CONFIGURATION_ID
          Deprecated.  
protected static java.lang.String STR_CONTINUE
          Deprecated.  
protected static java.lang.String STR_CONTRACT_ID
          Deprecated.  
protected static java.lang.String STR_CORRELATION_GROUP
          Deprecated.  
protected static java.lang.String STR_DESCRIPTION
          Deprecated.  
protected static java.lang.String STR_EXPAND_CONFIGURATION_ID
          Deprecated.  
protected static java.lang.String STR_FIELD1
          Deprecated.  
protected static java.lang.String STR_FIELD2
          Deprecated.  
static java.lang.String STR_INVALID_INPUT_ERROR_VIEW
          The invalid input error view.
protected static java.lang.String STR_LIST_ID
          Deprecated.  
protected static java.lang.String STR_MEMBER_ID
          Deprecated.  
protected static java.lang.String STR_OFFER_ID
          Deprecated.  
protected static java.lang.String STR_ORDER_COMMENT
          Deprecated.  
protected static java.lang.String STR_ORDER_DESC
          Deprecated.  
protected static java.lang.String STR_ORDER_ID
          Deprecated.  
protected static java.lang.String STR_ORDERITEM_ID
          Deprecated.  
protected static java.lang.String STR_OUT_ORDER_NAME
          Deprecated.  
protected static java.lang.String STR_OUT_ORDERITEM_NAME
          Deprecated.  
protected static java.lang.String STR_PART_NUMBER
          Deprecated.  
protected static java.lang.String STR_QUANTITY
          Deprecated.  
protected static java.lang.String STR_SHIPMODE_ID
          Deprecated.  
protected static java.lang.String STR_STORE_ID
          Deprecated.  
protected static java.lang.String STR_UOM
          Deprecated.  
 
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.orderitems.commands. OrderItemAddCmd
badPartNumberErrorView, badPartNumberList, badPartNumberQuantityList, defaultCommandClassName, goodPartNumberList, goodPartNumberQuantityList, multiplePartNumberCatalogEntriesList, multiplePartNumberList, multiplePartNumberQuantityList, NAME
 
Fields inherited from interface com.ibm.commerce.orderitems.commands. OrderItemUpdateCmd
defaultCommandClassName, NAME
 
Constructor Summary
OrderItemBaseCmdImpl()
           
 
Method Summary
protected  void checkBuyable(java.lang.Long catentry_id)
          Checks whether the catalog entry is buyable and available in the store.
protected  void checkProductEntitlement(java.lang.Long catentry_id, java.lang.Long member_id)
          Checks whether the user is entitled to buy this product.
protected  void checkValidStatus( OrderAccessBean orderAB)
          Checks whether the status of the order is valid when you modify the order.
protected  java.lang.String createOrder()
          Creates a new order.
protected   OrderItemAccessBean createOrderItem(java.lang.Integer i, java.lang.Long catentry_id, java.lang.String orderId)
          Create an order item.
protected  java.lang.Long getAddressId(java.lang.Integer i)
          Gets the input parameter addressId with enumeration group i.
  ATPParameters getATPParms()
          Gets the input ATP parameters.
protected  java.util.Hashtable getAttributeNVP(java.lang.Integer i)
          Gets the input parameter attrName_i and attrValue_i and puts them into a hashtable.
protected   CatalogEntryAccessBean getCatalogEntryAccessBean(java.lang.String astrCatalogEntry)
          Get the catalog entry access bean from a cached hashtable.
protected  java.lang.Long getCatEntryId(java.lang.Integer i)
          Gets the input parameter catEntryId with enumeration group i.
protected  java.lang.String getComment(java.lang.Integer i)
          Gets the input parameter comment with enumeration group i.
protected  java.lang.String getConfigurationId(java.lang.Integer i)
          Gets the input parameter configurationId with enumeration group i.
protected  java.lang.String getContinue()
          Gets the input parameter continue.
protected  java.lang.Long[] getContractId(java.lang.Integer i)
          Gets the input parameter contarctId with enumeration group i.
protected  java.lang.Long getCorrelationGroup(java.lang.Integer i)
          Gets the input parameter correlationGroup with enumeration group i.
 java.util.Set getDeletedOrderItemIds()
          Returns a Set of (String) identifiers of deleted OrderItems.
protected  java.lang.String getDescription(java.lang.Integer i)
          Gets the input parameter Description with enumeration group i.
protected  java.lang.String getExpandConfigurationId(java.lang.Integer i)
          Gets the input parameter expandConfigurationId with enumeration group i.
protected  java.lang.Integer getField1(java.lang.Integer i)
          Gets the input parameter field1 with enumeration group i.
protected  java.lang.String getField2(java.lang.Integer i)
          Gets the input parameter field2 with enumeration group i.
protected  java.lang.Long getItemSpecId()
          Gets the itemSpecId.
protected  java.lang.Long getMemberId(java.lang.Integer i)
          Gets the input parameter memberId with enumeration group i.
 java.lang.Long getNewOrderId()
          Gets the id of the newly created order.
 java.util.Hashtable getNewOrderItemIds()
          Returns a Hashtable whose (String) values are identifiers of newly created OrderItems.
protected  java.lang.Long[] getOfferId(java.lang.Integer i)
          Gets the input parameter offerId with enumeration group i.
protected  java.lang.String getOrderComment()
          Gets the input parameter OrderComment.
protected  java.lang.String getOrderDesc()
          Gets the input parameter OrderDesc.
protected  java.lang.String[] getOrderId()
          Gets the resolved order ids.
 java.lang.String[] getOrderIds()
          Return a list of order ids which are touched or created by the command.
protected  java.lang.Long getOrderItemId(java.lang.Integer i)
          Gets the input parameter orderItemId with enumeration group i.
 java.lang.String[] getOrderItemIds()
          Return a list of order item ids which are created or updated by the command.
protected  java.lang.String getPartNumber(java.lang.Integer i)
          Gets the input parameter partNumber with enumeration group i.
protected  java.lang.Double getQuantity(java.lang.Integer i)
          Gets the input parameter quantity with enumeration group i.
protected  java.util.Vector getResolvedOrderId()
          Gets the list of resolved order id.
  TypedProperty getResolvedRequestProperties()
          Gets the resolved request properties.
  AccessVector getResources()
          Gets the resources.
protected  QuantityAmount getRoundedQuantityAmount(java.lang.Long catentry_id, java.lang.Double quantity)
          Returns a rounded quantity amount based on the catalog entry.
protected  java.lang.Integer getShipModeId(java.lang.Integer i)
          Gets the input parameter shipModeId with enumeration group i.
  UserAccessBean getTheUser()
          Returns super.getUser().
 java.lang.Long getTheUserId()
          Returns super.getUserId().
protected  java.lang.Long[] getTradingId(java.lang.Integer i)
          Gets the input parameter contractId with enumeration group i.
protected  java.util.Hashtable getUniqueOrderId()
          Returns a Hashtable whose (String) keys are identifiers of created or updated Orders.
protected  java.util.Hashtable getUniqueOrderItemId()
          Returns a Hashtable whose (String) keys are identifiers of created or updated OrderItems.
protected  java.lang.String getUOM(java.lang.Integer i)
          Gets the input parameter UOM with enumeration group i.
protected  void insertAddressId( OrderItemAccessBean orderitemAB, java.lang.Integer i)
          Deprecated.  
protected  void insertItemSpecId( OrderItemAccessBean orderitemAB)
          Inserts an item spec id to the order item.
protected  void insertOrderItem(java.lang.Integer i, java.lang.Long catentry_id)
          Inserts a new order item to each resolved orders.
protected  void insertOrderItem( InterestItemAccessBean iitemAB)
          Creates a new order item based on the interest item and insert into the order.
protected  void insertOrderItems(java.lang.Integer i, java.lang.String expandConfigurationId)
          Insert order items based on the expandConfigurationId parameter.
protected  void insertPartNumber( OrderItemAccessBean orderitemAB, java.lang.Integer i)
          Inserts the part number to the order item.
protected  void invalidateAllocation( OrderItemAccessBean aabOI)
          Invalidate the allocation for the order item.
protected  void migrateInterestItemsToOrderItems()
          Migrate all interest items to order items when listId is specified.
protected  void orderItemAdd(java.lang.Integer i)
          Add order item for enumeration group i.
protected  void orderItemUpdate(java.lang.Integer i)
          Update order item for enumeration group i.
 void performExecute()
           For each enumeration group i: It checks whether the parameters orderItemId_i, expandConfigurationId_i, partNumber_i or catEntryId_i are specified. The order of precedence is: orderItemId_i, expandConfigurationId_i, partNumber_i and catEntryId_i.
 void reset()
          reset all instance variables.
protected  void resolveOrderId()
          Resolves order ids by calling MiscCmd.getListOfPendingOrders().
protected  java.lang.Long resolveSku(java.lang.Integer i, java.lang.Long catentry_id)
          It calls ResolveSkuCmd to resolve the sku and calls checkBuyable().
 void setAddressId(java.util.Hashtable ahshAddress_id)
          Set the address id parameters (optional).
 void setATPParms( ATPParameters newATPParms)
          Set the ATP parameters.
 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 parameter.
 void setContinue(java.lang.String aContinue)
          Set the continue parameter (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 setExpandConfigurationId(java.util.Hashtable ahshExpandConfigurationId)
          Set the expandConfigurationId parameter.
 void setField1(java.util.Hashtable ahshField1)
          Set the field1 parameters (optional).
 void setField2(java.util.Hashtable ahshField2)
          Set the field2 parameters (optional).
protected  void setItemSpecId(java.lang.Long anItemSpecId)
          Sets the ItemSpecId
 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 setOrderComment(java.lang.String aOrderComment)
          Set the Order comment parameter (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[] aOut_order_name)
          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 setQuantity(java.lang.Integer i, java.lang.Double aQuantity)
          Set the quantity parameters.
 void setRequestProperties( TypedProperty aRequestProperties)
          Sets the request properties.
protected  void setResolvedOrderId(java.util.Vector resolvedOrderIdList)
          Set the resolved id 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).
protected  void unLockOrder(java.lang.String orderId)
          Unlocks the order.
protected  void updateAddressId()
          Update the shipping address for the all touched order items.
protected  void updateAddressId( OrderItemAccessBean orderitemAB, java.lang.Integer i)
          Deprecated.  
protected  void updateAddressId(java.util.Vector orderItems)
          Updates the address for the order item.
protected  void updateAllShippingAndAddress()
          It calls updateShippingAndAddress() to update the shipping address and shipping mode for each order item.
protected  void updateComponentList( OrderItemAccessBean orderitemAB, java.lang.Integer i)
          Updates the component list for the order item.
protected  void updateCorrelationGroup( OrderItemAccessBean orderitemAB, java.lang.Integer i)
          Updates the correlation group for the order item.
protected  void updateCurrency( OrderAccessBean orderAB)
          Updates the currency for the order.
protected  void updateFulfillmentCenter()
          Updates the fulfillment centers and checks for available inventory for all order items modified or created.
protected  void updateItemSpecId( OrderItemAccessBean orderitemAB)
          Updates the item spec id for the order item.
protected  void updateOrder()
          Updates order related information.
protected  void updateOrderItem(java.lang.Integer i, java.lang.Long orderitem_id)
          Deprecated.  
protected  void updateOrderItem( OrderItemAccessBean orderitemAB, java.lang.Integer i)
          Updates the order item.
protected  void updateOutOrderItemId()
          Adds the ids of the newly created order items to the response properties with key being the input parameter value of outOrderItemName concatenated with "_i" and the value being the id of the order item.
protected  void updateOutOrderItemName()
          Adds the ids of the created and updated order items to the response properties with key being the input parameter value of outOrderItemName and the value being the String array of order item ids.
protected  void updateOutOrderName()
          Adds the ids of the created and updated orders to the response properties with key being the input parameter value of outOrderName and the value being the String array of order ids.
protected  void updatePrice()
          Calculates the best price for the all touched order items.
protected  void updatePrice( OrderItemAccessBean orderitemAB, java.lang.Integer i)
          Deprecated.  
protected  void updatePrice(java.util.Vector orderItems, java.lang.String currency)
          Calculates the best price for the input orderitems.
protected  boolean updateQuantity( OrderItemAccessBean orderitemAB, java.lang.Integer i)
          Updates the quantity for the order item.
protected  void updateResourceList()
          Updates the resources list.
protected  void updateShipModeId()
          Update the shipping modes for the all touched order items.
protected  void updateShipModeId( OrderItemAccessBean orderitemAB, java.lang.Integer i)
          Deprecated.  
protected  void updateShipModeId(java.util.Vector orderItems)
          Updates the shipping mode id for all order items.
protected  void updateShippingAndAddress( OrderItemAccessBean orderitemAB, java.lang.Integer i)
          It calls updateAddressId() and updateShipModeId() to update the shipping address and shipping mode for the order item.
 void validateParameters()
          Verify the input parameters.
protected  void validateTradingPaymentMethods()
          Validate the trading agreements used by the orderitems in an order by checking if they define compatible payment methods and are associated with the same account as the other orderitems in the order.
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.command. ControllerCommand
checkPermission, execute, getGeneric, getRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command. AccCommand
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command. ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 

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

STR_STORE_ID

protected static final java.lang.String STR_STORE_ID
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_ORDERITEM_ID

protected static final java.lang.String STR_ORDERITEM_ID
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_CATENTRY_ID

protected static final java.lang.String STR_CATENTRY_ID
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_PART_NUMBER

protected static final java.lang.String STR_PART_NUMBER
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_MEMBER_ID

protected static final java.lang.String STR_MEMBER_ID
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_ATTR_NAME

protected static final java.lang.String STR_ATTR_NAME
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_ATTR_VALUE

protected static final java.lang.String STR_ATTR_VALUE
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_QUANTITY

protected static final java.lang.String STR_QUANTITY
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_ADDRESS_ID

protected static final java.lang.String STR_ADDRESS_ID
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_SHIPMODE_ID

protected static final java.lang.String STR_SHIPMODE_ID
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_COMMENT

protected static final java.lang.String STR_COMMENT
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_FIELD1

protected static final java.lang.String STR_FIELD1
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_FIELD2

protected static final java.lang.String STR_FIELD2
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_CONTRACT_ID

protected static final java.lang.String STR_CONTRACT_ID
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_OFFER_ID

protected static final java.lang.String STR_OFFER_ID
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_UOM

protected static final java.lang.String STR_UOM
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_ORDER_ID

protected static final java.lang.String STR_ORDER_ID
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_OUT_ORDER_NAME

protected static final java.lang.String STR_OUT_ORDER_NAME
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_OUT_ORDERITEM_NAME

protected static final java.lang.String STR_OUT_ORDERITEM_NAME
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_ORDER_DESC

protected static final java.lang.String STR_ORDER_DESC
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_LIST_ID

protected static final java.lang.String STR_LIST_ID
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_DESCRIPTION

protected static final java.lang.String STR_DESCRIPTION
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_CONFIGURATION_ID

protected static final java.lang.String STR_CONFIGURATION_ID
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_CORRELATION_GROUP

protected static final java.lang.String STR_CORRELATION_GROUP
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

NORMAL_ORDERITEM

public static final int NORMAL_ORDERITEM
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

GENERATED_ORDERITEM

public static final int GENERATED_ORDERITEM
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

MANUAL_PRICE

public static final int MANUAL_PRICE
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

MANUAL_FULFILLMENT_CENTER

public static final int MANUAL_FULFILLMENT_CENTER
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

CONTINUE_TRUE

protected static final java.lang.String CONTINUE_TRUE
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

CONTINUE_FALSE

protected static final java.lang.String CONTINUE_FALSE
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

QUOTATION_ORDERITEM

protected static final int QUOTATION_ORDERITEM
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_CONTINUE

protected static final java.lang.String STR_CONTINUE
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_EXPAND_CONFIGURATION_ID

protected static final java.lang.String STR_EXPAND_CONFIGURATION_ID
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_ORDER_COMMENT

protected static final java.lang.String STR_ORDER_COMMENT
Deprecated.  
Constant for internal use.
See Also:
Constant Field Values

STR_INVALID_INPUT_ERROR_VIEW

public static final java.lang.String STR_INVALID_INPUT_ERROR_VIEW
The invalid input error view.
See Also:
Constant Field Values

iValidInputPOrderValues

protected java.lang.String[] iValidInputPOrderValues
Instance variable.

inItemSpecId

protected java.lang.Long inItemSpecId
Instance variable.

ivecComponentList

protected java.util.Vector ivecComponentList
Instance variable.

ihshOrderitem_id

protected java.util.Hashtable ihshOrderitem_id
Input parameter: orderItemId.

ihshCatentry_id

protected java.util.Hashtable ihshCatentry_id
Input parameter: catEntryId.

ihshPart_number

protected java.util.Hashtable ihshPart_number
Input parameter: partNumber.

ihshMember_id

protected java.util.Hashtable ihshMember_id
Input parameter: memberId.

ihshAttr_name

protected java.util.Hashtable ihshAttr_name
Input parameter: attrName.

ihshAttr_value

protected java.util.Hashtable ihshAttr_value
Input parameter: attrValue.

ihshQuantity

protected java.util.Hashtable ihshQuantity
Input parameter: quantity.

ihshAddress_id

protected java.util.Hashtable ihshAddress_id
Input parameter: addressId.

ihshShipmode_id

protected java.util.Hashtable ihshShipmode_id
Input parameter: shipModeId.

ihshComment

protected java.util.Hashtable ihshComment
Input parameter: comment.

ihshDescription

protected java.util.Hashtable ihshDescription
Input parameter: description.

ihshField1

protected java.util.Hashtable ihshField1
Input parameter: field1.

ihshField2

protected java.util.Hashtable ihshField2
Input parameter: field2.

ihshContract_id

protected java.util.Hashtable ihshContract_id
Input parameter: contractId.

ihshOffer_id

protected java.util.Hashtable ihshOffer_id
Input parameter: offerId.

ihshUom

protected java.util.Hashtable ihshUom
Input parameter: UOM.

ihshCorrelationGroup

protected java.util.Hashtable ihshCorrelationGroup
Input parameter: correlationGroup.

iOut_order_name

protected java.lang.String[] iOut_order_name
Input parameter: outOrderName.

iOut_orderitem_name

protected java.lang.String[] iOut_orderitem_name
Input parameter: outOrderItemName.

iOrder_desc

protected java.lang.String iOrder_desc
Input parameter: orderDesc.

iList_id

protected java.lang.String[] iList_id
Input parameter: listId.

iList_order_id

protected java.lang.Long iList_order_id
Order id for newly created order when listId is specified.

iNew_order_id

protected java.lang.String iNew_order_id
Order id for newly created order.

ihshKey

protected java.util.Hashtable ihshKey
Keys contains all enumeration group.

iCommandExecuted

protected boolean iCommandExecuted
Deprecated.  

iNewQuantity

protected boolean iNewQuantity
Keeps track of quanity changes or if new order item is inserted. Then need to flush the changes to database for inventory stored procedures to pick up the changes.

iATPParms

protected ATPParameters iATPParms
ATP parameters.

ihsATPParmsDefaults

protected java.util.Hashtable ihsATPParmsDefaults
ATP parameter defaults.

ihshConfigurationId

protected java.util.Hashtable ihshConfigurationId
Input parameter: configurationId.

ihshOrderResourceList

protected java.util.Hashtable ihshOrderResourceList
Resource list for orders.

ihshStoreResourceList

protected java.util.Hashtable ihshStoreResourceList
Resource list for stores.

iResourcelist

protected AccessVector iResourcelist
Resource list.

ihshOutOrderItemId

protected java.util.Hashtable ihshOutOrderItemId
Out order item ids. The (String) values are identifiers of newly created OrderItems. The (Integer) keys are the enumeration groups that created them.

cachedCurrentCatEntryAB

protected CatalogEntryAccessBean cachedCurrentCatEntryAB
Deprecated.  

ihsCatalogEntryAccessBeans

protected java.util.Hashtable ihsCatalogEntryAccessBeans
A list of cached catalog entry access beans.

iOrderItemIndex

protected java.util.Hashtable iOrderItemIndex
A map from order item id to the enumeration group i.

iContinue

protected java.lang.String iContinue
Input parameter: continue.

ihshExpandConfigurationId

protected java.util.Hashtable ihshExpandConfigurationId
Input parameter: expandConfigurationId.

iOrderComment

protected java.lang.String iOrderComment
Input parameter: orderComment.

iSavedItemSpecId

protected java.lang.Long iSavedItemSpecId
ItemspcId.

iResolvedRequestProperties

protected TypedProperty iResolvedRequestProperties
Resolved request properties used by user traffic.

iOrderIdProperty

protected TypedProperty iOrderIdProperty
Order id list.

iResolvedOrderIdList

protected java.util.Vector iResolvedOrderIdList
Resolved order id list.

iUniqueOrderIdList

protected java.util.Hashtable iUniqueOrderIdList
Unique order id list. The (String) keys are identifiers of updated or created Orders.

iUniqueOrderitemIdList

protected java.util.Hashtable iUniqueOrderitemIdList
Unique order item id list. The (String) keys are identifiers of updated or created OrderItems.

isetDeletedOrderitemIds

protected java.util.Set isetDeletedOrderitemIds
Deleted order item id set. The (String) elements are identifiers of deleted OrderItems.

iUniqueStoreIdList

protected java.util.Hashtable iUniqueStoreIdList
Unique store id list.
Constructor Detail

OrderItemBaseCmdImpl

public OrderItemBaseCmdImpl()
Method Detail

checkBuyable

protected void checkBuyable(java.lang.Long catentry_id)
                     throws ECException,
                            FinderException,
                            CreateException,
                            javax.naming.NamingException,
                            java.rmi.RemoteException,
                            java.sql.SQLException
Checks whether the catalog entry is buyable and available in the store.
Parameters:
catentry_id - catalog entry id.
Throws:
ECException - it throws ECApplicationException with message key _ERR_PROD_NOT_ORDERABLE if the product is not buyable. it throws ECApplicationException with message key _ERR_CATENTRY_NOT_EXISTING_IN_STORE if the product is not available in the store.
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

checkProductEntitlement

protected void checkProductEntitlement(java.lang.Long catentry_id,
                                       java.lang.Long member_id)
                                throws ECException,
                                       FinderException,
                                       CreateException,
                                       javax.naming.NamingException,
                                       java.rmi.RemoteException,
                                       java.sql.SQLException
Checks whether the user is entitled to buy this product.
Parameters:
catentry_id - catalog entry id.
member_id - member id.
Throws:
ECApplicationException - with message key _ERR_PS_ENTRY_INVALID if the user is not entitled to buy this product.
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException
ECException

checkValidStatus

protected void checkValidStatus(OrderAccessBean orderAB)
                         throws ECException,
                                FinderException,
                                CreateException,
                                javax.naming.NamingException,
                                java.rmi.RemoteException,
                                java.sql.SQLException
Checks whether the status of the order is valid when you modify the order. The valid status are 'P' and 'E'.
Parameters:
orderAB - OrderAccessBean.
Throws:
ECApplicationException - with message key _ERR_ORDER_WRONG_STATUS if the status is not valid.
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException
ECException

createOrder

protected java.lang.String createOrder()
                                throws ECException,
                                       FinderException,
                                       CreateException,
                                       javax.naming.NamingException,
                                       java.rmi.RemoteException,
                                       java.sql.SQLException
Creates a new order.
Returns:
the newly created order id.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

createOrderItem

protected OrderItemAccessBean createOrderItem(java.lang.Integer i,
                                              java.lang.Long catentry_id,
                                              java.lang.String orderId)
                                       throws ECException,
                                              FinderException,
                                              CreateException,
                                              javax.naming.NamingException,
                                              java.rmi.RemoteException,
                                              java.sql.SQLException
Create an order item. It calls
Parameters:
i - enumeration group
catentry_id - catalog entry id.
orderId - order id.
Returns:
OrderItemAccessBean, the newly created order item.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

getAddressId

protected java.lang.Long getAddressId(java.lang.Integer i)
                               throws InvalidParameterValueException
Gets the input parameter addressId with enumeration group i.
Parameters:
i - enumeration group
Returns:
address id
Throws:
InvalidParameterValueException - if the input addressId_i is not a valid number.

getATPParms

public ATPParameters getATPParms()
Gets the input ATP parameters.
Returns:
ATPParameters

getAttributeNVP

protected java.util.Hashtable getAttributeNVP(java.lang.Integer i)
                                       throws InvalidParameterValueException
Gets the input parameter attrName_i and attrValue_i and puts them into a hashtable.
Parameters:
i - enumeration group
Returns:
attribute name value pairs.
Throws:
InvalidParameterValueException - if the input attrName_i is not a valid number.

getCatalogEntryAccessBean

protected CatalogEntryAccessBean getCatalogEntryAccessBean(java.lang.String astrCatalogEntry)
                                                    throws java.rmi.RemoteException,
                                                           javax.naming.NamingException,
                                                           FinderException,
                                                           CreateException
Get the catalog entry access bean from a cached hashtable. If it is not in the hashtable, it will be loaded from database.
Parameters:
astrCatalogEntry - catalog entry id.
Returns:
CatalogEntryAccessBean.
Throws:
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException

getCatEntryId

protected java.lang.Long getCatEntryId(java.lang.Integer i)
                                throws InvalidParameterValueException
Gets the input parameter catEntryId with enumeration group i.
Parameters:
i - enumeration group
Returns:
catalog entry id.
Throws:
InvalidParameterValueException - if the input catEntryId_i is not a valid number.

getComment

protected java.lang.String getComment(java.lang.Integer i)
Gets the input parameter comment with enumeration group i.
Parameters:
i - enumeration group
Returns:
comment.

getConfigurationId

protected java.lang.String getConfigurationId(java.lang.Integer i)
Gets the input parameter configurationId with enumeration group i.
Parameters:
i - enumeration group
Returns:
configuration id.

getContinue

protected java.lang.String getContinue()
Gets the input parameter continue.
Returns:
a string.

getContractId

protected java.lang.Long[] getContractId(java.lang.Integer i)
                                  throws InvalidParameterValueException
Gets the input parameter contarctId with enumeration group i.
Parameters:
i - enumeration group
Returns:
an array of contract id.
Throws:
InvalidParameterValueException - if the input contractId_i is not a valid number.

getCorrelationGroup

protected java.lang.Long getCorrelationGroup(java.lang.Integer i)
                                      throws InvalidParameterValueException
Gets the input parameter correlationGroup with enumeration group i.
Parameters:
i - enumeration group.
Returns:
correlation group.
Throws:
InvalidParameterValueException - if the input correlationGroup_i is not a valid number.

getDescription

protected java.lang.String getDescription(java.lang.Integer i)
Gets the input parameter Description with enumeration group i.
Parameters:
i - enumeration group
Returns:
description.

getExpandConfigurationId

protected java.lang.String getExpandConfigurationId(java.lang.Integer i)
Gets the input parameter expandConfigurationId with enumeration group i.
Parameters:
i - enumeration group
Returns:
expand configuration id.

getField1

protected java.lang.Integer getField1(java.lang.Integer i)
                               throws InvalidParameterValueException
Gets the input parameter field1 with enumeration group i.
Parameters:
i - enumeration group
Returns:
field1
Throws:
InvalidParameterValueException - if the input field1_i is not a valid number.

getField2

protected java.lang.String getField2(java.lang.Integer i)
Gets the input parameter field2 with enumeration group i.
Parameters:
i - enumeration group
Returns:
field2

getItemSpecId

protected java.lang.Long getItemSpecId()
Gets the itemSpecId.
Returns:
item spec id.

getMemberId

protected java.lang.Long getMemberId(java.lang.Integer i)
                              throws InvalidParameterValueException
Gets the input parameter memberId with enumeration group i.
Parameters:
i - enumeration group
Returns:
member id.
Throws:
InvalidParameterValueException - if the input memberId_i is not a valid number.

getNewOrderId

public java.lang.Long getNewOrderId()
Gets the id of the newly created order.
Returns:
order id, or null.

getNewOrderItemIds

public java.util.Hashtable getNewOrderItemIds()
Returns a Hashtable whose (String) values are identifiers of newly created OrderItems. The keys are the (Integer) enumeration group identifiers that created them.
Specified by:
getNewOrderItemIds in interface OrderItemUpdateCmd
Returns:
the Hashtable.

getOfferId

protected java.lang.Long[] getOfferId(java.lang.Integer i)
                               throws InvalidParameterValueException
Gets the input parameter offerId with enumeration group i.
Parameters:
i - enumeration group
Returns:
an array of offer ids.
Throws:
InvalidParameterValueException - if the input offerId_i is not a valid number.

getOrderComment

protected java.lang.String getOrderComment()
Gets the input parameter OrderComment.
Returns:
order comment.

getOrderDesc

protected java.lang.String getOrderDesc()
Gets the input parameter OrderDesc.
Returns:
order description.

getOrderId

protected java.lang.String[] getOrderId()
                                 throws ECException
Gets the resolved order ids. It calls resolveOrderId().
Returns:
an array of order ids.
Throws:
ECException

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.
Specified by:
getOrderIds in interface OrderItemAddCmd
Returns:
an array of order ids.

getOrderItemId

protected java.lang.Long getOrderItemId(java.lang.Integer i)
                                 throws InvalidParameterValueException
Gets the input parameter orderItemId with enumeration group i.
Parameters:
i - enumeration group
Returns:
order item id.
Throws:
InvalidParameterValueException - if the input orderItemId_i is not a valid number.

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.
Specified by:
getOrderItemIds in interface OrderItemAddCmd
Returns:
an array of order item ids.

getPartNumber

protected java.lang.String getPartNumber(java.lang.Integer i)
Gets the input parameter partNumber with enumeration group i.
Parameters:
i - enumeration group
Returns:
part number.

getQuantity

protected java.lang.Double getQuantity(java.lang.Integer i)
                                throws InvalidParameterValueException
Gets the input parameter quantity with enumeration group i.
Parameters:
i - enumeration group
Returns:
qunatity.
Throws:
InvalidParameterValueException - if the input quantity_i is not a valid number.

getResolvedOrderId

protected java.util.Vector getResolvedOrderId()
Gets the list of resolved order id.
Returns:
the resolved order id.

getResolvedRequestProperties

public TypedProperty getResolvedRequestProperties()
Gets the resolved request properties. For example, if the input parameter orderId=., this parameter value will be replaced by the current order id.
Specified by:
getResolvedRequestProperties in interface ControllerCommand
Overrides:
getResolvedRequestProperties in class ControllerCommandImpl
Returns:
resolved request properties.

getResources

public AccessVector getResources()
Gets the resources.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
resource access vector.

getRoundedQuantityAmount

protected QuantityAmount getRoundedQuantityAmount(java.lang.Long catentry_id,
                                                  java.lang.Double quantity)
                                           throws ECException
Returns a rounded quantity amount based on the catalog entry. It calls com.ibm.commerce.price.utils.Helper.createRoundedQuantityAmount() to get the rounded quantity amount.
Parameters:
catentry_id - catalog entry id.
Returns:
QuantityAmount.
Throws:
ECSystemException - with ECMessage key _ERR_NUMBER_FORMAT_EXCEPTION if createRoundedQuantityAmount() throws an exception.
ECException

getShipModeId

protected java.lang.Integer getShipModeId(java.lang.Integer i)
                                   throws InvalidParameterValueException
Gets the input parameter shipModeId with enumeration group i.
Parameters:
i - enumeration group
Returns:
shipping mode id.
Throws:
InvalidParameterValueException - if the input shipModeId_i is not a valid number.

getTheUser

public UserAccessBean getTheUser()
                          throws ECSystemException
Returns super.getUser().
Returns:
UserAccessBean
Throws:
ECSystemException - if super.getUser() throws ECSystemException.

getTheUserId

public java.lang.Long getTheUserId()
Returns super.getUserId().
Returns:
user id

getTradingId

protected java.lang.Long[] getTradingId(java.lang.Integer i)
                                 throws InvalidParameterValueException
Gets the input parameter contractId with enumeration group i.
Parameters:
i - enumeration group
Returns:
an array of trading ids.
Throws:
InvalidParameterValueException - if the input contractId_i is not a valid number.

getUniqueOrderId

protected java.util.Hashtable getUniqueOrderId()
Returns a Hashtable whose (String) keys are identifiers of created or updated Orders.
Returns:
the Hashtable.

getUniqueOrderItemId

protected java.util.Hashtable getUniqueOrderItemId()
Returns a Hashtable whose (String) keys are identifiers of created or updated OrderItems.
Returns:
the Hashtable.

getDeletedOrderItemIds

public java.util.Set getDeletedOrderItemIds()
Returns a Set of (String) identifiers of deleted OrderItems.
Specified by:
getDeletedOrderItemIds in interface OrderItemUpdateCmd
Returns:
the Set.

getUOM

protected java.lang.String getUOM(java.lang.Integer i)
Gets the input parameter UOM with enumeration group i.
Parameters:
i - enumeration group
Returns:
unit of measure.

insertAddressId

protected void insertAddressId(OrderItemAccessBean orderitemAB,
                               java.lang.Integer i)
Deprecated.  
Inserts a default address to the order item.
Parameters:
orderitemAB - OrderItemAccessBean
i - enumeration group

insertItemSpecId

protected void insertItemSpecId(OrderItemAccessBean orderitemAB)
                         throws ECException
Inserts an item spec id to the order item.
Parameters:
orderitemAB - OrderItemAccessBean
Throws:
ECException

insertOrderItem

protected void insertOrderItem(InterestItemAccessBean iitemAB)
                        throws ECException,
                               FinderException,
                               CreateException,
                               javax.naming.NamingException,
                               java.rmi.RemoteException,
                               java.sql.SQLException
Creates a new order item based on the interest item and insert into the order. It calls the following methods:
Parameters:
iitemAB - InterestItemAccessBean
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

insertOrderItem

protected void insertOrderItem(java.lang.Integer i,
                               java.lang.Long catentry_id)
                        throws ECException,
                               FinderException,
                               CreateException,
                               javax.naming.NamingException,
                               java.rmi.RemoteException,
                               java.sql.SQLException
Inserts a new order item to each resolved orders. It calls the following task commands and methods:
Parameters:
i - enumeration group
catentry_id - catalog entry id.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

insertOrderItems

protected void insertOrderItems(java.lang.Integer i,
                                java.lang.String expandConfigurationId)
                         throws ECException,
                                FinderException,
                                CreateException,
                                javax.naming.NamingException,
                                java.rmi.RemoteException,
                                java.sql.SQLException
Insert order items based on the expandConfigurationId parameter.
Parameters:
i - enumeration group
expandConfigurationId - expand configuration id
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

insertPartNumber

protected void insertPartNumber(OrderItemAccessBean orderitemAB,
                                java.lang.Integer i)
                         throws ECException,
                                FinderException,
                                CreateException,
                                javax.naming.NamingException,
                                java.rmi.RemoteException,
                                java.sql.SQLException
Inserts the part number to the order item.
Parameters:
orderitemAB - OrderItemAccessBean
i - enumeration group
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

invalidateAllocation

protected void invalidateAllocation(OrderItemAccessBean aabOI)
                             throws ECException,
                                    FinderException,
                                    CreateException,
                                    javax.naming.NamingException,
                                    java.rmi.RemoteException,
                                    java.sql.SQLException
Invalidate the allocation for the order item.
Parameters:
aabOI - OrderItemAccessBean
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

migrateInterestItemsToOrderItems

protected void migrateInterestItemsToOrderItems()
                                         throws ECException,
                                                FinderException,
                                                CreateException,
                                                javax.naming.NamingException,
                                                java.rmi.RemoteException,
                                                java.sql.SQLException
Migrate all interest items to order items when listId is specified.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

orderItemAdd

protected void orderItemAdd(java.lang.Integer i)
                     throws ECException,
                            FinderException,
                            CreateException,
                            javax.naming.NamingException,
                            java.rmi.RemoteException,
                            java.sql.SQLException
Add order item for enumeration group i. This is the case when the input partNumber_i is specified. If the parameter memberId_i is also specified, the catentry_id can be resolved by the partNumber_i and memberId_i. It calls insertOrderItem(i, catentry_id) to create an order item. If the parameter memberId_i is not specified, we call the finder method CatalogEntryAccessBean.findBySKUNumberAndStore() to resolve the catalog entry.
Parameters:
i - enumeration group.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

orderItemUpdate

protected void orderItemUpdate(java.lang.Integer i)
                        throws ECException,
                               FinderException,
                               CreateException,
                               javax.naming.NamingException,
                               java.rmi.RemoteException,
                               java.sql.SQLException
Update order item for enumeration group i. This is the case when the input orderItemId_i is specified. It calls updateOrderItem().
Parameters:
i - enumeration group.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

performExecute

public void performExecute()
                    throws ECException
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException

reset

public void reset()
reset all instance variables.
Overrides:
reset in class AbstractECTargetableCommand

resolveOrderId

protected void resolveOrderId()
                       throws ECException
Resolves order ids by calling MiscCmd.getListOfPendingOrders().
Throws:
ECException

resolveSku

protected java.lang.Long resolveSku(java.lang.Integer i,
                                    java.lang.Long catentry_id)
                             throws ECException,
                                    FinderException,
                                    CreateException,
                                    javax.naming.NamingException,
                                    java.rmi.RemoteException,
                                    java.sql.SQLException
It calls ResolveSkuCmd to resolve the sku and calls checkBuyable(). A side effect of this method is the instance variable iSavedItemSpecId is updated and will be used later.
Parameters:
i - enumeration group
catentry_id - catalog entry id.
Returns:
the resolved catalog entry id.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

setAddressId

public void setAddressId(java.util.Hashtable ahshAddress_id)
Set the address id parameters (optional).
Specified by:
setAddressId in interface OrderItemAddCmd
Parameters:
ahshAddress_id - a list of address id

setATPParms

public void setATPParms(ATPParameters newATPParms)
Set the ATP parameters.
Parameters:
newATPParms - ATPParameters

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.
Specified by:
setAttrName in interface OrderItemAddCmd
Parameters:
ahshAttr_name - a list of attribute names

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.
Specified by:
setAttrValue in interface OrderItemAddCmd
Parameters:
ahshAttr_value - a list of attribute values.

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.
Specified by:
setCatEntryId in interface OrderItemAddCmd
Parameters:
ahshCatentry_id - a list of catalog entry ids.

setComment

public void setComment(java.util.Hashtable ahshComment)
Set the comment parameters (optional).
Specified by:
setComment in interface OrderItemAddCmd
Parameters:
ahshComment - a list of comments

setConfigurationId

public void setConfigurationId(java.util.Hashtable ahshConfigurationId)
Set the configurationId parameter. This parameter is optional unless the OrderItem is for a dynamic kit with components.
Specified by:
setConfigurationId in interface OrderItemAddCmd
Parameters:
ahshConfigurationId - a list of configuration ids.

setContinue

public void setContinue(java.lang.String aContinue)
Set the continue parameter (optional).
Specified by:
setContinue in interface OrderItemAddCmd
Parameters:
aContinue - a string can be either "0" or "1".

setContractId

public void setContractId(java.util.Hashtable ahshContract_id)
Set the contract id parameters (optional). It is used to calculate the price.
Specified by:
setContractId in interface OrderItemAddCmd
Parameters:
ahshContract_id - a list of contract ids.

setCorrelationGroup

public void setCorrelationGroup(java.util.Hashtable ahshCorrelationGroup)
Set the correlation group parameters. It is optional.
Specified by:
setCorrelationGroup in interface OrderItemAddCmd
Parameters:
ahshCorrelationGroup - a list of correlation groups.

setDescription

public void setDescription(java.util.Hashtable ahshDescription)
Set the description parameters (optional).
Specified by:
setDescription in interface OrderItemAddCmd
Parameters:
ahshDescription - a list of order item descriptions.

setExpandConfigurationId

public void setExpandConfigurationId(java.util.Hashtable ahshExpandConfigurationId)
Set the expandConfigurationId parameter. This parameter is optional.
Specified by:
setExpandConfigurationId in interface OrderItemAddCmd
Parameters:
ahshExpandConfigurationId - a list of expand configuration ids.

setField1

public void setField1(java.util.Hashtable ahshField1)
Set the field1 parameters (optional).
Specified by:
setField1 in interface OrderItemAddCmd
Parameters:
ahshField1 - a list of field1.

setField2

public void setField2(java.util.Hashtable ahshField2)
Set the field2 parameters (optional).
Specified by:
setField2 in interface OrderItemAddCmd

setItemSpecId

protected void setItemSpecId(java.lang.Long anItemSpecId)
                      throws ECException
Sets the ItemSpecId
Parameters:
anItemSpecId - item spec id.
Throws:
ECException

setListId

public void setListId(java.lang.String[] aList_id)
Set the interest item list id parameters (optional).
Specified by:
setListId in interface OrderItemAddCmd
Parameters:
aList_id - an array of interest item list ids.

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.
Specified by:
setMemberId in interface OrderItemAddCmd
Parameters:
ahshMember_id - a list of member ids.

setOfferId

public void setOfferId(java.util.Hashtable ahshOffer_id)
Set the offer id parameters (optional). It is used to calculate the price.
Specified by:
setOfferId in interface OrderItemAddCmd
Parameters:
ahshOffer_id - a list of offer ids.

setOrderComment

public void setOrderComment(java.lang.String aOrderComment)
Set the Order comment parameter (optional).
Specified by:
setOrderComment in interface OrderItemAddCmd
Parameters:
aOrderComment - order comment.

setOrderDesc

public void setOrderDesc(java.lang.String aOrder_desc)
Set the Order description parameter (optional).
Specified by:
setOrderDesc in interface OrderItemAddCmd
Parameters:
aOrder_desc - order description.

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.
Specified by:
setOrderId in interface OrderItemAddCmd
Parameters:
aOrder_id - an array of order ids.

setOrderItemId

public void setOrderItemId(java.util.Hashtable ahshOrderitem_id)
Set the order item ids for which to update.
Specified by:
setOrderItemId in interface OrderItemUpdateCmd
Parameters:
ahshOrderitem_id - a list of order item ids.

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".
Specified by:
setOutOrderItemName in interface OrderItemAddCmd
Parameters:
aOut_orderitem_name - an array of out order item names.

setOutOrderName

public void setOutOrderName(java.lang.String[] aOut_order_name)
Set the out order name parameters (optional). If it is not set, the default name is "orderId".
Specified by:
setOutOrderName in interface OrderItemAddCmd
Parameters:
aOut_order_name - an array of out order names.

setPartNumber

public void setPartNumber(java.util.Hashtable ahshPart_number)
Set the part number parameters (optional).
Specified by:
setPartNumber in interface OrderItemAddCmd
Parameters:
ahshPart_number - a list of part numbers.

setQuantity

public void setQuantity(java.lang.Integer i,
                        java.lang.Double aQuantity)
Set the quantity parameters. It is mandatory if adding a new order item.
Parameters:
i - enumeration group
aQuantity - a quantity.

setQuantity

public void setQuantity(java.util.Hashtable ahshQuantity)
Set the quantity parameters. It is mandatory if adding a new order item.
Specified by:
setQuantity in interface OrderItemAddCmd
Parameters:
ahshQuantity - a list of quantities.

setRequestProperties

public void setRequestProperties(TypedProperty aRequestProperties)
                          throws ECException
Sets the request properties.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
aRequestProperties - request properties.
Throws:
ECException

setResolvedOrderId

protected void setResolvedOrderId(java.util.Vector resolvedOrderIdList)
Set the resolved id parameters. It is called by the sub class.
Parameters:
resolvedOrderIdList - a list of resolved order ids.

setShipmodeId

public void setShipmodeId(java.util.Hashtable ahshShipmode_id)
Set the ship mode id parameters (optional).
Specified by:
setShipmodeId in interface OrderItemAddCmd
Parameters:
ahshShipmode_id - a list of shipping mode ids.

setTradingId

public void setTradingId(java.util.Hashtable ahshTrading_id)
Set the trading id parameters (optional). It is used to calculate the price.
Specified by:
setTradingId in interface OrderItemAddCmd
Parameters:
ahshTrading_id - a list of trading ids.

setUom

public void setUom(java.util.Hashtable ahshUom)
Set the unit of measure parameters (optional).
Specified by:
setUom in interface OrderItemAddCmd
Parameters:
ahshUom - a list of UOMs.

unLockOrder

protected void unLockOrder(java.lang.String orderId)
                    throws ECException,
                           FinderException,
                           CreateException,
                           javax.naming.NamingException,
                           java.rmi.RemoteException,
                           java.sql.SQLException
Unlocks the order. If the status of the order is empty, it sets the default status to 'P'. If the status of the order is not empty, it calls checkValidStatus() to check the validation of the status.
Parameters:
orderId - order id.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateAddressId

protected void updateAddressId()
                        throws ECException,
                               FinderException,
                               CreateException,
                               javax.naming.NamingException,
                               java.rmi.RemoteException,
                               java.sql.SQLException
Update the shipping address for the all touched order items.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateAddressId

protected void updateAddressId(OrderItemAccessBean orderitemAB,
                               java.lang.Integer i)
                        throws ECException,
                               FinderException,
                               CreateException,
                               javax.naming.NamingException,
                               java.rmi.RemoteException,
                               java.sql.SQLException
Deprecated.  
Do nothing.
Parameters:
orderitemAB - OrderItemAccessBean
i - enumeration group
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateAddressId

protected void updateAddressId(java.util.Vector orderItems)
                        throws ECException,
                               FinderException,
                               CreateException,
                               javax.naming.NamingException,
                               java.rmi.RemoteException,
                               java.sql.SQLException
Updates the address for the order item. It also verifies that if the address is still a permanent address.
Parameters:
orderItems - a list of OrderItemAccessBean
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateAllShippingAndAddress

protected void updateAllShippingAndAddress()
                                    throws ECException,
                                           FinderException,
                                           CreateException,
                                           javax.naming.NamingException,
                                           java.rmi.RemoteException,
                                           java.sql.SQLException
It calls updateShippingAndAddress() to update the shipping address and shipping mode for each order item.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateComponentList

protected void updateComponentList(OrderItemAccessBean orderitemAB,
                                   java.lang.Integer i)
                            throws ECException,
                                   FinderException,
                                   CreateException,
                                   javax.naming.NamingException,
                                   java.rmi.RemoteException,
                                   java.sql.SQLException
Updates the component list for the order item.
Parameters:
orderitemAB - OrderItemAccessBean
i - enumeration group
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateCorrelationGroup

protected void updateCorrelationGroup(OrderItemAccessBean orderitemAB,
                                      java.lang.Integer i)
                               throws ECException,
                                      FinderException,
                                      CreateException,
                                      javax.naming.NamingException,
                                      java.rmi.RemoteException,
                                      java.sql.SQLException
Updates the correlation group for the order item.
Parameters:
orderitemAB - OrderItemAccessBean
i - enumeration group
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateCurrency

protected void updateCurrency(OrderAccessBean orderAB)
                       throws ECException,
                              FinderException,
                              CreateException,
                              javax.naming.NamingException,
                              java.rmi.RemoteException,
                              java.sql.SQLException
Updates the currency for the order. It uses the currency in the command context.
Parameters:
orderAB - OrderAccessBean
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateFulfillmentCenter

protected void updateFulfillmentCenter()
                                throws ECException,
                                       FinderException,
                                       CreateException,
                                       javax.naming.NamingException,
                                       java.rmi.RemoteException,
                                       java.sql.SQLException
Updates the fulfillment centers and checks for available inventory for all order items modified or created. If ATP inventory is enabled, it calls AllocateInventoryCmd. Otherwise it calls ResolveFulfillmentCenterCmd.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateItemSpecId

protected void updateItemSpecId(OrderItemAccessBean orderitemAB)
                         throws ECException
Updates the item spec id for the order item.
Parameters:
orderitemAB - OrderItemAccessBean
Throws:
ECException

updateOrder

protected void updateOrder()
                    throws ECException,
                           FinderException,
                           CreateException,
                           javax.naming.NamingException,
                           java.rmi.RemoteException
Updates order related information. It updates the comment and description fields of the order.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateOrderItem

protected void updateOrderItem(OrderItemAccessBean orderitemAB,
                               java.lang.Integer i)
                        throws ECException,
                               FinderException,
                               CreateException,
                               javax.naming.NamingException,
                               java.rmi.RemoteException,
                               java.sql.SQLException
Updates the order item. It calls the following methods:
Parameters:
orderitemAB - OrderItemAccessBean
i - enumeration group
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateOrderItem

protected void updateOrderItem(java.lang.Integer i,
                               java.lang.Long orderitem_id)
                        throws ECException,
                               FinderException,
                               CreateException,
                               javax.naming.NamingException,
                               java.rmi.RemoteException,
                               java.sql.SQLException
Deprecated.  
Updates the order item. It first tries to find the order item from database with key orderitem_id, it then calls updateOrderItem(OrderItemAccessBean, Integer) to do the actual updating.
Parameters:
i - enumeration group
orderitem_id - order item id
Throws:
ECApplicationException - with message key _ERR_INVALID_ORDER_ITEM_ID if the order item cannot be found in the database.
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException
ECException

updateOutOrderItemId

protected void updateOutOrderItemId()
Adds the ids of the newly created order items to the response properties with key being the input parameter value of outOrderItemName concatenated with "_i" and the value being the id of the order item.

updateOutOrderItemName

protected void updateOutOrderItemName()
Adds the ids of the created and updated order items to the response properties with key being the input parameter value of outOrderItemName and the value being the String array of order item ids.

updateOutOrderName

protected void updateOutOrderName()
Adds the ids of the created and updated orders to the response properties with key being the input parameter value of outOrderName and the value being the String array of order ids.

updatePrice

protected void updatePrice()
                    throws ECException,
                           FinderException,
                           CreateException,
                           javax.naming.NamingException,
                           java.rmi.RemoteException,
                           java.sql.SQLException
Calculates the best price for the all touched order items.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updatePrice

protected void updatePrice(OrderItemAccessBean orderitemAB,
                           java.lang.Integer i)
                    throws ECException,
                           FinderException,
                           CreateException,
                           javax.naming.NamingException,
                           java.rmi.RemoteException,
                           java.sql.SQLException
Deprecated.  
It does nothing.
Parameters:
orderitemAB - OrderItemAccessBean
i - enumeration group
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updatePrice

protected void updatePrice(java.util.Vector orderItems,
                           java.lang.String currency)
                    throws ECException,
                           FinderException,
                           CreateException,
                           javax.naming.NamingException,
                           java.rmi.RemoteException,
                           java.sql.SQLException
Calculates the best price for the input orderitems. It calls GetContractUnitPriceCmd task command to calculate the price. If GetContractUnitPriceCmd is not available, it calls GetBaseUnitPriceCmd. If input trading agreements and/or offers are specified, they will be used providing they are valid. Otherwise, eligible trading agreements will be obtained.

If price has been obtainted previously, the price will be refreshed according to the Price Refresh Flag (PRICEREFFLAGS) in STORE as follows: 0: Default, same as 1 except that it will not save the trading id and the offer id. 1: This means useCurrentOnly. This uses the prices directly referenced by the OrderItems. Fail if they can no longer be used. 2: This means useCurrentOrSearchAgain. This is the same as useCurrentOnly, but instead of failing when they can no longer be used, it searches the ones that were originally searched when the OrderItems were created or updated with new trading ids/offer ids specified. 4: This means alwaysSearchAgain. This option always searches the prices that were originally searched when the OrderItems were created or updated with new trading ids/offer ids specified.

Parameters:
orderItems - a list of OrderItemAccessBean
currency - currency
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateQuantity

protected boolean updateQuantity(OrderItemAccessBean orderitemAB,
                                 java.lang.Integer i)
                          throws ECException,
                                 FinderException,
                                 CreateException,
                                 javax.naming.NamingException,
                                 java.rmi.RemoteException,
                                 java.sql.SQLException
Updates the quantity for the order item. If quantity = 0, the order item will be removed. If quantity < 0, InvalidParameterValueException is thrown.
Parameters:
orderitemAB - OrderItemAccessBean
i - enumeration group
Returns:
false if the order item is deleted, true in other cases.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateResourceList

protected void updateResourceList()
                           throws ECException,
                                  FinderException,
                                  CreateException,
                                  javax.naming.NamingException,
                                  java.rmi.RemoteException
Updates the resources list. It is called by validateParameters() and the resource list is used in the getResources().
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateShipModeId

protected void updateShipModeId()
                         throws ECException,
                                FinderException,
                                CreateException,
                                javax.naming.NamingException,
                                java.rmi.RemoteException,
                                java.sql.SQLException
Update the shipping modes for the all touched order items.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateShipModeId

protected void updateShipModeId(java.util.Vector orderItems)
                         throws ECException,
                                FinderException,
                                CreateException,
                                javax.naming.NamingException,
                                java.rmi.RemoteException,
                                java.sql.SQLException
Updates the shipping mode id for all order items.
Parameters:
orderItems - a list of OrderItemAccessBean
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateShipModeId

protected void updateShipModeId(OrderItemAccessBean orderitemAB,
                                java.lang.Integer i)
                         throws ECException,
                                FinderException,
                                CreateException,
                                javax.naming.NamingException,
                                java.rmi.RemoteException,
                                java.sql.SQLException
Deprecated.  
Do nothing.
Parameters:
orderitemAB - OrderItemAccessBean
i - enumeration group
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

updateShippingAndAddress

protected void updateShippingAndAddress(OrderItemAccessBean orderitemAB,
                                        java.lang.Integer i)
                                 throws ECException,
                                        FinderException,
                                        CreateException,
                                        javax.naming.NamingException,
                                        java.rmi.RemoteException,
                                        java.sql.SQLException
It calls updateAddressId() and updateShipModeId() to update the shipping address and shipping mode for the order item.
Parameters:
orderitemAB - OrderItemAccessBean
i - enumeration group
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException

validateParameters

public void validateParameters()
                        throws ECException
Verify the input parameters.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException

validateTradingPaymentMethods

protected void validateTradingPaymentMethods()
                                      throws ECException,
                                             FinderException,
                                             CreateException,
                                             javax.naming.NamingException,
                                             java.rmi.RemoteException,
                                             java.sql.SQLException
Validate the trading agreements used by the orderitems in an order by checking if they define compatible payment methods and are associated with the same account as the other orderitems in the order.
Throws:
ECException
FinderException
CreateException
javax.naming.NamingException
java.rmi.RemoteException
java.sql.SQLException