atg.commerce.order.purchase
Class CartModifierFormHandler

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.droplet.EmptyFormHandler
              extended by atg.droplet.GenericFormHandler
                  extended by atg.commerce.order.purchase.PurchaseProcessFormHandler
                      extended by atg.commerce.order.purchase.CartModifierFormHandler
All Implemented Interfaces:
atg.commerce.util.PipelineErrorHandler, DropletFormHandler, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class CartModifierFormHandler
extends PurchaseProcessFormHandler

This formhandler is used to modify a ShoppingCart by adding items to it, deleting items from it, modifying the quantities of items in it, and preparing it for the checkout process.

See Also:
GenericFormHandler, PurchaseProcessFormHandler

Field Summary
static java.lang.String CLASS_VERSION
           
static java.lang.String MSG_AMBIGUOUS_INPUT_FOR_ADD
           
static java.lang.String MSG_ERROR_ADDING_TO_ORDER
           
static java.lang.String MSG_ERROR_MOVE_TO_PURCHASE_INFO
           
static java.lang.String MSG_ERROR_REMOVING_ITEM
           
static java.lang.String MSG_ERROR_UPDATE_ORDER
           
static java.lang.String MSG_INVALID_QUANTITY
           
static java.lang.String MSG_NO_ITEMS_TO_ADD
           
static java.lang.String MSG_NO_ORDER_TO_MODIFY
           
static java.lang.String MSG_QUANTITY_LESSTHAN_OR_EQUALTO_ZERO
           
static java.lang.String MSG_QUANTITY_LESSTHAN_ZERO
           
static java.lang.String MSG_UNSUPPORTED_RELATIONSHIP
           
 
Fields inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUE
 
Fields inherited from class atg.droplet.GenericFormHandler
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
CartModifierFormHandler()
           
 
Method Summary
protected  void addConfigurableItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Adds one or more commerce items to the order (the shopping cart), using configurableItemTypeName as the default commerce item type.
protected  void addConfigurableItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, boolean pIsGift)
          Deprecated. replaced by addConfigurableItemToOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)
protected  void addItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Adds one or more commerce items to the order (the shopping cart), using commerceItemType as the default commerce item type.
protected  void addItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, boolean pIsGift)
          Deprecated. replaced by addItemToOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)
protected  void addItemToShippingGroup(CommerceItem pItem, int pItemIndex)
          Associate a commerce item with the shipping group specified by the shippingGroup property.
protected  void addMultipleItemsToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Adds commerce items to the order (the shopping cart).
protected  void addMultipleItemsToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, boolean pIsGift)
          Deprecated. replaced by addConfigurableItemToOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)
protected  void applyValueDictionary(java.lang.Object pBean, java.util.Dictionary pValues, java.lang.String pPropertyPathPrefix)
          Copy properties from the value dictionary or one of its descendents.
protected  CommerceItem createCommerceItem(int pItemIndex, java.lang.String pCatalogKey)
          Create a commerce item and add it to the order.
protected  void createConfigurableSubitems(CommerceItem pItem, int pItemIndex)
          Create subitems for a base configurable commerce item.
protected  void createInStorePickupShippingGroups(Order pOrder)
          When an item is added to the cart if it contains a locationId in the AddCommerceItemInfo object then create an InStorePickupShippingGroup for the item to be added to automatically.
protected  void deleteItems(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Delete all items from the order whose id appears in the RemovalCommerceIds property.
protected  void deleteItemsByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is responsible for deleting items from the order by shipping group commerce item relationship id.
protected  void doAddItemsToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Add one or more items to the order (the shopping cart).
 int getAddItemCount()
          Returns the number of elements to allocate in the items array
 java.lang.String getAddItemInfoClass()
          Returns the name of the class to be used for elements in the items array
protected  java.util.List<CommerceItem> getAddItemsToOrderResult()
          Gets the results of addItemsToOrder.
 java.lang.String getAddItemToOrderChainId()
          Returns property AddItemToOrderChainId
 java.lang.String getAddItemToOrderErrorURL()
          Returns property AddItemToOrderErrorURL
 java.lang.String getAddItemToOrderPricingOp()
          Returns the pricing operation that should be performed when an item is added to the order
 java.lang.String getAddItemToOrderSuccessURL()
          Returns property AddItemToOrderSuccessURL
 java.lang.String getAddMultipleItemsToOrderErrorURL()
          Returns property AddMultipleItemsToOrderErrorURL
 java.lang.String getAddMultipleItemsToOrderSuccessURL()
          Returns property AddMultipleItemsToOrderSuccessURL
protected  java.lang.String getCatalogKey(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Get a string that will be used to identify the catalog to use when obtaining a catalogRef and productRef for the creation of a commerce item.
 java.lang.String[] getCatalogRefIds()
          Returns property CatalogRefIds
 java.lang.String[] getCommerceIds()
          Return the list of CommerceIds to be operated on.
 java.lang.String getCommerceItemType()
          Returns the default item type for added commerce items
 java.lang.String getConfigurableItemTypeName()
          Returns the configurableItemTypeName
 CreditCard getCreditCard()
          Returns credit card bean to use for modifying of billing groups
 java.lang.String getDefaultInStorePickupShippingGroupType()
          Gets the defaultInStorePickupShippingGroupType.
protected  java.util.List getDeletedSkus()
           
 java.lang.String getDeleteItemsFromOrderPricingOp()
          Returns the pricing operation that should be performed when an item is deleted from the order
 GiftCertificate getGiftCertificate()
          Returns gift certificate bean to use for modifying of billing grps
 java.lang.String getGiftlistId()
          The giftlist that an item was added from
 java.lang.String getGiftlistItemId()
          The giftlist item being added
 HardgoodShippingGroup getHardgoodShippingGroup()
          Returns hardgood shipping group bean
 boolean getInvalidQuantityCancelsAdd()
          Determine if the FormHandler should treat invalid quantities as errors when adding multiple items to an order in a single form submission.
 atg.commerce.order.purchase.AddCommerceItemInfo[] getItems()
          Returns items array of property holders for add operations
 java.lang.String getLocationId()
           
 java.lang.String getModifyOrderPricingOp()
          Returns the pricing operation that should be performed when the order is updated
 java.lang.String getMoveToPurchaseInfoByRelIdErrorURL()
          Return the moveToPurchaseInfoByRelIdErrorURL property.
 java.lang.String getMoveToPurchaseInfoByRelIdSuccessURL()
          Return the moveToPurchaseInfoByRelIdSuccessURL property.
 java.lang.String getMoveToPurchaseInfoChainId()
          Returns property MoveToPurchaseInfoChainId
 java.lang.String getMoveToPurchaseInfoErrorURL()
          Returns property MoveToPurchaseInfoErrorURL
 java.lang.String getMoveToPurchaseInfoSuccessURL()
          Returns property MoveToPurchaseInfoSuccessURL
 PaymentGroup getPaymentGroup()
          Returns property PaymentGroup
 java.lang.String getProductId()
          Returns property ProductId
 java.lang.String[] getProductIds()
          Returns productIds
 long getQuantity()
          Returns property Quantity
 long getQuantity(java.lang.String pKey, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Retrieve the quantity that should be used for the given catalog reference id, commerce item id or relationship id.
 long getQuantityByCatalogRefId(java.lang.String pCatalogRefId, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Retrieve the quantity that should be used for the given catalog reference id
 long getQuantityByCommerceId(java.lang.String pCommerceId, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Retrieve the quantity that should be used for the given commerce item id
 long getQuantityByRelationshipId(java.lang.String pRelationshipId, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Retrieve the quantity that should be used for the given relationship id
 java.lang.String[] getRemovalCatalogRefIds()
          Returns property RemovalCatalogRefIds
 java.lang.String[] getRemovalCommerceIds()
          Returns property RemovalCommerceIds
 java.lang.String[] getRemovalRelationshipIds()
          Return the removalRelationshipIds property.
 java.lang.String getRemoveAndAddItemToOrderErrorURL()
          Returns property RemoveAndAddItemToOrderErrorURL
 java.lang.String getRemoveAndAddItemToOrderSuccessURL()
          Returns property RemoveAndAddItemToOrderSuccessURL
 java.lang.String getRemoveItemFromOrderByRelationshipIdErrorURL()
          Return the RemoveItemFromOrderByRelationshipIdErrorURL property.
 java.lang.String getRemoveItemFromOrderByRelationshipIdSuccessURL()
          Return the RemoveItemFromOrderByRelationshipIdSuccessURL property.
 java.lang.String getRemoveItemFromOrderErrorURL()
          Returns property RemoveItemFromOrderErrorURL
 java.lang.String getRemoveItemFromOrderSuccessURL()
          Returns property RemoveItemFromOrderSuccessURL
 java.lang.String getRepriceOrderErrorURL()
          Return the RepriceOrderErrorURL property.
 java.lang.String getRepriceOrderSuccessURL()
          Return the RepriceOrderSuccessURL property.
 java.lang.String getSetOrderByRelationshipIdErrorURL()
          Return the SetOrderByRelationshipIdErrorURL property.
 java.lang.String getSetOrderByRelationshipIdSuccessURL()
          Return the setOrderByRelationshipIdSuccessURL property.
 java.lang.String getSetOrderChainId()
          Returns property SetOrderChainId
 java.lang.String getSetOrderErrorURL()
          Returns property SetOrderErrorURL
 java.lang.String getSetOrderSuccessURL()
          Returns property SetOrderSuccessURL
 ShippingGroup getShippingGroup()
          Returns property ShippingGroup.
protected  java.util.List getShippingGroupCommerceItemRelationships(Order pOrder)
          Get a list of all the shippingGroupCommerceItemRelationships that are contained within a particular order.
 java.lang.String getSiteId()
          Returns property SiteId
 java.util.Dictionary getValue()
          Returns property Value
 boolean handleAddConfigurableItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is used to add configurable items to the order.
 boolean handleAddItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is used to add items to the order.
 boolean handleAddMultipleItemsToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is used to add items to the order.
 boolean handleMoveToPurchaseInfo(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is called when the user wants to starts the CHECKOUT process for an order.
 boolean handleMoveToPurchaseInfoByCommerceId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is called when the user wants to starts the CHECKOUT process for an order.
 boolean handleMoveToPurchaseInfoByRelId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is called when the user wants to starts the CHECKOUT process for an order.
 boolean handleRemoveAndAddItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is meant to be used on a page where a user wants to both remove an item from the order as well as add an item to an order.
 boolean handleRemoveItemFromOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This will make calls to the preRemoveItemFromOrder method and then will call the deleteItems method.
 boolean handleRemoveItemFromOrderByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is similiar to the handleRemoveItemFromOrder method, except that it removes items from the order via ShippingGroupCommerceItemRelationship object Ids.
 boolean handleSetOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method handles all of the work necessary to save an Order.
 boolean handleSetOrderByCommerceId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is responsible for adjusting the quantities of commerce items that exist in a users shopping cart.
 boolean handleSetOrderByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is responsible for adjusting the quantities of commerce items that exist in a users shopping cart.
 boolean isCheckForChangedQuantity()
          Determine if the FormHandler should check for changes in quantities of commerce items.
protected  boolean mergeItemInputForAdd(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pCommerceItemType, boolean pUseProductIds)
          Construct or fill in default values in an items array containing input values for the methods involved in adding items to orders.
protected  boolean mergeValueDictionaries(java.util.Dictionary pCommonValues, java.util.Dictionary pItemValues, int pItemIndex, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pPropertyPathPrefix)
          Merges the common value dictionary into one item-specific value dictionary.
protected  boolean modifyCommerceItemsProperties(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.util.Map pQuantityChangedItems, java.util.Map pRemovedItems)
          This method is invoked from the modifyOrder*() methods in order to allow subclasses an opportunity to implement additional processing after the quantity of items in the order has been changed.
protected  void modifyOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Modify the order (accessed from the order property) based on the changes in the request.
protected  void modifyOrderByCommerceId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Modify the order (accessed from the order property) based on the changes in the request.
protected  void modifyOrderByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method causes the contents of a users order to be adjusted by quantity.
protected  void modifyOrderPostReprice(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.util.Map pQuantityChangedItems, java.util.Map pRemovedItems)
           
 void postAddItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called after all work is done by the handleAddItemToOrder method.
 void postAddMultipleItemsToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called after all work is done by the handleAddMultipleItemsToOrder method.
 void postMoveToPurchaseInfo(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called after all processing is done by the moveToPurchaseInfo method.
 void postRemoveAndAddItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called after all processing is done by the handleRemoveAndAddItemToOrder method.
 void postRemoveItemFromOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called after all processing is done by the removeItemFromOrder method.
 void postRemoveItemFromOrderByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is currently empty.
 void postSetOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called after all processing is done by the handleSetOrder method.
 void postSetOrderByCommerceId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called after all processing is done by the handleSetOrderByCommerceId method.
 void postSetOrderByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called after all processing is done by the handleSetOrderByRelationshipId method.
 void preAddItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called before any work is done by the handleAddItemToOrder method.
 void preAddMultipleItemsToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called before any work is done by the handleAddMultipleItemsToOrder method.
 void preMoveToPurchaseInfo(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called before any processing is done by the moveToPurchaseInfo method.
 void preRemoveAndAddItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called before any processing is done by the handleRemoveAndAddItemToOrder method.
 void preRemoveItemFromOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called before any processing is done by the removeItemFromOrder method.
 void preRemoveItemFromOrderByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is currently empty.
 void preSetOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called before any processing is done by the handleSetOrder method.
 void preSetOrderByCommerceId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called before any processing is done by the handleSetOrderByCommerceId method.
 void preSetOrderByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called before any processing is done by the handleSetOrderByRelationshipId method.
protected  void processGiftAddition(CommerceItem pItem, int pItemIndex)
          Perform giftlist related processing for an item being ordered from a giftlist.
protected  void removeInStorePickupShippingGroups(Order pOrder)
          Searches through the order and removes any InStorePickupShippingGroups that are no longer associated with any items on the order.
protected  void runProcessAddItemToOrder(Order pOrder, CommerceItem pCommerceItem, PricingModelHolder pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
          Run the pipeline which should be executed when the handleAddItemToOrder method is invoked This method will add pCommerceItem to pExtraParameters unless the key PipelineConstants.COMMERCEITEM is already in the map
protected  void runProcessAddItemToOrder(Order pOrder, PricingModelHolder pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
          Deprecated. Use runProcessAddItemToOrder(Order, CommerceItem, PricingModelHolder, Locale, RepositoryItem, Map) instead
protected  void runProcessMoveToPurchaseInfo(Order pOrder, PricingModelHolder pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
          Run the pipeline which should be executed when the handleMoveToPurchaseInfo method is invoked
protected  void runProcessSendScenarioEvent(Order pOrder, CommerceItem pItem, long pQuantity, java.lang.String pType)
          The runProcessSendScenarioEvent method sends a scenario event.
protected  void runProcessSendScenarioEvent(Order pOrder, CommerceItem pItem, long pQuantity, java.lang.String pType, java.lang.String pSiteId)
          The runProcessSendScenarioEvent method sends a scenario event.
protected  void runProcessSendScenarioEvent(Order pOrder, CommerceItem pItem, java.lang.String pType, java.util.Map pParams)
          The runProcessSendScenarioEvent method sends a scenario event .
protected  void runProcessSendScenarioEvent(Order pOrder, CommerceItem pItem, java.lang.String pType, java.lang.String pSiteId, java.util.Map pParams)
          The runProcessSendScenarioEvent method sends a scenario event .
protected  void runProcessSetOrder(Order pOrder, PricingModelHolder pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
          Run the pipeline which should be executed when the handleSetOrder method is invoked
 void setAddItemCount(int pAddItemCount)
          Sets the number of elements to allocate in the items array and allocates the array
 void setAddItemInfoClass(java.lang.String pAddItemInfoClass)
          Sets the name of the class to be used for elements in the items array
protected  void setAddItemsToOrderResult(java.util.List<CommerceItem> pAddItemsToOrderResult)
          Sets the list of items returned from addItemsToOrder.
 void setAddItemToOrderChainId(java.lang.String pAddItemToOrderChainId)
          Sets property AddItemToOrderChainId
 void setAddItemToOrderErrorURL(java.lang.String pAddItemToOrderErrorURL)
          Sets property AddItemToOrderErrorURL
 void setAddItemToOrderPricingOp(java.lang.String pAddItemToOrderPricingOp)
          This property should be set to the type of pricing operation that should be executed when an item is added to the order.
 void setAddItemToOrderSuccessURL(java.lang.String pAddItemToOrderSuccessURL)
          Sets property AddItemToOrderSuccessURL
 void setAddMultipleItemsToOrderErrorURL(java.lang.String pAddMultipleItemsToOrderErrorURL)
          Sets property AddMultipleItemsToOrderErrorURL
 void setAddMultipleItemsToOrderSuccessURL(java.lang.String pAddMultipleItemsToOrderSuccessURL)
          Sets property AddMultipleItemsToOrderSuccessURL
 void setCatalogRefIds(java.lang.String[] pCatalogRefIds)
          Sets property CatalogRefIds
 void setCheckForChangedQuantity(boolean pCheckForChangedQuantity)
          Set the checkForChangedQuantity property.
 void setCommerceIds(java.lang.String[] pCommerceIds)
          Sets the CommerceIds property which is a list of the CommerceItems to be operated on.
protected  void setCommerceItemProperties(CommerceItem pItem, int pItemIndex)
          Fill in "extra" commerce item properties.
 void setCommerceItemType(java.lang.String pCommerceItemType)
          Sets the default item type for added commerce items
 void setConfigurableItemTypeName(java.lang.String pConfigurableItemTypeName)
          Sets the configurableItemTypeName
 void setCreditCard(CreditCard pCreditCard)
          Sets credit card bean to use for modifying of billing groups
 void setDefaultInStorePickupShippingGroupType(java.lang.String pDefaultInStorePickupShippingGroupType)
          Sets the defaultInStorePickupShippingGroupType.
protected  void setDeletedSkus(java.util.List pDeletedSkus)
          Deleted skus is a list that maintains which items were removed by the deleteItems call and is consulted in the addItemToOrder call to determine whether a quantity of 0 is being added or whether it is simply an artifact of a design that calls handleAddItemToOrder in the handleRemoveAndAddItem.
 void setDeleteItemsFromOrderPricingOp(java.lang.String pDeleteItemsFromOrderPricingOp)
          This property should be set to the type of pricing operation that should be executed when an item is deleted from the order.
 void setGiftCertificate(GiftCertificate pGiftCertificate)
          Sets gift certificate bean to use for modifying of billing grps
 void setGiftlistId(java.lang.String pGiftlistId)
          Specifies the id of the Giftlist.
 void setGiftlistItemId(java.lang.String pGiftlistItemId)
          Specifies the id of the Giftlist Item
 void setHardgoodShippingGroup(HardgoodShippingGroup pHardgoodShippingGroup)
          Sets hardgood shipping group bean
 void setInvalidQuantityCancelsAdd(boolean pInvalidQuantityCancelsAdd)
          Set the invalidQuantityCancelsAdd property.
 void setLocationId(java.lang.String pLocationId)
           
 void setModifyOrderPricingOp(java.lang.String pModifyOrderPricingOp)
          This property should be set to the type of pricing operation that should be executed when the order is updated without adding or removing an item (e.g.
 void setMoveToPurchaseInfoByRelIdErrorURL(java.lang.String pMoveToPurchaseInfoByRelIdErrorURL)
          Set the moveToPurchaseInfoByRelIdErrorURL property.
 void setMoveToPurchaseInfoByRelIdSuccessURL(java.lang.String pMoveToPurchaseInfoByRelIdSuccessURL)
          Set the moveToPurchaseInfoByRelIdSuccessURL property.
 void setMoveToPurchaseInfoChainId(java.lang.String pMoveToPurchaseInfoChainId)
          Sets property MoveToPurchaseInfoChainId
 void setMoveToPurchaseInfoErrorURL(java.lang.String pMoveToPurchaseInfoErrorURL)
          Sets property MoveToPurchaseInfoErrorURL
 void setMoveToPurchaseInfoSuccessURL(java.lang.String pMoveToPurchaseInfoSuccessURL)
          Sets property MoveToPurchaseInfoSuccessURL
 void setPaymentGroup(PaymentGroup pPaymentGroup)
          Sets payment group bean to use for modifying payment groups
 void setProductId(java.lang.String pProductId)
          Sets property ProductId
 void setProductIds(java.lang.String[] pProductIds)
          Sets productIds
 void setQuantity(long pQuantity)
          Sets property Quantity
 void setRemovalCatalogRefIds(java.lang.String[] pRemovalCatalogRefIds)
          Sets property RemovalCatalogRefIds
 void setRemovalCommerceIds(java.lang.String[] pRemovalCommerceIds)
          Sets property RemovalCommerceIds
 void setRemovalRelationshipIds(java.lang.String[] pRemovalRelationshipIds)
          Set the removalRelationshipIds property.
 void setRemoveAndAddItemToOrderErrorURL(java.lang.String pRemoveAndAddItemToOrderErrorURL)
          Sets property RemoveAndAddItemToOrderErrorURL
 void setRemoveAndAddItemToOrderSuccessURL(java.lang.String pRemoveAndAddItemToOrderSuccessURL)
          Sets property RemoveAndAddItemToOrderSuccessURL
 void setRemoveItemFromOrderByRelationshipIdErrorURL(java.lang.String pRemoveItemFromOrderByRelationshipIdErrorURL)
          Set the RemoveItemFromOrderByRelationshipIdErrorURL property.
 void setRemoveItemFromOrderByRelationshipIdSuccessURL(java.lang.String pRemoveItemFromOrderByRelationshipIdSuccessURL)
          Set the RemoveItemFromOrderByRelationshipIdSuccessURL property.
 void setRemoveItemFromOrderErrorURL(java.lang.String pRemoveItemFromOrderErrorURL)
          Sets property RemoveItemFromOrderErrorURL
 void setRemoveItemFromOrderSuccessURL(java.lang.String pRemoveItemFromOrderSuccessURL)
          Sets property RemoveItemFromOrderSuccessURL
 void setRepriceOrderErrorURL(java.lang.String pRepriceOrderErrorURL)
          Set the RepriceOrderErrorURL property.
 void setRepriceOrderSuccessURL(java.lang.String pRepriceOrderSuccessURL)
          Set the RepriceOrderSuccessURL property.
 void setSetOrderByRelationshipIdErrorURL(java.lang.String pSetOrderByRelationshipIdErrorURL)
          Set the SetOrderByRelationshipIdErrorURL property.
 void setSetOrderByRelationshipIdSuccessURL(java.lang.String pSetOrderByRelationshipIdSuccessURL)
          Set the setOrderByRelationshipIdSuccessURL property.
 void setSetOrderChainId(java.lang.String pSetOrderChainId)
          Sets property SetOrderChainId
 void setSetOrderErrorURL(java.lang.String pSetOrderErrorURL)
          Sets property SetOrderErrorURL
 void setSetOrderSuccessURL(java.lang.String pSetOrderSuccessURL)
          Sets property SetOrderSuccessURL
 void setShippingGroup(ShippingGroup pShippingGroup)
          Sets shipping group bean to use for modifying the shipping groups
 void setSiteId(java.lang.String pSiteId)
          Sets property SiteId
protected  void updateOrder(Order pOrder, java.lang.String pMsgId, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Utility method to update an order and process any exception that happens during the update.
protected  boolean validateShippingGroupForAdd(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Validate shipping information for add operations.
 
Methods inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler
acquireTransactionLock, acquireTransactionLock, afterSet, beforeSet, checkFormRedirect, commitTransaction, copyConfiguration, createRepriceParameterMap, defaultLocalLockManager, defaultUserProfile, doStartService, ensureTransaction, formatUserMessage, formatUserMessage, formatUserMessage, formatUserMessage, generatePropertyPath, getClaimableManager, getCommerceIdentifierPaymentInfoContainer, getCommerceItemManager, getCommerceItemShippingInfoContainer, getCommerceProfileTools, getCommercePropertyManager, getConfiguration, getCurrentTransaction, getDefaultLocale, getGiftlistManager, getHandlingInstructionManager, getLocalLockManager, getOrder, getOrderManager, getPaymentGroupManager, getPaymentGroupMapContainer, getPipelineManager, getPriceList, getPriceListId, getPriceListManager, getProfile, getProfileRepository, getPurchaseProcessHelper, getRepeatingRequestMonitor, getRepriceOrderChainId, getResourceBundle, getResourceBundle, getResourceBundleName, getSessionExpirationURL, getShippingGroupManager, getShippingGroupMapContainer, getShoppingCart, getTransactionManager, getUserLocale, getUserLocale, getUserPricingModels, handlePipelineError, isConcurrentUpdate, isEnsureTransaction, isFormSubmission, isTransactionCreated, isTransactionMarkedAsRollBack, isUseLocksAroundTransactions, isUseRequestLocale, processException, processPipelineErrors, releaseTransactionLock, releaseTransactionLock, runProcess, runProcess, runProcess, runProcessRepriceOrder, runProcessRepriceOrder, runRepricingProcess, setClaimableManager, setCommerceIdentifierPaymentInfoContainer, setCommerceItemManager, setCommerceItemShippingInfoContainer, setCommerceProfileTools, setCommercePropertyManager, setConfiguration, setCurrentTransaction, setDefaultLocale, setEnsureTransaction, setGiftlistManager, setHandlingInstructionManager, setLocalLockManager, setOrder, setOrderManager, setPaymentGroupManager, setPaymentGroupMapContainer, setPipelineManager, setPriceListId, setPriceListManager, setProfile, setProfileRepository, setPurchaseProcessHelper, setRepeatingRequestMonitor, setRepriceOrderChainId, setSessionExpirationURL, setShippingGroupManager, setShippingGroupMapContainer, setShoppingCart, setTransactionCreated, setTransactionManager, setTransactionToRollbackOnly, setUseLocksAroundTransactions, setUseRequestLocale, setUserLocale, setUserPricingModels, transactionLockName, unsetTransactionCreated
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
 
Methods inherited from class atg.droplet.EmptyFormHandler
afterGet, beforeGet
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values

MSG_INVALID_QUANTITY

public static final java.lang.String MSG_INVALID_QUANTITY
See Also:
Constant Field Values

MSG_ERROR_UPDATE_ORDER

public static final java.lang.String MSG_ERROR_UPDATE_ORDER
See Also:
Constant Field Values

MSG_ERROR_MOVE_TO_PURCHASE_INFO

public static final java.lang.String MSG_ERROR_MOVE_TO_PURCHASE_INFO
See Also:
Constant Field Values

MSG_ERROR_REMOVING_ITEM

public static final java.lang.String MSG_ERROR_REMOVING_ITEM
See Also:
Constant Field Values

MSG_UNSUPPORTED_RELATIONSHIP

public static final java.lang.String MSG_UNSUPPORTED_RELATIONSHIP
See Also:
Constant Field Values

MSG_NO_ITEMS_TO_ADD

public static final java.lang.String MSG_NO_ITEMS_TO_ADD
See Also:
Constant Field Values

MSG_QUANTITY_LESSTHAN_OR_EQUALTO_ZERO

public static final java.lang.String MSG_QUANTITY_LESSTHAN_OR_EQUALTO_ZERO
See Also:
Constant Field Values

MSG_QUANTITY_LESSTHAN_ZERO

public static final java.lang.String MSG_QUANTITY_LESSTHAN_ZERO
See Also:
Constant Field Values

MSG_NO_ORDER_TO_MODIFY

public static final java.lang.String MSG_NO_ORDER_TO_MODIFY
See Also:
Constant Field Values

MSG_ERROR_ADDING_TO_ORDER

public static final java.lang.String MSG_ERROR_ADDING_TO_ORDER
See Also:
Constant Field Values

MSG_AMBIGUOUS_INPUT_FOR_ADD

public static final java.lang.String MSG_AMBIGUOUS_INPUT_FOR_ADD
See Also:
Constant Field Values
Constructor Detail

CartModifierFormHandler

public CartModifierFormHandler()
Method Detail

setDeletedSkus

protected void setDeletedSkus(java.util.List pDeletedSkus)
Deleted skus is a list that maintains which items were removed by the deleteItems call and is consulted in the addItemToOrder call to determine whether a quantity of 0 is being added or whether it is simply an artifact of a design that calls handleAddItemToOrder in the handleRemoveAndAddItem.

Parameters:
pDeletedSkus - - the list of skus that were removed

getDeletedSkus

protected java.util.List getDeletedSkus()
Returns:
the list of deleted skus

setCommerceItemType

public void setCommerceItemType(java.lang.String pCommerceItemType)
Sets the default item type for added commerce items


getCommerceItemType

public java.lang.String getCommerceItemType()
Returns the default item type for added commerce items


getConfigurableItemTypeName

public java.lang.String getConfigurableItemTypeName()
Returns the configurableItemTypeName


setConfigurableItemTypeName

public void setConfigurableItemTypeName(java.lang.String pConfigurableItemTypeName)
Sets the configurableItemTypeName


setCatalogRefIds

public void setCatalogRefIds(java.lang.String[] pCatalogRefIds)
Sets property CatalogRefIds

Parameters:
pCatalogRefIds - a String[] value

getCatalogRefIds

public java.lang.String[] getCatalogRefIds()
Returns property CatalogRefIds

Returns:
a String[] value

setCommerceIds

public void setCommerceIds(java.lang.String[] pCommerceIds)
Sets the CommerceIds property which is a list of the CommerceItems to be operated on.

Parameters:
pCommerceIds - a String[] value of the commerce items to be operated on.

getCommerceIds

public java.lang.String[] getCommerceIds()
Return the list of CommerceIds to be operated on.

Returns:
a String[] value of the CommerceItem ids to be operated on.

setProductIds

public void setProductIds(java.lang.String[] pProductIds)
Sets productIds

Parameters:
pProductIds - a String[] value

getProductIds

public java.lang.String[] getProductIds()
Returns productIds

Returns:
a String[] value

setProductId

public void setProductId(java.lang.String pProductId)
Sets property ProductId

Parameters:
pProductId - a String value

getProductId

public java.lang.String getProductId()
Returns property ProductId

Returns:
a String value

setSiteId

public void setSiteId(java.lang.String pSiteId)
Sets property SiteId

Parameters:
pSiteId - a String value

getSiteId

public java.lang.String getSiteId()
Returns property SiteId

Returns:
a String value

getLocationId

public java.lang.String getLocationId()
Returns:
the locationId

setLocationId

public void setLocationId(java.lang.String pLocationId)
Parameters:
pLocationId - the Location Id to set

setDefaultInStorePickupShippingGroupType

public void setDefaultInStorePickupShippingGroupType(java.lang.String pDefaultInStorePickupShippingGroupType)
Sets the defaultInStorePickupShippingGroupType.


getDefaultInStorePickupShippingGroupType

public java.lang.String getDefaultInStorePickupShippingGroupType()
Gets the defaultInStorePickupShippingGroupType.


getValue

public java.util.Dictionary getValue()
Returns property Value

Returns:
a Dictionary containing item level properties for add operations

getItems

public atg.commerce.order.purchase.AddCommerceItemInfo[] getItems()
Returns items array of property holders for add operations

Returns:
an array of item level property holders for add operations

setAddItemInfoClass

public void setAddItemInfoClass(java.lang.String pAddItemInfoClass)
Sets the name of the class to be used for elements in the items array


getAddItemInfoClass

public java.lang.String getAddItemInfoClass()
Returns the name of the class to be used for elements in the items array


setAddItemCount

public void setAddItemCount(int pAddItemCount)
Sets the number of elements to allocate in the items array and allocates the array

Parameters:
pAddItemCount - an int value

getAddItemCount

public int getAddItemCount()
Returns the number of elements to allocate in the items array

Returns:
an int value

setQuantity

public void setQuantity(long pQuantity)
Sets property Quantity

Parameters:
pQuantity - a long value

getQuantity

public long getQuantity()
Returns property Quantity

Returns:
a long value

getInvalidQuantityCancelsAdd

public boolean getInvalidQuantityCancelsAdd()
Determine if the FormHandler should treat invalid quantities as errors when adding multiple items to an order in a single form submission. If set to true, then any invalid quantity will block all additions. If set to false, items with invalid quantities will be skipped and others will be added.


setInvalidQuantityCancelsAdd

public void setInvalidQuantityCancelsAdd(boolean pInvalidQuantityCancelsAdd)
Set the invalidQuantityCancelsAdd property. Set to true if FormHandler should block all item additions when some items have invalid quantities.

Parameters:
pInvalidQuantityCancelsAdd - false if formhandler should add some items even when others have invalid quantities.

setPaymentGroup

public void setPaymentGroup(PaymentGroup pPaymentGroup)
Sets payment group bean to use for modifying payment groups

Parameters:
pPaymentGroup - a PaymentGroup value

getPaymentGroup

public PaymentGroup getPaymentGroup()
Returns property PaymentGroup

Returns:
a PaymentGroup value

setCreditCard

public void setCreditCard(CreditCard pCreditCard)
Sets credit card bean to use for modifying of billing groups

Parameters:
pCreditCard - a CreditCard value

getCreditCard

public CreditCard getCreditCard()
Returns credit card bean to use for modifying of billing groups

Returns:
a CreditCard value

setGiftCertificate

public void setGiftCertificate(GiftCertificate pGiftCertificate)
Sets gift certificate bean to use for modifying of billing grps

Parameters:
pGiftCertificate - a GiftCertificate value

getGiftCertificate

public GiftCertificate getGiftCertificate()
Returns gift certificate bean to use for modifying of billing grps

Returns:
a GiftCertificate value

setHardgoodShippingGroup

public void setHardgoodShippingGroup(HardgoodShippingGroup pHardgoodShippingGroup)
Sets hardgood shipping group bean

Parameters:
pHardgoodShippingGroup - a HardgoodShippingGroup value

getHardgoodShippingGroup

public HardgoodShippingGroup getHardgoodShippingGroup()
Returns hardgood shipping group bean

Returns:
a HardgoodShippingGroup value

setShippingGroup

public void setShippingGroup(ShippingGroup pShippingGroup)
Sets shipping group bean to use for modifying the shipping groups

Parameters:
pShippingGroup - a ShippingGroup value

getShippingGroup

public ShippingGroup getShippingGroup()
Returns property ShippingGroup.

Returns:
a ShippingGroup value

setGiftlistId

public void setGiftlistId(java.lang.String pGiftlistId)
Specifies the id of the Giftlist.

Parameters:
pGiftlistId - a String value

getGiftlistId

public java.lang.String getGiftlistId()
The giftlist that an item was added from

Returns:
a String value

setGiftlistItemId

public void setGiftlistItemId(java.lang.String pGiftlistItemId)
Specifies the id of the Giftlist Item

Parameters:
pGiftlistItemId - a String value

getGiftlistItemId

public java.lang.String getGiftlistItemId()
The giftlist item being added

Returns:
a String value

setAddItemToOrderPricingOp

public void setAddItemToOrderPricingOp(java.lang.String pAddItemToOrderPricingOp)
This property should be set to the type of pricing operation that should be executed when an item is added to the order. The operations which are acceptable are defined in the atg.commerce.pricing.PricingConstants interface. They include: If this value is null, then the system will default to ORDER_TOTAL.

Parameters:
pAddItemToOrderPricingOp - a String value

getAddItemToOrderPricingOp

public java.lang.String getAddItemToOrderPricingOp()
Returns the pricing operation that should be performed when an item is added to the order

Returns:
a String value

setAddItemToOrderSuccessURL

public void setAddItemToOrderSuccessURL(java.lang.String pAddItemToOrderSuccessURL)
Sets property AddItemToOrderSuccessURL

Parameters:
pAddItemToOrderSuccessURL - a String value

getAddItemToOrderSuccessURL

public java.lang.String getAddItemToOrderSuccessURL()
Returns property AddItemToOrderSuccessURL

Returns:
a String value

setAddItemToOrderErrorURL

public void setAddItemToOrderErrorURL(java.lang.String pAddItemToOrderErrorURL)
Sets property AddItemToOrderErrorURL

Parameters:
pAddItemToOrderErrorURL - a String value

getAddItemToOrderErrorURL

public java.lang.String getAddItemToOrderErrorURL()
Returns property AddItemToOrderErrorURL

Returns:
a String value

setAddMultipleItemsToOrderSuccessURL

public void setAddMultipleItemsToOrderSuccessURL(java.lang.String pAddMultipleItemsToOrderSuccessURL)
Sets property AddMultipleItemsToOrderSuccessURL

Parameters:
pAddMultipleItemsToOrderSuccessURL - a String value

getAddMultipleItemsToOrderSuccessURL

public java.lang.String getAddMultipleItemsToOrderSuccessURL()
Returns property AddMultipleItemsToOrderSuccessURL

Returns:
a String value

setAddMultipleItemsToOrderErrorURL

public void setAddMultipleItemsToOrderErrorURL(java.lang.String pAddMultipleItemsToOrderErrorURL)
Sets property AddMultipleItemsToOrderErrorURL

Parameters:
pAddMultipleItemsToOrderErrorURL - a String value

getAddMultipleItemsToOrderErrorURL

public java.lang.String getAddMultipleItemsToOrderErrorURL()
Returns property AddMultipleItemsToOrderErrorURL

Returns:
a String value

setAddItemToOrderChainId

public void setAddItemToOrderChainId(java.lang.String pAddItemToOrderChainId)
Sets property AddItemToOrderChainId

Parameters:
pAddItemToOrderChainId - a String value

getAddItemToOrderChainId

public java.lang.String getAddItemToOrderChainId()
Returns property AddItemToOrderChainId

Returns:
a String value

setRemoveItemFromOrderSuccessURL

public void setRemoveItemFromOrderSuccessURL(java.lang.String pRemoveItemFromOrderSuccessURL)
Sets property RemoveItemFromOrderSuccessURL

Parameters:
pRemoveItemFromOrderSuccessURL - a String value

getRemoveItemFromOrderSuccessURL

public java.lang.String getRemoveItemFromOrderSuccessURL()
Returns property RemoveItemFromOrderSuccessURL

Returns:
a String value

setRemoveItemFromOrderErrorURL

public void setRemoveItemFromOrderErrorURL(java.lang.String pRemoveItemFromOrderErrorURL)
Sets property RemoveItemFromOrderErrorURL

Parameters:
pRemoveItemFromOrderErrorURL - a String value

getRemoveItemFromOrderErrorURL

public java.lang.String getRemoveItemFromOrderErrorURL()
Returns property RemoveItemFromOrderErrorURL

Returns:
a String value

setRemoveItemFromOrderByRelationshipIdSuccessURL

public void setRemoveItemFromOrderByRelationshipIdSuccessURL(java.lang.String pRemoveItemFromOrderByRelationshipIdSuccessURL)
Set the RemoveItemFromOrderByRelationshipIdSuccessURL property.

Parameters:
pRemoveItemFromOrderByRelationshipIdSuccessURL - a String value

getRemoveItemFromOrderByRelationshipIdSuccessURL

public java.lang.String getRemoveItemFromOrderByRelationshipIdSuccessURL()
Return the RemoveItemFromOrderByRelationshipIdSuccessURL property.

Returns:
a String value

setRemoveItemFromOrderByRelationshipIdErrorURL

public void setRemoveItemFromOrderByRelationshipIdErrorURL(java.lang.String pRemoveItemFromOrderByRelationshipIdErrorURL)
Set the RemoveItemFromOrderByRelationshipIdErrorURL property.

Parameters:
pRemoveItemFromOrderByRelationshipIdErrorURL - a String value

getRemoveItemFromOrderByRelationshipIdErrorURL

public java.lang.String getRemoveItemFromOrderByRelationshipIdErrorURL()
Return the RemoveItemFromOrderByRelationshipIdErrorURL property.

Returns:
a String value

setRemoveAndAddItemToOrderErrorURL

public void setRemoveAndAddItemToOrderErrorURL(java.lang.String pRemoveAndAddItemToOrderErrorURL)
Sets property RemoveAndAddItemToOrderErrorURL

Parameters:
pRemoveAndAddItemToOrderErrorURL - a String value

getRemoveAndAddItemToOrderErrorURL

public java.lang.String getRemoveAndAddItemToOrderErrorURL()
Returns property RemoveAndAddItemToOrderErrorURL

Returns:
a String value

setRemoveAndAddItemToOrderSuccessURL

public void setRemoveAndAddItemToOrderSuccessURL(java.lang.String pRemoveAndAddItemToOrderSuccessURL)
Sets property RemoveAndAddItemToOrderSuccessURL

Parameters:
pRemoveAndAddItemToOrderSuccessURL - a String value

getRemoveAndAddItemToOrderSuccessURL

public java.lang.String getRemoveAndAddItemToOrderSuccessURL()
Returns property RemoveAndAddItemToOrderSuccessURL

Returns:
a String value

setDeleteItemsFromOrderPricingOp

public void setDeleteItemsFromOrderPricingOp(java.lang.String pDeleteItemsFromOrderPricingOp)
This property should be set to the type of pricing operation that should be executed when an item is deleted from the order. The operations which are acceptable are defined in the atg.commerce.pricing.PricingConstants interface. They include: If this value is null, then the system will default to ORDER_TOTAL.

Parameters:
pDeleteItemsFromOrderPricingOp - a String value

getDeleteItemsFromOrderPricingOp

public java.lang.String getDeleteItemsFromOrderPricingOp()
Returns the pricing operation that should be performed when an item is deleted from the order

Returns:
a String value

setModifyOrderPricingOp

public void setModifyOrderPricingOp(java.lang.String pModifyOrderPricingOp)
This property should be set to the type of pricing operation that should be executed when the order is updated without adding or removing an item (e.g. quantity change). The operations which are acceptable are defined in the atg.commerce.pricing.PricingConstants interface. They include: If this value is null, then the system will default to ORDER_TOTAL.

Parameters:
pModifyOrderPricingOp - a String value

getModifyOrderPricingOp

public java.lang.String getModifyOrderPricingOp()
Returns the pricing operation that should be performed when the order is updated

Returns:
a String value

setMoveToPurchaseInfoChainId

public void setMoveToPurchaseInfoChainId(java.lang.String pMoveToPurchaseInfoChainId)
Sets property MoveToPurchaseInfoChainId

Parameters:
pMoveToPurchaseInfoChainId - a String value

getMoveToPurchaseInfoChainId

public java.lang.String getMoveToPurchaseInfoChainId()
Returns property MoveToPurchaseInfoChainId

Returns:
a String value

setSetOrderChainId

public void setSetOrderChainId(java.lang.String pSetOrderChainId)
Sets property SetOrderChainId

Parameters:
pSetOrderChainId - a String value

getSetOrderChainId

public java.lang.String getSetOrderChainId()
Returns property SetOrderChainId

Returns:
a String value

setRepriceOrderErrorURL

public void setRepriceOrderErrorURL(java.lang.String pRepriceOrderErrorURL)
Set the RepriceOrderErrorURL property.

Parameters:
pRepriceOrderErrorURL - a String value

getRepriceOrderErrorURL

public java.lang.String getRepriceOrderErrorURL()
Return the RepriceOrderErrorURL property.

Returns:
a String value

setRepriceOrderSuccessURL

public void setRepriceOrderSuccessURL(java.lang.String pRepriceOrderSuccessURL)
Set the RepriceOrderSuccessURL property.

Parameters:
pRepriceOrderSuccessURL - a String value

getRepriceOrderSuccessURL

public java.lang.String getRepriceOrderSuccessURL()
Return the RepriceOrderSuccessURL property.

Returns:
a String value

setSetOrderByRelationshipIdSuccessURL

public void setSetOrderByRelationshipIdSuccessURL(java.lang.String pSetOrderByRelationshipIdSuccessURL)
Set the setOrderByRelationshipIdSuccessURL property.

Parameters:
pSetOrderByRelationshipIdSuccessURL - a String value

getSetOrderByRelationshipIdSuccessURL

public java.lang.String getSetOrderByRelationshipIdSuccessURL()
Return the setOrderByRelationshipIdSuccessURL property.

Returns:
a String value

setSetOrderByRelationshipIdErrorURL

public void setSetOrderByRelationshipIdErrorURL(java.lang.String pSetOrderByRelationshipIdErrorURL)
Set the SetOrderByRelationshipIdErrorURL property.

Parameters:
pSetOrderByRelationshipIdErrorURL - a String value

getSetOrderByRelationshipIdErrorURL

public java.lang.String getSetOrderByRelationshipIdErrorURL()
Return the SetOrderByRelationshipIdErrorURL property.

Returns:
a String value

setSetOrderSuccessURL

public void setSetOrderSuccessURL(java.lang.String pSetOrderSuccessURL)
Sets property SetOrderSuccessURL

Parameters:
pSetOrderSuccessURL - a String value

getSetOrderSuccessURL

public java.lang.String getSetOrderSuccessURL()
Returns property SetOrderSuccessURL

Returns:
a String value

setSetOrderErrorURL

public void setSetOrderErrorURL(java.lang.String pSetOrderErrorURL)
Sets property SetOrderErrorURL

Parameters:
pSetOrderErrorURL - a String value

getSetOrderErrorURL

public java.lang.String getSetOrderErrorURL()
Returns property SetOrderErrorURL

Returns:
a String value

isCheckForChangedQuantity

public boolean isCheckForChangedQuantity()
Determine if the FormHandler should check for changes in quantities of commerce items. If it is set to true, then it will check. By default this property is set to true. This only affects checking for changed quantities. The removalCatalogRefId array will still be checked to determine if a user has marked an item for deletion.

Returns:
true if form should check for changed quantities

setCheckForChangedQuantity

public void setCheckForChangedQuantity(boolean pCheckForChangedQuantity)
Set the checkForChangedQuantity property. Set to true if FormHandler should check for changed quantities of items.

Parameters:
pCheckForChangedQuantity - true if formhandler should check for changed quantities.

setRemovalCatalogRefIds

public void setRemovalCatalogRefIds(java.lang.String[] pRemovalCatalogRefIds)
Sets property RemovalCatalogRefIds

Parameters:
pRemovalCatalogRefIds - a String[] value

getRemovalCatalogRefIds

public java.lang.String[] getRemovalCatalogRefIds()
Returns property RemovalCatalogRefIds

Returns:
a String[] value

setRemovalRelationshipIds

public void setRemovalRelationshipIds(java.lang.String[] pRemovalRelationshipIds)
Set the removalRelationshipIds property.

Parameters:
pRemovalRelationshipIds - a String[] value

getRemovalRelationshipIds

public java.lang.String[] getRemovalRelationshipIds()
Return the removalRelationshipIds property.

Returns:
a String[] value

setRemovalCommerceIds

public void setRemovalCommerceIds(java.lang.String[] pRemovalCommerceIds)
Sets property RemovalCommerceIds

Parameters:
pRemovalCommerceIds - a String[] value

getRemovalCommerceIds

public java.lang.String[] getRemovalCommerceIds()
Returns property RemovalCommerceIds

Returns:
a String[] value

setMoveToPurchaseInfoByRelIdSuccessURL

public void setMoveToPurchaseInfoByRelIdSuccessURL(java.lang.String pMoveToPurchaseInfoByRelIdSuccessURL)
Set the moveToPurchaseInfoByRelIdSuccessURL property.

Parameters:
pMoveToPurchaseInfoByRelIdSuccessURL - a String value

getMoveToPurchaseInfoByRelIdSuccessURL

public java.lang.String getMoveToPurchaseInfoByRelIdSuccessURL()
Return the moveToPurchaseInfoByRelIdSuccessURL property.

Returns:
a String value

setMoveToPurchaseInfoByRelIdErrorURL

public void setMoveToPurchaseInfoByRelIdErrorURL(java.lang.String pMoveToPurchaseInfoByRelIdErrorURL)
Set the moveToPurchaseInfoByRelIdErrorURL property.

Parameters:
pMoveToPurchaseInfoByRelIdErrorURL - a String value

getMoveToPurchaseInfoByRelIdErrorURL

public java.lang.String getMoveToPurchaseInfoByRelIdErrorURL()
Return the moveToPurchaseInfoByRelIdErrorURL property.

Returns:
a String value

setMoveToPurchaseInfoSuccessURL

public void setMoveToPurchaseInfoSuccessURL(java.lang.String pMoveToPurchaseInfoSuccessURL)
Sets property MoveToPurchaseInfoSuccessURL

Parameters:
pMoveToPurchaseInfoSuccessURL - a String value

getMoveToPurchaseInfoSuccessURL

public java.lang.String getMoveToPurchaseInfoSuccessURL()
Returns property MoveToPurchaseInfoSuccessURL

Returns:
a String value

setMoveToPurchaseInfoErrorURL

public void setMoveToPurchaseInfoErrorURL(java.lang.String pMoveToPurchaseInfoErrorURL)
Sets property MoveToPurchaseInfoErrorURL

Parameters:
pMoveToPurchaseInfoErrorURL - a String value

getMoveToPurchaseInfoErrorURL

public java.lang.String getMoveToPurchaseInfoErrorURL()
Returns property MoveToPurchaseInfoErrorURL

Returns:
a String value

getAddItemsToOrderResult

protected java.util.List<CommerceItem> getAddItemsToOrderResult()
Gets the results of addItemsToOrder. This list represents what was returned from calling addItemsToOrder in doAddItemsToOrder so it is available to other formhandler methods. If an item already exists on an order, the existing item will be updated so it cannot be assumed all items in this list are new.

Returns:
The list of items that were returned from addItemsToOrder, if set.
See Also:
doAddItemsToOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)

setAddItemsToOrderResult

protected void setAddItemsToOrderResult(java.util.List<CommerceItem> pAddItemsToOrderResult)
Sets the list of items returned from addItemsToOrder.

Parameters:
pAddItemsToOrderResult - The list of items that were returned from addItemsToOrder.
See Also:
doAddItemsToOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)

handleAddConfigurableItemToOrder

public boolean handleAddConfigurableItemToOrder(DynamoHttpServletRequest pRequest,
                                                DynamoHttpServletResponse pResponse)
                                         throws javax.servlet.ServletException,
                                                java.io.IOException
This method is used to add configurable items to the order. It will first make a call to preAddItemToOrder, then it will call addConfigurableItemToOrder and finally it will call postAddItemToOrder.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

addConfigurableItemToOrder

protected void addConfigurableItemToOrder(DynamoHttpServletRequest pRequest,
                                          DynamoHttpServletResponse pResponse)
                                   throws javax.servlet.ServletException,
                                          java.io.IOException
Adds one or more commerce items to the order (the shopping cart), using configurableItemTypeName as the default commerce item type. The list of catalog items to be added comes from the catalogRefIds array and productId or from the items array.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io
See Also:
mergeItemInputForAdd(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse, java.lang.String, boolean), doAddItemsToOrder(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)

addConfigurableItemToOrder

protected void addConfigurableItemToOrder(DynamoHttpServletRequest pRequest,
                                          DynamoHttpServletResponse pResponse,
                                          boolean pIsGift)
                                   throws javax.servlet.ServletException,
                                          java.io.IOException
Deprecated. replaced by addConfigurableItemToOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)

Adds one or more commerce items to the order (the shopping cart), using configurableItemTypeName as the default commerce item type. The list of catalog items to be added comes from the catalogRefIds array and productId or from the items array.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
pIsGift - ignored, covered by the giftlistId and giftlistItemId properties
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

getQuantity

public long getQuantity(java.lang.String pKey,
                        DynamoHttpServletRequest pRequest,
                        DynamoHttpServletResponse pResponse)
                 throws javax.servlet.ServletException,
                        java.io.IOException,
                        java.lang.NumberFormatException
Retrieve the quantity that should be used for the given catalog reference id, commerce item id or relationship id.

Looks for a request parameter whose key is pKey. The value of the parameter is the quantity. For example:

ci10001=2

Parameters:
pKey - a String value of the sku id, commerce id, relationship id or some other id.
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
a long value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
java.lang.NumberFormatException - if an error occurs

getQuantityByCatalogRefId

public long getQuantityByCatalogRefId(java.lang.String pCatalogRefId,
                                      DynamoHttpServletRequest pRequest,
                                      DynamoHttpServletResponse pResponse)
                               throws javax.servlet.ServletException,
                                      java.io.IOException,
                                      java.lang.NumberFormatException
Retrieve the quantity that should be used for the given catalog reference id

Looks for a request parameter whose key is pKey. The value of the parameter is the quantity. For example:

xsku10043=2

Parameters:
pKey - a String value of the sku id, commerce id, relationship id or some other id.
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
a long value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
java.lang.NumberFormatException - if an error occurs

getQuantityByCommerceId

public long getQuantityByCommerceId(java.lang.String pCommerceId,
                                    DynamoHttpServletRequest pRequest,
                                    DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException,
                                    java.lang.NumberFormatException
Retrieve the quantity that should be used for the given commerce item id

Looks for a request parameter whose key is pKey. The value of the parameter is the quantity. For example:

ci100002=2

Parameters:
pKey - a String value of the sku id, commerce id, relationship id or some other id.
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
a long value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
java.lang.NumberFormatException - if an error occurs

getQuantityByRelationshipId

public long getQuantityByRelationshipId(java.lang.String pRelationshipId,
                                        DynamoHttpServletRequest pRequest,
                                        DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException,
                                        java.lang.NumberFormatException
Retrieve the quantity that should be used for the given relationship id

Looks for a request parameter whose key is pKey. The value of the parameter is the quantity. For example:

r100002=2

Parameters:
pKey - a String value of the sku id, commerce id, relationship id or some other id.
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
a long value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
java.lang.NumberFormatException - if an error occurs

getCatalogKey

protected java.lang.String getCatalogKey(DynamoHttpServletRequest pRequest,
                                         DynamoHttpServletResponse pResponse)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException
Get a string that will be used to identify the catalog to use when obtaining a catalogRef and productRef for the creation of a commerce item. CatalogTools will maintain a mapping of key to catalog, currently this mapping will be maintained by the users locale.

Parameters:
pRequest - servlet request object
pResponse - servlet response object
Returns:
the catalog key
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
See Also:
CatalogTools

preSetOrder

public void preSetOrder(DynamoHttpServletRequest pRequest,
                        DynamoHttpServletResponse pResponse)
                 throws javax.servlet.ServletException,
                        java.io.IOException
This is called before any processing is done by the handleSetOrder method. It currently does nothing.

Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

postSetOrder

public void postSetOrder(DynamoHttpServletRequest pRequest,
                         DynamoHttpServletResponse pResponse)
                  throws javax.servlet.ServletException,
                         java.io.IOException
This is called after all processing is done by the handleSetOrder method. It currently does nothing.

Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

handleSetOrder

public boolean handleSetOrder(DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
This method handles all of the work necessary to save an Order. It will first call preSetOrder. Then it will call the modifyOrder method, which does the actual work of recalculating a users order. After the modifyOrder method has been called the runProcessSetOrder will get called to run the appropriate pipeline chain. After this, the postSetOrder method will get called.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
a boolean value
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io
See Also:
modifyOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)

modifyOrder

protected void modifyOrder(DynamoHttpServletRequest pRequest,
                           DynamoHttpServletResponse pResponse)
                    throws javax.servlet.ServletException,
                           java.io.IOException,
                           CommerceException,
                           RunProcessException
Modify the order (accessed from the order property) based on the changes in the request. This method iterates over each of the current CommerceItems in the order and finds the current quantity submitted. The quantity values are passed as query parameters with the catalog ref (sku) id as the key and the quantity as the value like this:

sku100001=2&sku10002=0 *

In addition we check to make sure that the item should even be included in the order any longer. If the quantity is greater than zero we adjust the quantity in the CommerceItem and the ShippingGroupCommerceItemRelationship. Otherwise we remove the CommerceItem and the relationships. Items are identified by their catalogRefId (Sku).

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
CommerceException - if an error occurs
RunProcessException - if an error occurs

preSetOrderByRelationshipId

public void preSetOrderByRelationshipId(DynamoHttpServletRequest pRequest,
                                        DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
This is called before any processing is done by the handleSetOrderByRelationshipId method. It is currently does nothing.

Parameters:
pRequest - a value of type 'DynamoHttpServletRequest'
pResponse - a value of type 'DynamoHttpServletResponse'
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

postSetOrderByRelationshipId

public void postSetOrderByRelationshipId(DynamoHttpServletRequest pRequest,
                                         DynamoHttpServletResponse pResponse)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException
This is called after all processing is done by the handleSetOrderByRelationshipId method. It is currently does nothing.

Parameters:
pRequest - a value of type 'DynamoHttpServletRequest'
pResponse - a value of type 'DynamoHttpServletResponse'
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

handleSetOrderByRelationshipId

public boolean handleSetOrderByRelationshipId(DynamoHttpServletRequest pRequest,
                                              DynamoHttpServletResponse pResponse)
                                       throws javax.servlet.ServletException,
                                              java.io.IOException
This method is responsible for adjusting the quantities of commerce items that exist in a users shopping cart. This adjustment is done via calling the modifyOrderByRelationshipId method, then calling the runProcessSetOrder method to run the appropriate pipeline chain.

Parameters:
pRequest - the request object
pResponse - the response object
Returns:
true if the method was handled
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
See Also:
modifyOrderByRelationshipId(DynamoHttpServletRequest, DynamoHttpServletResponse)

preSetOrderByCommerceId

public void preSetOrderByCommerceId(DynamoHttpServletRequest pRequest,
                                    DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
This is called before any processing is done by the handleSetOrderByCommerceId method. It currently does nothing.

Parameters:
pRequest - a value of type 'DynamoHttpServletRequest'
pResponse - a value of type 'DynamoHttpServletResponse'
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

postSetOrderByCommerceId

public void postSetOrderByCommerceId(DynamoHttpServletRequest pRequest,
                                     DynamoHttpServletResponse pResponse)
                              throws javax.servlet.ServletException,
                                     java.io.IOException
This is called after all processing is done by the handleSetOrderByCommerceId method. It currently does nothing.

Parameters:
pRequest - a value of type 'DynamoHttpServletRequest'
pResponse - a value of type 'DynamoHttpServletResponse'
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

handleSetOrderByCommerceId

public boolean handleSetOrderByCommerceId(DynamoHttpServletRequest pRequest,
                                          DynamoHttpServletResponse pResponse)
                                   throws javax.servlet.ServletException,
                                          java.io.IOException
This method is responsible for adjusting the quantities of commerce items that exist in a users shopping cart. This adjustment is done via calling the modifyOrderByCommerceId method, then calling the runProcessSetOrder method to run the appropriate pipeline chain.

Parameters:
pRequest - the request object
pResponse - the response object
Returns:
true if the method was handled
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
See Also:
modifyOrderByCommerceId(DynamoHttpServletRequest, DynamoHttpServletResponse)

preMoveToPurchaseInfo

public void preMoveToPurchaseInfo(DynamoHttpServletRequest pRequest,
                                  DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
Called before any processing is done by the moveToPurchaseInfo method. It currently does nothing.

Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

postMoveToPurchaseInfo

public void postMoveToPurchaseInfo(DynamoHttpServletRequest pRequest,
                                   DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
Called after all processing is done by the moveToPurchaseInfo method. It currently does nothing.

Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

handleMoveToPurchaseInfo

public boolean handleMoveToPurchaseInfo(DynamoHttpServletRequest pRequest,
                                        DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
This method is called when the user wants to starts the CHECKOUT process for an order. It will first call preMoveToPurchaseInfo method. After this has happened it will check for any changes to the order by calling the modifyOrder method. Then, the runProcessMoveToPurchaseInfo method gets called to run the appropriate pipeline chain. Finally, the postMoveToPurchaseInfo method will be called.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
a boolean value
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleMoveToPurchaseInfoByRelId

public boolean handleMoveToPurchaseInfoByRelId(DynamoHttpServletRequest pRequest,
                                               DynamoHttpServletResponse pResponse)
                                        throws javax.servlet.ServletException,
                                               java.io.IOException
This method is called when the user wants to starts the CHECKOUT process for an order. It will first call preMoveToPurchaseInfo method. After this has happened it will check for any changes to the order by calling the modifyOrderByRelationshipId method. Then, the runProcessMoveToPurchaseInfo method gets called to run the appropriate pipeline chain. Finally, the postMoveToPurchaseInfo method will be called.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
a boolean value
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

modifyOrderByRelationshipId

protected void modifyOrderByRelationshipId(DynamoHttpServletRequest pRequest,
                                           DynamoHttpServletResponse pResponse)
                                    throws javax.servlet.ServletException,
                                           java.io.IOException,
                                           CommerceException,
                                           RunProcessException
This method causes the contents of a users order to be adjusted by quantity. Specifically, it will iterate through all of the shipping group commerce item relationships that exist in a users order. For each of these Shipping group commerce item relationships, see what the quantity that was submitted in the form was. This is done by calling the getQuantity() method handing it the the shipping group commerce item relationship id. If the quantity has changed then change the quantity in both the relationship object as well as the commerce item. The quantity values are passed as query parameters with the shipping group relationship id as the key and the quantity as the value like this:

xcr100001=2&xcr10002=0

If the quantity is now 0, or the item appears in the removalRelationshipIds array then the quantity will be put to 0. If the original quantity of the shipping group commerce item relationship is equal to the quantity of the commerce item then the commerce item and the relationship are removed from the order. If the quantity is less than the quantity of the commerce item then the relationship is removed and the quantity of the commerce item is adjusted appropriately.

This assumes that the type of relationship being used on the ShippingGroupCommerceItemRelationship is of type SHIPPINGQUANTITY. If it is not, an exception wil be thrown.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
CommerceException - if an error occurs
RunProcessException - if an error occurs

handleMoveToPurchaseInfoByCommerceId

public boolean handleMoveToPurchaseInfoByCommerceId(DynamoHttpServletRequest pRequest,
                                                    DynamoHttpServletResponse pResponse)
                                             throws javax.servlet.ServletException,
                                                    java.io.IOException
This method is called when the user wants to starts the CHECKOUT process for an order. It will first call preMoveToPurchaseInfo method. After this has happened it will check for any changes to the order by calling the modifyOrderByCommerceId method. Then, the runProcessMoveToPurchaseInfo method gets called to run the appropriate pipeline chain. Finally, the postMoveToPurchaseInfo method will be called.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
a boolean value
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

modifyCommerceItemsProperties

protected boolean modifyCommerceItemsProperties(DynamoHttpServletRequest pRequest,
                                                DynamoHttpServletResponse pResponse,
                                                java.util.Map pQuantityChangedItems,
                                                java.util.Map pRemovedItems)
                                         throws java.io.IOException,
                                                CommerceException,
                                                javax.servlet.ServletException,
                                                RunProcessException
This method is invoked from the modifyOrder*() methods in order to allow subclasses an opportunity to implement additional processing after the quantity of items in the order has been changed.

Parameters:
pRequest - the request
pResponse - the response
pQuantityChangedItems - a map of items who's quantities have been changed. The map key is the commerce item, and the value is the old quantity.
pRemovedItems - a map of items that have been removed from the order because their quantity was set to something less than or equal to zero. 1. The key is the commerce item and the value is the old quantity. This parameter may be null.
Returns:
true if order should be repriced (used only when called from modifyOrderByRelationshipId())
Throws:
java.io.IOException
CommerceException
javax.servlet.ServletException
RunProcessException

modifyOrderPostReprice

protected void modifyOrderPostReprice(DynamoHttpServletRequest pRequest,
                                      DynamoHttpServletResponse pResponse,
                                      java.util.Map pQuantityChangedItems,
                                      java.util.Map pRemovedItems)
                               throws java.io.IOException,
                                      CommerceException,
                                      javax.servlet.ServletException,
                                      RunProcessException
Parameters:
pRequest - the request
pResponse - the response
pQuantityChangedItems - a map of items who's quantities have been changed. The map key is the commerce item, and the value is the old quantity.
pRemovedItems - a map of items that have been removed from the order because their quantity was set to something less than zero. 1. The key is the commerce item and the value is the old quantity. This parameter may be null.
Throws:
java.io.IOException
CommerceException
javax.servlet.ServletException
RunProcessException

modifyOrderByCommerceId

protected void modifyOrderByCommerceId(DynamoHttpServletRequest pRequest,
                                       DynamoHttpServletResponse pResponse)
                                throws javax.servlet.ServletException,
                                       java.io.IOException,
                                       CommerceException,
                                       RunProcessException
Modify the order (accessed from the order property) based on the changes in the request. The quantity values are passed as query parameters with the commerce item id as the key and the quantity as the value like this:

ci100001=2&ci10002=0

This method iterates over each of the current CommerceItems in the order and finds the current quantity submitted. Note, this replaces the use of modifyOrder method because that method made use of the catalogRefId to identify the commerce item to be modified instead of using the commerce item id itself. In addition we check to make sure that the item should even be included in the order any longer. If the quantity is greater than zero we adjust the quantity in the CommerceItem and the ShippingGroupCommerceItemRelationship. Otherwise we remove the CommerceItem and the relationships.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
CommerceException - if an error occurs
RunProcessException - if an error occurs

getShippingGroupCommerceItemRelationships

protected java.util.List getShippingGroupCommerceItemRelationships(Order pOrder)
                                                            throws CommerceException
Get a list of all the shippingGroupCommerceItemRelationships that are contained within a particular order. This is done by getting the list of commerce item relationships and shipping group relationships and then taking the intersection of the two.

Parameters:
pOrder - the order whose relationships will be obtained
Returns:
the list of shipping group commerce item relationships in the order
Throws:
CommerceException - if an error occurs

deleteItemsByRelationshipId

protected void deleteItemsByRelationshipId(DynamoHttpServletRequest pRequest,
                                           DynamoHttpServletResponse pResponse)
                                    throws javax.servlet.ServletException,
                                           java.io.IOException,
                                           CommerceException
This method is responsible for deleting items from the order by shipping group commerce item relationship id. It will iterate through the shipping group commerce item relationship ids that are found in the removalShippingGroupCommerceItemRelIds property, operating on each one. It will first ensure that the relationship type is of type RelatinoshipType.SHIPPINGQUANTITY, if its not an error is logged. Next, one of two conditions can exist...

Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
CommerceException - if an error occurs

deleteItems

protected void deleteItems(DynamoHttpServletRequest pRequest,
                           DynamoHttpServletResponse pResponse)
                    throws javax.servlet.ServletException,
                           java.io.IOException
Delete all items from the order whose id appears in the RemovalCommerceIds property.

Parameters:
pRequest - servlet request object
pResponse - servlet response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

preAddItemToOrder

public void preAddItemToOrder(DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Called before any work is done by the handleAddItemToOrder method. It currently does nothing.

Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

postAddItemToOrder

public void postAddItemToOrder(DynamoHttpServletRequest pRequest,
                               DynamoHttpServletResponse pResponse)
                        throws javax.servlet.ServletException,
                               java.io.IOException
Called after all work is done by the handleAddItemToOrder method. It currently does nothing.

Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

handleAddItemToOrder

public boolean handleAddItemToOrder(DynamoHttpServletRequest pRequest,
                                    DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
This method is used to add items to the order. It will first make a call to preAddItemToOrder, then it will call addItemToOrder and finally it will call postAddItemToOrder.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
a boolean value
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

addItemToOrder

protected void addItemToOrder(DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Adds one or more commerce items to the order (the shopping cart), using commerceItemType as the default commerce item type. The list of catalog items to be added comes from the catalogRefIds array and productId or from the items array.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io
See Also:
mergeItemInputForAdd(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse, java.lang.String, boolean), doAddItemsToOrder(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)

addItemToOrder

protected void addItemToOrder(DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse,
                              boolean pIsGift)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Deprecated. replaced by addItemToOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)

Adds one or more commerce items to the order (the shopping cart), using commerceItemType as the default commerce item type. The list of catalog items to be added comes from the catalogRefIds array and productId or from the items array.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
pIsGift - ignored, covered by the giftlistId and giftlistItemId properties
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

mergeItemInputForAdd

protected boolean mergeItemInputForAdd(DynamoHttpServletRequest pRequest,
                                       DynamoHttpServletResponse pResponse,
                                       java.lang.String pCommerceItemType,
                                       boolean pUseProductIds)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
Construct or fill in default values in an items array containing input values for the methods involved in adding items to orders.

Most input validation occurs here, for example:

Quantity errors prevent further processing only if invalidQuantityCancelsAdd is true.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
pCommerceItemType - the type to use for creating new commerce items
pUseProductIds - true if input comes from productIds rather than productId
Returns:
true if inputs are valid, false if not
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io
See Also:
validateShippingGroupForAdd(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)

mergeValueDictionaries

protected boolean mergeValueDictionaries(java.util.Dictionary pCommonValues,
                                         java.util.Dictionary pItemValues,
                                         int pItemIndex,
                                         DynamoHttpServletRequest pRequest,
                                         DynamoHttpServletResponse pResponse,
                                         java.lang.String pPropertyPathPrefix)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException
Merges the common value dictionary into one item-specific value dictionary. If a key from the common dictionary already appears in the item dictionary and both entries are child dictionaries, the children are merged. In non-dictionary cases, the entry in the item dictionary is not modified unless it is null or an empty String.

Parameters:
pCommonValues - the common dictionary
pItemValues - the item-specific dictionary
pItemIndex - the index of the items array element that owns the item-specific dictionary
pRequest - the servlet's request
pResponse - the servlet's response
pPropertyPathPrefix - the name prefix for entries in child dictionaries (null for the top level dictionaries)
Returns:
true if the merge was successful, false if an error occurred
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

validateShippingGroupForAdd

protected boolean validateShippingGroupForAdd(DynamoHttpServletRequest pRequest,
                                              DynamoHttpServletResponse pResponse)
                                       throws javax.servlet.ServletException,
                                              java.io.IOException
Validate shipping information for add operations. The shippingGroup property must be non-null.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
true if inputs are valid, false if not
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

doAddItemsToOrder

protected void doAddItemsToOrder(DynamoHttpServletRequest pRequest,
                                 DynamoHttpServletResponse pResponse)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
Add one or more items to the order (the shopping cart). Details about the items are found in the items array. Items with a quantity of 0 or less are not added.

Each commerce item is created by calling a series of small methods:

Input property validation is the caller's responsibility.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

createInStorePickupShippingGroups

protected void createInStorePickupShippingGroups(Order pOrder)
                                          throws CommerceException
When an item is added to the cart if it contains a locationId in the AddCommerceItemInfo object then create an InStorePickupShippingGroup for the item to be added to automatically.

Parameters:
pOrder - The order
Throws:
CommerceException

removeInStorePickupShippingGroups

protected void removeInStorePickupShippingGroups(Order pOrder)
                                          throws CommerceException
Searches through the order and removes any InStorePickupShippingGroups that are no longer associated with any items on the order. This is run after removing items from the order that may have been responsible for adding an InStorePickupShippingGroup to the order and container

Parameters:
pOrder - The order
Throws:
CommerceException

createCommerceItem

protected CommerceItem createCommerceItem(int pItemIndex,
                                          java.lang.String pCatalogKey)
                                   throws CommerceException
Create a commerce item and add it to the order.

Parameters:
pItemIndex - the index of the items array element that supplies input for the new item
pCatalogKey - the catalog key reference (locale) for the new item
Returns:
CommerceItem that was created
Throws:
CommerceException - if there was an error while executing the code

setCommerceItemProperties

protected void setCommerceItemProperties(CommerceItem pItem,
                                         int pItemIndex)
                                  throws CommerceException
Fill in "extra" commerce item properties. This implementation copies properties from the optional value dictionary to the commerce item.

Parameters:
pItem - the CommerceItem
pItemIndex - the index of the items array element that supplies input for the commerce item
Throws:
CommerceException - if there was an error while executing the code

applyValueDictionary

protected void applyValueDictionary(java.lang.Object pBean,
                                    java.util.Dictionary pValues,
                                    java.lang.String pPropertyPathPrefix)
                             throws CommerceException
Copy properties from the value dictionary or one of its descendents.

Parameters:
pBean - the object to which to copy dictionary values
pValues - the dictionary from which to copy values
pPropertyPathPrefix - the name prefix for dictionary entries (null for the top level dictionary)
Throws:
CommerceException - if there was an error while executing the code

addItemToShippingGroup

protected void addItemToShippingGroup(CommerceItem pItem,
                                      int pItemIndex)
                               throws CommerceException
Associate a commerce item with the shipping group specified by the shippingGroup property.

Parameters:
pItem - the CommerceItem
pItemIndex - the index of the items array element that supplies input for the commerce item
Throws:
CommerceException - if there was an error while executing the code

createConfigurableSubitems

protected void createConfigurableSubitems(CommerceItem pItem,
                                          int pItemIndex)
                                   throws CommerceException
Create subitems for a base configurable commerce item. This method does nothing and can be overridden by a subclass if needed.

Parameters:
pItem - the base CommerceItem
pItemIndex - the index of the items array element that supplies input for the base commerce item
Throws:
CommerceException - if there was an error while executing the code

processGiftAddition

protected void processGiftAddition(CommerceItem pItem,
                                   int pItemIndex)
                            throws CommerceException
Perform giftlist related processing for an item being ordered from a giftlist. An item is considered ordered from a giftlist if either its input giftlistId or giftlistItemId is non-null.

Parameters:
pItem - the CommerceItem
pItemIndex - the index of the items array element that supplies input for the commerce item
Throws:
CommerceException - if there was an error while executing the code

preAddMultipleItemsToOrder

public void preAddMultipleItemsToOrder(DynamoHttpServletRequest pRequest,
                                       DynamoHttpServletResponse pResponse)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
Called before any work is done by the handleAddMultipleItemsToOrder method. It currently does nothing.

Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

postAddMultipleItemsToOrder

public void postAddMultipleItemsToOrder(DynamoHttpServletRequest pRequest,
                                        DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
Called after all work is done by the handleAddMultipleItemsToOrder method. It currently does nothing.

Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

handleAddMultipleItemsToOrder

public boolean handleAddMultipleItemsToOrder(DynamoHttpServletRequest pRequest,
                                             DynamoHttpServletResponse pResponse)
                                      throws javax.servlet.ServletException,
                                             java.io.IOException
This method is used to add items to the order. It will first make a call to preAddMultipleItemsToOrder, then it will call addMultipleItemsToOrder and finally it will call postAddMultipleItemsToOrder.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
a boolean value
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

addMultipleItemsToOrder

protected void addMultipleItemsToOrder(DynamoHttpServletRequest pRequest,
                                       DynamoHttpServletResponse pResponse)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
Adds commerce items to the order (the shopping cart). The list of catalog items to be added comes from the catalogRefIds and productIds arrays or from the items array.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io
See Also:
mergeItemInputForAdd(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse, java.lang.String, boolean), doAddItemsToOrder(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)

addMultipleItemsToOrder

protected void addMultipleItemsToOrder(DynamoHttpServletRequest pRequest,
                                       DynamoHttpServletResponse pResponse,
                                       boolean pIsGift)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
Deprecated. replaced by addConfigurableItemToOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)

Adds commerce items to the order (the shopping cart). The list of catalog items to be added comes from the catalogRefIds and productIds arrays or from the items array.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
pIsGift - ignored, covered by the giftlistId and giftlistItemId properties
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

preRemoveItemFromOrder

public void preRemoveItemFromOrder(DynamoHttpServletRequest pRequest,
                                   DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
Called before any processing is done by the removeItemFromOrder method. Currently, it does nothing.

Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

postRemoveItemFromOrder

public void postRemoveItemFromOrder(DynamoHttpServletRequest pRequest,
                                    DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
Called after all processing is done by the removeItemFromOrder method. It currently does nothing.

Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

handleRemoveItemFromOrder

public boolean handleRemoveItemFromOrder(DynamoHttpServletRequest pRequest,
                                         DynamoHttpServletResponse pResponse)
                                  throws java.io.IOException,
                                         javax.servlet.ServletException
This will make calls to the preRemoveItemFromOrder method and then will call the deleteItems method. Finally, the postRemoveItemFromOrder method will get called.

Parameters:
pRequest - the request object
pResponse - the resonse object
Returns:
true if the request was handled properly
Throws:
java.io.IOException - if an error occurs
javax.servlet.ServletException - if an error occurs

preRemoveItemFromOrderByRelationshipId

public void preRemoveItemFromOrderByRelationshipId(DynamoHttpServletRequest pRequest,
                                                   DynamoHttpServletResponse pResponse)
                                            throws javax.servlet.ServletException,
                                                   java.io.IOException
This method is currently empty. It can be overriden to provide functionality for the removeItemFromOrderByRelationshipId methods. It gets called before any processing is done by that method.

Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

postRemoveItemFromOrderByRelationshipId

public void postRemoveItemFromOrderByRelationshipId(DynamoHttpServletRequest pRequest,
                                                    DynamoHttpServletResponse pResponse)
                                             throws javax.servlet.ServletException,
                                                    java.io.IOException
This method is currently empty. It can be overriden to provide functionality for the removeItemFromOrderByRelationshipId methods. It gets called after all processing is done by that method.

Parameters:
pRequest - a value of type 'DynamoHttpServletResponse'
pResponse - a value of type 'DynamoHttpServletResponse'
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

handleRemoveItemFromOrderByRelationshipId

public boolean handleRemoveItemFromOrderByRelationshipId(DynamoHttpServletRequest pRequest,
                                                         DynamoHttpServletResponse pResponse)
                                                  throws java.io.IOException,
                                                         javax.servlet.ServletException
This method is similiar to the handleRemoveItemFromOrder method, except that it removes items from the order via ShippingGroupCommerceItemRelationship object Ids. This allows for the instance when a single commerce item will be shipped to multiple places. The display will show quantity N going to the first shipping destination. This delete allows the quantiy associated with this shipping group to be removed.

This method will just make a call to the deleteItemsByRelationshipId.

Parameters:
pRequest - the request object
pResponse - the response object
Returns:
true if the request was properly handled
Throws:
java.io.IOException - if an error occurs
javax.servlet.ServletException - if an error occurs

preRemoveAndAddItemToOrder

public void preRemoveAndAddItemToOrder(DynamoHttpServletRequest pRequest,
                                       DynamoHttpServletResponse pResponse)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
Called before any processing is done by the handleRemoveAndAddItemToOrder method. It currently does nothing.

Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

postRemoveAndAddItemToOrder

public void postRemoveAndAddItemToOrder(DynamoHttpServletRequest pRequest,
                                        DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
Called after all processing is done by the handleRemoveAndAddItemToOrder method. It currently does nothing.

Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

handleRemoveAndAddItemToOrder

public boolean handleRemoveAndAddItemToOrder(DynamoHttpServletRequest pRequest,
                                             DynamoHttpServletResponse pResponse)
                                      throws javax.servlet.ServletException,
                                             java.io.IOException
This method is meant to be used on a page where a user wants to both remove an item from the order as well as add an item to an order. An example of this might be if the user wants to modify an item in their cart. It would be feasible to remove that item from the cart and then automatically add their new selected item.

This method checks to see if any objects have been added to the RemovalCommerceIds property. If they have, then remove them. After removing them call the handleAddItemToOrder method to handle the adding of an item to the order.

Parameters:
pRequest - servlet's request
pResponse - servlet's response
Returns:
true if processing was successful
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

updateOrder

protected void updateOrder(Order pOrder,
                           java.lang.String pMsgId,
                           DynamoHttpServletRequest pRequest,
                           DynamoHttpServletResponse pResponse)
                    throws javax.servlet.ServletException,
                           java.io.IOException
Utility method to update an order and process any exception that happens during the update.

Parameters:
pOrder - the order to update
pMsgId - the message ID to use in case of an exception
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException
java.io.IOException

runProcessAddItemToOrder

protected void runProcessAddItemToOrder(Order pOrder,
                                        PricingModelHolder pPricingModels,
                                        java.util.Locale pLocale,
                                        RepositoryItem pProfile,
                                        java.util.Map pExtraParameters)
                                 throws RunProcessException
Deprecated. Use runProcessAddItemToOrder(Order, CommerceItem, PricingModelHolder, Locale, RepositoryItem, Map) instead

Run the pipeline which should be executed when the handleAddItemToOrder method is invoked

Parameters:
pOrder - the order to reprice
pPricingModels - the set of all pricing models for the user (item, order, shipping, tax)
pLocale - the locale that the order should be priced within
pProfile - the user who owns the order
pExtraParameters - A Map of extra parameters to be used in the pricing
Throws:
RunProcessException - if an error occurs

runProcessAddItemToOrder

protected void runProcessAddItemToOrder(Order pOrder,
                                        CommerceItem pCommerceItem,
                                        PricingModelHolder pPricingModels,
                                        java.util.Locale pLocale,
                                        RepositoryItem pProfile,
                                        java.util.Map pExtraParameters)
                                 throws RunProcessException
Run the pipeline which should be executed when the handleAddItemToOrder method is invoked This method will add pCommerceItem to pExtraParameters unless the key PipelineConstants.COMMERCEITEM is already in the map

Parameters:
pOrder - the order to reprice
pPricingModels - the set of all pricing models for the user (item, order, shipping, tax)
pLocale - the locale that the order should be priced within
pProfile - the user who owns the order
pExtraParameters - A Map of extra parameters to be used in the pricing
Throws:
RunProcessException

runProcessSendScenarioEvent

protected void runProcessSendScenarioEvent(Order pOrder,
                                           CommerceItem pItem,
                                           long pQuantity,
                                           java.lang.String pType)
                                    throws RunProcessException
The runProcessSendScenarioEvent method sends a scenario event.

Parameters:
pOrder - an Order value
pItem - a CommerceItem value
pQuantity - the quantity affected
pType - a String value
Throws:
RunProcessException - if an error occurs

runProcessSendScenarioEvent

protected void runProcessSendScenarioEvent(Order pOrder,
                                           CommerceItem pItem,
                                           long pQuantity,
                                           java.lang.String pType,
                                           java.lang.String pSiteId)
                                    throws RunProcessException
The runProcessSendScenarioEvent method sends a scenario event.

Parameters:
pOrder - an Order value
pItem - a CommerceItem value
pQuantity - the quantity affected
pType - a String value
pSiteId - The site ID associated with a scenario event
Throws:
RunProcessException - if an error occurs

runProcessSendScenarioEvent

protected void runProcessSendScenarioEvent(Order pOrder,
                                           CommerceItem pItem,
                                           java.lang.String pType,
                                           java.util.Map pParams)
                                    throws RunProcessException
The runProcessSendScenarioEvent method sends a scenario event .

Parameters:
pOrder - an Order value
pItem - a CommerceItem value
pType - a String value
pParams - a map with event specific parameters
Throws:
RunProcessException - if an error occurs

runProcessSendScenarioEvent

protected void runProcessSendScenarioEvent(Order pOrder,
                                           CommerceItem pItem,
                                           java.lang.String pType,
                                           java.lang.String pSiteId,
                                           java.util.Map pParams)
                                    throws RunProcessException
The runProcessSendScenarioEvent method sends a scenario event .

Parameters:
pOrder - an Order value
pItem - a CommerceItem value
pType - a String value
pSiteId - The site ID associated with a scenario event
pParams - a map with event specific parameters
Throws:
RunProcessException - if an error occurs

runProcessSetOrder

protected void runProcessSetOrder(Order pOrder,
                                  PricingModelHolder pPricingModels,
                                  java.util.Locale pLocale,
                                  RepositoryItem pProfile,
                                  java.util.Map pExtraParameters)
                           throws RunProcessException
Run the pipeline which should be executed when the handleSetOrder method is invoked

Parameters:
pOrder - the order to reprice
pPricingModels - the set of all pricing models for the user (item, order, shipping, tax)
pLocale - the locale that the order should be priced within
pProfile - the user who owns the order
pExtraParameters - A Map of extra parameters to be used in the pricing
Throws:
RunProcessException - if an error occurs

runProcessMoveToPurchaseInfo

protected void runProcessMoveToPurchaseInfo(Order pOrder,
                                            PricingModelHolder pPricingModels,
                                            java.util.Locale pLocale,
                                            RepositoryItem pProfile,
                                            java.util.Map pExtraParameters)
                                     throws RunProcessException
Run the pipeline which should be executed when the handleMoveToPurchaseInfo method is invoked

Parameters:
pOrder - the order to reprice
pPricingModels - the set of all pricing models for the user (item, order, shipping, tax)
pLocale - the locale that the order should be priced within
pProfile - the user who owns the order
pExtraParameters - A Map of extra parameters to be used in the pricing
Throws:
RunProcessException - if an error occurs