atg.commerce.order
Class ShoppingCartFormHandler

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.OrderModifierFormHandler
                      extended by atg.commerce.order.ShoppingCartFormHandler
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
Direct Known Subclasses:
FullShoppingCartFormHandler

public class ShoppingCartFormHandler
extends OrderModifierFormHandler

This form handler is used to control many aspects of the user purchase process. It interfaces between the front end GUI and the backend management of the users Order. Its functionality can be broken out into two main functional areas: Shopping Cart managment and the checkout process.

* For Shopping cart management, the form handler controls any modification to a users current shopping cart. This includes; adding items to the cart, removing items from the cart and adjusting the items that are currently in the cart. This adjusmtent can take the form of quantity changes etc. This functionality is invoked via the various handleXXX methods of the form handler.

The checkout process is broken down into several distinct steps. These steps include: taking of user information (shipping address, billing address, payment information), order confirmation (all of a users purchase information is displayed, and finally the order commit process.

All handle methods in this form handler mirror a similiar pattern. Each handleXXX process has an associated preXXX and postXXX method. For example, the handleAddItemToOrder has an associate preAddItemToOrder and postAddItemToOrder. These pre/post methods provide an easy way for a user to extend the functionality of this form handler. Additionally, there are several pipelines that are executed upon the user through the checkout process.

See Also:
GenericFormHandler, FullShoppingCartFormHandler, CartModifierFormHandler

Field Summary
protected static java.lang.String CC_PAYMENT_GROUP_TYPE_NAME
           
static java.lang.String CLASS_VERSION
          Class version string
protected static java.lang.String GC_PAYMENT_GROUP_TYPE_NAME
           
protected static java.lang.String MSG_DUPLICATE_ORDER_DESCRIPTION
           
protected static java.lang.String MSG_ERROR_ADDING_ITEM
           
protected static java.lang.String MSG_ERROR_EDIT_ITEM
           
protected static java.lang.String MSG_ERROR_MOVE_TO_CONFIRMATION
           
protected static java.lang.String MSG_ERROR_MOVE_TO_ORDER_COMMIT
           
protected static java.lang.String MSG_ERROR_MOVE_TO_PAYMENT
           
protected static java.lang.String MSG_ERROR_MOVE_TO_PURCHASE_INFO
           
protected static java.lang.String MSG_ERROR_REMOVING_ITEM
           
protected static java.lang.String MSG_ERROR_REPRICE_ORDER
           
protected static java.lang.String MSG_ERROR_UPDATE_ORDER
           
protected static java.lang.String MSG_INVALID_QUANTITY
           
protected static java.lang.String MSG_ORDER_ALREADY_SUBMITTED
           
protected static java.lang.String MSG_UNABLE_TO_COPY_ADDRESS
           
protected static java.lang.String MSG_UNSUPPORTED_RELATIONSHIP
           
protected static java.lang.String NO_GIFTCERTIFICATE_FOUND
           
 
Fields inherited from class atg.commerce.order.OrderModifierFormHandler
ERROR_MISSING_LOCK_MANAGER, ERROR_MISSING_LOCK_PROFILE, ERROR_MISSING_TRANSACTION_MANAGER, MSG_CONCURRENT_UPDATE_ATTEMPT, MSG_ERROR_ADDING_TO_ORDER, MSG_ERROR_REMOVING_FROM_ORDER, MSG_ERROR_REMOVING_RROM_ORDER, MSG_NO_ITEM_FOUND, MSG_NO_ITEMS_TO_ADD, MSG_NO_ORDER_TO_MODIFY, MSG_NO_SKU_WITH_ID, MSG_QUANTITY_LESSTHAN_OR_EQUALTO_ZERO, 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
ShoppingCartFormHandler()
          Empty Constructor.
 
Method Summary
protected  void addConfigurableItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, boolean pIsGift)
          Adds the given item to the order (the shopping cart).
protected  void addItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, boolean pIsGift)
          Adds the given item to the order (the shopping cart).
protected  void addMoreParams(java.util.HashMap pParam)
          This helper method allows me to easily add more parameters before running the pipeline process.
protected  boolean checkDuplicateDescription(java.lang.String pDescription)
          Checks for duplicate Descriptions among the Saved orders in OrderHolder componenet.
 boolean checkFormRedirect(java.lang.String pSuccessURL, java.lang.String pFailureURL, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          If NO form errors are found, redirect to the SuccessURL.
 void copyBillingAddrToShippingAddr(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method obtains the default shipping and billing group from the order object.
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.
 void doStartService()
          This method gets called by Nucleus when the component is first created.
 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
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 getCommerceItemIdToEdit()
          Returns property CommerceItemIdToEdit.
 CommerceItem getCommerceItemToEdit()
          Return a reference to the commerce item to edit that lives in the users order.
 java.lang.String getConfigurableItemTypeName()
          Returns the configurableItemTypeName
 ShoppingCartModifierConfiguration getConfiguration()
          Returns property Configuration
 boolean getCopyBillingAddrToShippingAddr()
          If this is true then the billing address is copied to the shipping address
 java.util.List getCreditCardPaymentGroups()
          Return the CreditCardPaymentGroups property.
 java.lang.String getCreditCardPaymentTypeName()
          Return the CreditCardPaymentTypeName property.
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
 java.lang.String getDescription()
          Return the Description property.
 java.lang.String getEditItem()
          Returns property EditItem.
 java.lang.String getEditItemErrorURL()
          Returns property EditItemErrorURL
 java.lang.String getEditItemSuccessURL()
          Returns property EditItemSuccessURL
 java.lang.String getGiftCertificateNumbers()
          Return the giftCertificateNumbers property.
 java.util.List getGiftCertificatePaymentGroups()
          Return the giftCertificatePaymentGroups property.
 java.lang.String getGiftCertificatePaymentTypeName()
          Return the giftCertificatePaymentTypeName property.
 java.lang.String getGiftlistId()
          The giftlist that an item was added from
 java.lang.String getGiftlistItemId()
          The giftlist item being added
 GiftlistManager getGiftlistManager()
          The giftlist that an item was added from
 java.lang.String getItemAddedToOrderEventType()
          Returns property ItemAddedToOrderEventType
 java.lang.String getItemRemovedFromOrderEventType()
          Returns property ItemRemovedFromOrderEventType
 Order getLastOrder()
          Returns the last order that was committed.
 java.lang.String getModifyOrderPricingOp()
          Returns the pricing operation that should be performed when the order is updated
 java.lang.String getMoveToConfirmationChainId()
          Returns property MoveToConfirmationChainId
 java.lang.String getMoveToConfirmationErrorURL()
          Returns property MoveToConfirmationErrorURL
 java.lang.String getMoveToConfirmationSuccessURL()
          Returns property MoveToConfirmationSuccessURL
 java.lang.String getMoveToOrderCommitErrorURL()
          Returns property MoveToOrderCommitErrorURL
 java.lang.String getMoveToOrderCommitSuccessURL()
          Returns property MoveToOrderCommitSuccessURL
 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
 Order getOrder()
          Returns property Order, if the shoppingCart property is not null, then return the current order of the shopping cart order holder
 java.lang.String getOrderId()
          Return the OrderId property.
 java.lang.String getOrderSavedEventType()
          Returns property OrderSavedEventType
 PaymentGroup getPaymentGroup()
          Returns property PaymentGroup
 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 getRepriceOrder()
          Returns the pricing operation that should be performed by the reprice order handler method.
 java.lang.String getRepriceOrderChainId()
          Returns property RepriceOrderChainId
 java.lang.String getRepriceOrderErrorURL()
          Returns property RepriceOrderErrorURL
 java.lang.String getRepriceOrderSuccessURL()
          Returns property RepriceOrderSuccessURL
 java.lang.String getSaveOrderErrorURL()
          Return the SaveOrderErrorURL property.
 java.lang.String getSaveOrderSuccessURL()
          Return the getSaveOrderSuccessURL property.
 java.lang.String getSessionExpirationURL()
          The URL to go to if the session has expired
 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.
 OrderHolder getShoppingCart()
          Returns property ShoppingCart
 PricingModelHolder getUserPricingModels()
          Returns property UserPricingModels
 boolean handleAddConfigurableItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is used to add items to the order.
 boolean handleAddItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is used to add items to the order.
 boolean handleCheckForExpiredSession(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Check to see if the user's session has expired and redirect to sessionExpirationURL if so.
 boolean handleEditItem(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method handles the push of the EDIT button for a particular Commerce Item.
 boolean handleMoveToConfirmation(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called when the user is moving to the order confirmation page.
 boolean handleMoveToOrderCommit(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is used to submit 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 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 handleRepriceOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Reprice the order.
 boolean handleSaveOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is used to save order.
 boolean handleSetOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method handles all of the work necessary to save an Order.
 boolean handleSetOrderByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is responsible for adjusting the quantities of commerce items that exist in a users shopping cart.
protected  boolean haveId(java.lang.String pId, java.lang.String[] pIds)
          Returns true if the given id is within the supplied id array
 boolean isCheckForChangedQuantity()
          Determine if the FormHandler should checked for changes in quantities of commerce items.
 boolean isFormSubmission(DynamoHttpServletRequest pRequest)
          If it is a form submission then return true.
 boolean isFormSubmition(DynamoHttpServletRequest pRequest)
           
protected  void modifyOrder(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.
 void postAddItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called after all work is done by the handleAddItemToOrder method.
 void postEditItem(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
           
 void postMoveToConfirmation(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called after all processing is done by the handleMoveToConfirmation method.
 void postMoveToOrderCommit(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called after all processing is done by the handleMoveToOrderCommit 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 postRepriceOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method gets called after all repricing is done to the order.
 void postSaveOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Empty method that can be overriden to provide additional functionality if desired.
 void postSetOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called after all processing is done by the handleSetOrder 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 preEditItem(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pRespone)
           
 void preMoveToConfirmation(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is called before any processing is done on the handleMoveToConfirmation method is dealt with.
 void preMoveToOrderCommit(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called before any processing is done by the handleMoveToOrderCommit 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 preRepriceOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method gets called before an order is repriced.
 void preSaveOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Empty method that can be overriden to provide additional functionality if desired.
 void preSetOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called before any processing is done by the handleSetOrder method.
 void preSetOrderByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called before any processing is done by the handleSetOrderByRelationshipId method.
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 runProcessMoveToConfirmation(Order pOrder, PricingModelHolder pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
          Run the pipeline which should be executed when the handleMoveToConfirmation method is invoked
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 runProcessRepriceOrder(Order pOrder, PricingModelHolder pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
          Run the pipeline which should be executed when the order needs to be repriced.
protected  void runProcessRepriceOrder(java.lang.String pPricingOperation, Order pOrder, PricingModelHolder pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
          Run the pipeline which should be executed when the order needs to be repriced
protected  void runProcessSendScenarioEvent(Order pOrder, CommerceItem pItem, long pQuantity, java.lang.String pType)
           
protected  void runProcessSendScenarioEvent(Order pOrder, CommerceItem pItem, java.lang.String pType)
          This method is here to preserve backward compatibility.
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
protected  PipelineResult runRepricingProcess(java.lang.String pChainId, java.lang.String pPricingOperation, Order pOrder, PricingModelHolder pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
          Executes a Pipeline Chain and places the supplies method parameters into a HashMap which is supplied to the chain to execute.
protected  void saveOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
           
 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 setCheckForChangedQuantity(boolean pCheckForChangedQuantity)
          Set the checkForChangedQuantity property.
 void setCommerceItemIdToEdit(java.lang.String pCommerceItemIdToEdit)
          Sets property CommerceItemIdToEdit.
protected  void setCommerceItemProperties(CommerceItem pItem, int pItemIndex)
          Called to fill in "extra" commerce item properties.
 void setConfigurableItemTypeName(java.lang.String pConfigurableItemTypeName)
          Sets the configurableItemTypeName
 void setConfiguration(ShoppingCartModifierConfiguration pConfiguration)
          Sets property Configuration, and in the process configures the following properties: GiftlistManager UserPricingModels ShoppingCart PipelineManager AddItemToOrderChainId MoveToPurchaseInfoChainId MoveToConfirmationChainId SetOrderChainId RepriceOrderChainId Profile OrderManager CatalogTools LocalLockManager
 void setCopyBillingAddrToShippingAddr(boolean pCopyBillingAddrToShippingAddr)
           
 void setCreditCardPaymentGroups(java.util.List pCreditCardPaymentGroups)
          Set the CreditCardPaymentGroups property.
 void setCreditCardPaymentTypeName(java.lang.String pCreditCardPaymentTypeName)
          Set the CreditCardPaymentTypeName property.
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 setDescription(java.lang.String pDescription)
          Set the Description property.
 void setEditItem(java.lang.String pEditItem)
          Sets property EditItem.
 void setEditItemErrorURL(java.lang.String pEditItemErrorURL)
          Sets property EditItemErrorURL.
 void setEditItemSuccessURL(java.lang.String pEditItemSuccessURL)
          Sets property EditItemSuccessURL.
 void setGiftCertificateNumbers(java.lang.String pGiftCertificateNumbers)
          Set the giftCertificateNumbers property.
 void setGiftCertificatePaymentGroups(java.util.List pGiftCertificatePaymentGroups)
          Set the giftCertificatePaymentGroups property.
 void setGiftCertificatePaymentTypeName(java.lang.String pGiftCertificatePaymentTypeName)
          Set the giftCertificatePaymentTypeName property.
 void setGiftlistId(java.lang.String pGiftlistId)
           
 void setGiftlistItemId(java.lang.String pGiftlistItemId)
           
 void setGiftlistManager(GiftlistManager pGiftlistManager)
           
 void setItemAddedToOrderEventType(java.lang.String pItemAddedToOrderEventType)
          Sets property ItemAddedToOrderEventType
 void setItemRemovedFromOrderEventType(java.lang.String pItemRemovedFromOrderEventType)
          Sets property ItemRemovedFromOrderEventType
 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 setMoveToConfirmationChainId(java.lang.String pMoveToConfirmationChainId)
          Sets property MoveToConfirmationChainId
 void setMoveToConfirmationErrorURL(java.lang.String pMoveToConfirmationErrorURL)
          Sets property MoveToConfirmationErrorURL
 void setMoveToConfirmationSuccessURL(java.lang.String pMoveToConfirmationSuccessURL)
          Sets property MoveToConfirmationSuccessURL
 void setMoveToOrderCommitErrorURL(java.lang.String pMoveToOrderCommitErrorURL)
          Sets property MoveToOrderCommitErrorURL
 void setMoveToOrderCommitSuccessURL(java.lang.String pMoveToOrderCommitSuccessURL)
          Sets property MoveToOrderCommitSuccessURL
 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 setOrderId(java.lang.String pOrderId)
          Set the OrderId property.
 void setOrderSavedEventType(java.lang.String pOrderSavedEventType)
          Sets property OrderSavedEventType
 void setPaymentGroup(PaymentGroup pPaymentGroup)
          Sets property PaymentGroup
 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 setRepriceOrder(java.lang.String pRepriceOrder)
          Corresponds to the handle reprice order method.
 void setRepriceOrderChainId(java.lang.String pRepriceOrderChainId)
          Sets property RepriceOrderChainId
 void setRepriceOrderErrorURL(java.lang.String pRepriceOrderErrorURL)
          Sets property RepriceOrderErrorURL
 void setRepriceOrderSuccessURL(java.lang.String pRepriceOrderSuccessURL)
          Sets property RepriceOrderSuccessURL
 void setSaveOrderErrorURL(java.lang.String pSaveOrderErrorURL)
          Set the SaveOrderErrorURL property.
 void setSaveOrderSuccessURL(java.lang.String pSaveOrderSuccessURL)
          Set the SaveOrderSuccessURL property.
 void setSessionExpirationURL(java.lang.String pSessionExpirationURL)
           
 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 property ShippingGroup.
 void setShoppingCart(OrderHolder pShoppingCart)
          Sets property ShoppingCart
 void setUserPricingModels(PricingModelHolder pUserPricingModels)
          Sets property UserPricingModels
 
Methods inherited from class atg.commerce.order.OrderModifierFormHandler
acquireTransactionLock, addNewItemToOrder, afterSet, beforeSet, commitTransaction, createCommerceItem, defaultLocalLockManager, defaultUserProfile, ensureTransaction, findCommerceItem, formatUserMessage, formatUserMessage, formatUserMessage, formatUserMessage, generatePropertyPath, getAddress, getCatalogRefIds, getCatalogTools, getCreditCard, getCurrentTransaction, getDefaultLocale, getGeneralFailureURL, getGeneralSuccessURL, getGiftCertificate, getHardgoodShippingGroup, getLocalLockManager, getOrderManager, getPipelineManager, getProductId, getProfile, getQuantity, getQuantity, getResourceBundle, getResourceBundleName, getTransactionLockFactory, getTransactionManager, getUserLocale, handlePipelineError, isEnsureTransaction, isStringEmpty, isTransactionCreated, isTransactionMarkedAsRollBack, isUseLocksAroundTransactions, isUseRequestLocale, processException, processPipelineErrors, releaseTransactionLock, removeItemFromOrder, runProcess, runProcess, runProcess, setAddress, setCatalogRefIds, setCatalogTools, setCreditCard, setCurrentTransaction, setDefaultLocale, setEnsureTransaction, setGeneralFailureURL, setGeneralSuccessURL, setGiftCertificate, setHardgoodShippingGroup, setLocalLockManager, setOrder, setOrderManager, setPipelineManager, setProductId, setProfile, setQuantity, setTransactionCreated, setTransactionLockFactory, setTransactionManager, setTransactionToRollbackOnly, setUseLocksAroundTransactions, setUseRequestLocale, 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
Class version string

See Also:
Constant Field Values

MSG_ERROR_REPRICE_ORDER

protected static final java.lang.String MSG_ERROR_REPRICE_ORDER
See Also:
Constant Field Values

MSG_ERROR_UPDATE_ORDER

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

MSG_ERROR_MOVE_TO_PURCHASE_INFO

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

MSG_ERROR_MOVE_TO_CONFIRMATION

protected static final java.lang.String MSG_ERROR_MOVE_TO_CONFIRMATION
See Also:
Constant Field Values

MSG_ERROR_MOVE_TO_PAYMENT

protected static final java.lang.String MSG_ERROR_MOVE_TO_PAYMENT
See Also:
Constant Field Values

MSG_ERROR_MOVE_TO_ORDER_COMMIT

protected static final java.lang.String MSG_ERROR_MOVE_TO_ORDER_COMMIT
See Also:
Constant Field Values

MSG_ERROR_REMOVING_ITEM

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

MSG_ERROR_ADDING_ITEM

protected static final java.lang.String MSG_ERROR_ADDING_ITEM
See Also:
Constant Field Values

MSG_ERROR_EDIT_ITEM

protected static final java.lang.String MSG_ERROR_EDIT_ITEM
See Also:
Constant Field Values

MSG_UNABLE_TO_COPY_ADDRESS

protected static final java.lang.String MSG_UNABLE_TO_COPY_ADDRESS
See Also:
Constant Field Values

MSG_INVALID_QUANTITY

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

MSG_ORDER_ALREADY_SUBMITTED

protected static final java.lang.String MSG_ORDER_ALREADY_SUBMITTED
See Also:
Constant Field Values

MSG_UNSUPPORTED_RELATIONSHIP

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

GC_PAYMENT_GROUP_TYPE_NAME

protected static final java.lang.String GC_PAYMENT_GROUP_TYPE_NAME
See Also:
Constant Field Values

CC_PAYMENT_GROUP_TYPE_NAME

protected static final java.lang.String CC_PAYMENT_GROUP_TYPE_NAME
See Also:
Constant Field Values

NO_GIFTCERTIFICATE_FOUND

protected static final java.lang.String NO_GIFTCERTIFICATE_FOUND
See Also:
Constant Field Values

MSG_DUPLICATE_ORDER_DESCRIPTION

protected static final java.lang.String MSG_DUPLICATE_ORDER_DESCRIPTION
See Also:
Constant Field Values
Constructor Detail

ShoppingCartFormHandler

public ShoppingCartFormHandler()
Empty Constructor.

Method Detail

setConfiguration

public void setConfiguration(ShoppingCartModifierConfiguration pConfiguration)
Sets property Configuration, and in the process configures the following properties:


getConfiguration

public ShoppingCartModifierConfiguration getConfiguration()
Returns property Configuration


isCheckForChangedQuantity

public boolean isCheckForChangedQuantity()
Determine if the FormHandler should checked 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.

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

setOrderId

public void setOrderId(java.lang.String pOrderId)
Set the OrderId property.


getOrderId

public java.lang.String getOrderId()
Return the OrderId property.


setGiftCertificateNumbers

public void setGiftCertificateNumbers(java.lang.String pGiftCertificateNumbers)
Set the giftCertificateNumbers property.


getGiftCertificateNumbers

public java.lang.String getGiftCertificateNumbers()
Return the giftCertificateNumbers property.


setCreditCardPaymentTypeName

public void setCreditCardPaymentTypeName(java.lang.String pCreditCardPaymentTypeName)
Set the CreditCardPaymentTypeName property.


getCreditCardPaymentTypeName

public java.lang.String getCreditCardPaymentTypeName()
Return the CreditCardPaymentTypeName property.


setGiftCertificatePaymentTypeName

public void setGiftCertificatePaymentTypeName(java.lang.String pGiftCertificatePaymentTypeName)
Set the giftCertificatePaymentTypeName property.


getGiftCertificatePaymentTypeName

public java.lang.String getGiftCertificatePaymentTypeName()
Return the giftCertificatePaymentTypeName property.


setGiftCertificatePaymentGroups

public void setGiftCertificatePaymentGroups(java.util.List pGiftCertificatePaymentGroups)
Set the giftCertificatePaymentGroups property.


getGiftCertificatePaymentGroups

public java.util.List getGiftCertificatePaymentGroups()
Return the giftCertificatePaymentGroups property.


setCreditCardPaymentGroups

public void setCreditCardPaymentGroups(java.util.List pCreditCardPaymentGroups)
Set the CreditCardPaymentGroups property.


getCreditCardPaymentGroups

public java.util.List getCreditCardPaymentGroups()
Return the CreditCardPaymentGroups property.


setRemovalCatalogRefIds

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


getRemovalCatalogRefIds

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


setRemovalRelationshipIds

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


getRemovalRelationshipIds

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


setRemovalCommerceIds

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


getRemovalCommerceIds

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


setSaveOrderErrorURL

public void setSaveOrderErrorURL(java.lang.String pSaveOrderErrorURL)
Set the SaveOrderErrorURL property.


getSaveOrderErrorURL

public java.lang.String getSaveOrderErrorURL()
Return the SaveOrderErrorURL property.


setSaveOrderSuccessURL

public void setSaveOrderSuccessURL(java.lang.String pSaveOrderSuccessURL)
Set the SaveOrderSuccessURL property.


getSaveOrderSuccessURL

public java.lang.String getSaveOrderSuccessURL()
Return the getSaveOrderSuccessURL property.


getDescription

public java.lang.String getDescription()
Return the Description property.


setDescription

public void setDescription(java.lang.String pDescription)
Set the Description property.


setShippingGroup

public void setShippingGroup(ShippingGroup pShippingGroup)
Sets property ShippingGroup.

Overrides:
setShippingGroup in class OrderModifierFormHandler

getShippingGroup

public ShippingGroup getShippingGroup()
Returns property ShippingGroup.

Overrides:
getShippingGroup in class OrderModifierFormHandler

setPaymentGroup

public void setPaymentGroup(PaymentGroup pPaymentGroup)
Sets property PaymentGroup

Overrides:
setPaymentGroup in class OrderModifierFormHandler

getPaymentGroup

public PaymentGroup getPaymentGroup()
Returns property PaymentGroup

Overrides:
getPaymentGroup in class OrderModifierFormHandler

setGiftlistManager

public void setGiftlistManager(GiftlistManager pGiftlistManager)

getGiftlistManager

public GiftlistManager getGiftlistManager()
The giftlist that an item was added from


setGiftlistId

public void setGiftlistId(java.lang.String pGiftlistId)

getGiftlistId

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


setGiftlistItemId

public void setGiftlistItemId(java.lang.String pGiftlistItemId)

getGiftlistItemId

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


setUserPricingModels

public void setUserPricingModels(PricingModelHolder pUserPricingModels)
Sets property UserPricingModels


getUserPricingModels

public PricingModelHolder getUserPricingModels()
Returns property UserPricingModels


setShoppingCart

public void setShoppingCart(OrderHolder pShoppingCart)
Sets property ShoppingCart


getShoppingCart

public OrderHolder getShoppingCart()
Returns property ShoppingCart


getOrder

public Order getOrder()
Returns property Order, if the shoppingCart property is not null, then return the current order of the shopping cart order holder

Overrides:
getOrder in class OrderModifierFormHandler

getLastOrder

public Order getLastOrder()
Returns the last order that was committed.


setAddItemToOrderChainId

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


getAddItemToOrderChainId

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


setItemAddedToOrderEventType

public void setItemAddedToOrderEventType(java.lang.String pItemAddedToOrderEventType)
Sets property ItemAddedToOrderEventType


getItemAddedToOrderEventType

public java.lang.String getItemAddedToOrderEventType()
Returns property ItemAddedToOrderEventType


setItemRemovedFromOrderEventType

public void setItemRemovedFromOrderEventType(java.lang.String pItemRemovedFromOrderEventType)
Sets property ItemRemovedFromOrderEventType


getItemRemovedFromOrderEventType

public java.lang.String getItemRemovedFromOrderEventType()
Returns property ItemRemovedFromOrderEventType


setOrderSavedEventType

public void setOrderSavedEventType(java.lang.String pOrderSavedEventType)
Sets property OrderSavedEventType


getOrderSavedEventType

public java.lang.String getOrderSavedEventType()
Returns property OrderSavedEventType


setMoveToPurchaseInfoChainId

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


getMoveToPurchaseInfoChainId

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


setMoveToConfirmationChainId

public void setMoveToConfirmationChainId(java.lang.String pMoveToConfirmationChainId)
Sets property MoveToConfirmationChainId


getMoveToConfirmationChainId

public java.lang.String getMoveToConfirmationChainId()
Returns property MoveToConfirmationChainId


setSetOrderChainId

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


getSetOrderChainId

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


setRepriceOrderChainId

public void setRepriceOrderChainId(java.lang.String pRepriceOrderChainId)
Sets property RepriceOrderChainId


getRepriceOrderChainId

public java.lang.String getRepriceOrderChainId()
Returns property RepriceOrderChainId


setAddItemToOrderSuccessURL

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


getAddItemToOrderSuccessURL

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


setAddItemToOrderErrorURL

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


getAddItemToOrderErrorURL

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


setRemoveItemFromOrderByRelationshipIdSuccessURL

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


getRemoveItemFromOrderByRelationshipIdSuccessURL

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


setRemoveItemFromOrderByRelationshipIdErrorURL

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


getRemoveItemFromOrderByRelationshipIdErrorURL

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


setRemoveItemFromOrderSuccessURL

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


getRemoveItemFromOrderSuccessURL

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


setRemoveItemFromOrderErrorURL

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


getRemoveItemFromOrderErrorURL

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


setRemoveAndAddItemToOrderErrorURL

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


getRemoveAndAddItemToOrderErrorURL

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


setRemoveAndAddItemToOrderSuccessURL

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


getRemoveAndAddItemToOrderSuccessURL

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


setEditItemSuccessURL

public void setEditItemSuccessURL(java.lang.String pEditItemSuccessURL)
Sets property EditItemSuccessURL. This property is normally set on a jhtml page. It indicates which page we should redirect to if NO errors occur when the user pushes the EDIT button on the Shopping Cart page.


getEditItemSuccessURL

public java.lang.String getEditItemSuccessURL()
Returns property EditItemSuccessURL


setEditItemErrorURL

public void setEditItemErrorURL(java.lang.String pEditItemErrorURL)
Sets property EditItemErrorURL. This property is normally set on the a jhtml page. It indicates which page we should redirect to if errors occur when the user pushes the EDIT button on the Shopping Cart page.


getEditItemErrorURL

public java.lang.String getEditItemErrorURL()
Returns property EditItemErrorURL


setMoveToPurchaseInfoSuccessURL

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


getMoveToPurchaseInfoSuccessURL

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


setMoveToPurchaseInfoErrorURL

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


getMoveToPurchaseInfoErrorURL

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


setMoveToPurchaseInfoByRelIdSuccessURL

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


getMoveToPurchaseInfoByRelIdSuccessURL

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


setMoveToPurchaseInfoByRelIdErrorURL

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


getMoveToPurchaseInfoByRelIdErrorURL

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


setMoveToConfirmationSuccessURL

public void setMoveToConfirmationSuccessURL(java.lang.String pMoveToConfirmationSuccessURL)
Sets property MoveToConfirmationSuccessURL


getMoveToConfirmationSuccessURL

public java.lang.String getMoveToConfirmationSuccessURL()
Returns property MoveToConfirmationSuccessURL


setMoveToConfirmationErrorURL

public void setMoveToConfirmationErrorURL(java.lang.String pMoveToConfirmationErrorURL)
Sets property MoveToConfirmationErrorURL


getMoveToConfirmationErrorURL

public java.lang.String getMoveToConfirmationErrorURL()
Returns property MoveToConfirmationErrorURL


setMoveToOrderCommitSuccessURL

public void setMoveToOrderCommitSuccessURL(java.lang.String pMoveToOrderCommitSuccessURL)
Sets property MoveToOrderCommitSuccessURL


getMoveToOrderCommitSuccessURL

public java.lang.String getMoveToOrderCommitSuccessURL()
Returns property MoveToOrderCommitSuccessURL


setMoveToOrderCommitErrorURL

public void setMoveToOrderCommitErrorURL(java.lang.String pMoveToOrderCommitErrorURL)
Sets property MoveToOrderCommitErrorURL


getMoveToOrderCommitErrorURL

public java.lang.String getMoveToOrderCommitErrorURL()
Returns property MoveToOrderCommitErrorURL


setSetOrderByRelationshipIdSuccessURL

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


getSetOrderByRelationshipIdSuccessURL

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


setSetOrderByRelationshipIdErrorURL

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


getSetOrderByRelationshipIdErrorURL

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


setSetOrderSuccessURL

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


getSetOrderSuccessURL

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


setSetOrderErrorURL

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


getSetOrderErrorURL

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


setRepriceOrderErrorURL

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


getRepriceOrderErrorURL

public java.lang.String getRepriceOrderErrorURL()
Returns property RepriceOrderErrorURL


setRepriceOrderSuccessURL

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


getRepriceOrderSuccessURL

public java.lang.String getRepriceOrderSuccessURL()
Returns property RepriceOrderSuccessURL


setCopyBillingAddrToShippingAddr

public void setCopyBillingAddrToShippingAddr(boolean pCopyBillingAddrToShippingAddr)

getCopyBillingAddrToShippingAddr

public boolean getCopyBillingAddrToShippingAddr()
If this is true then the billing address is copied to the shipping address


setSessionExpirationURL

public void setSessionExpirationURL(java.lang.String pSessionExpirationURL)

getSessionExpirationURL

public java.lang.String getSessionExpirationURL()
The URL to go to if the session has expired


setCommerceItemIdToEdit

public void setCommerceItemIdToEdit(java.lang.String pCommerceItemIdToEdit)
Sets property CommerceItemIdToEdit. This property contains the CommerceItem the user has selected for editing. Setting this property sets other related properties at the start of the Edit Item process.


getCommerceItemIdToEdit

public java.lang.String getCommerceItemIdToEdit()
Returns property CommerceItemIdToEdit. This property returns the CommerceItem the user has selected for editing.


setEditItem

public void setEditItem(java.lang.String pEditItem)
Sets property EditItem. This property contains the CommerceItem ID (as a string) the user wants to edit. This method is called just before the handleEditItem method is invoked when user pushes the "Edit" button for a Commerce Item.


getEditItem

public java.lang.String getEditItem()
Returns property EditItem. This property contains the ProductId the user is editing.


getCommerceItemToEdit

public CommerceItem getCommerceItemToEdit()
                                   throws CommerceItemNotFoundException,
                                          InvalidParameterException
Return a reference to the commerce item to edit that lives in the users order. The object is retrieved whose id is equal to the value of the property editItem.

Returns:
a value of type 'CommerceItem'
Throws:
CommerceItemNotFoundException
InvalidParameterException

setRepriceOrder

public void setRepriceOrder(java.lang.String pRepriceOrder)
Corresponds to the handle reprice order method. This property should be set to the type of pricing operation that should be executed when the reprice order handler method is invoked. 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.


getRepriceOrder

public java.lang.String getRepriceOrder()
Returns the pricing operation that should be performed by the reprice order handler method.


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.


getAddItemToOrderPricingOp

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


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.


getModifyOrderPricingOp

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


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.


getDeleteItemsFromOrderPricingOp

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


getConfigurableItemTypeName

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


setConfigurableItemTypeName

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


doStartService

public void doStartService()
                    throws ServiceException
This method gets called by Nucleus when the component is first created. It will create a single credit card payment group and add it to the credit card payment group list (creditCardPaymentGroups).

Overrides:
doStartService in class GenericService
Throws:
ServiceException - if an error occurs

isFormSubmission

public boolean isFormSubmission(DynamoHttpServletRequest pRequest)
If it is a form submission then return true.


isFormSubmition

public boolean isFormSubmition(DynamoHttpServletRequest pRequest)

checkFormRedirect

public boolean checkFormRedirect(java.lang.String pSuccessURL,
                                 java.lang.String pFailureURL,
                                 DynamoHttpServletRequest pRequest,
                                 DynamoHttpServletResponse pResponse)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
If NO form errors are found, redirect to the SuccessURL. If form errors are found, redirect to the FailureURL. If the request coming in is for a new session (which would indicate that the session has expired or been failed over) AND is a form submission then we optionally redirect to a session expiration url.

Overrides:
checkFormRedirect in class OrderModifierFormHandler
Parameters:
pNoErrorsURL - The URL to redirect to if there were no form errors. If a null value is passed in, no redirect occurs.
pErrorsURL - The URL to redirect to if form errors were found. If a null value is passed in, no redirect occurs.
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
If redirect (for whatever reason) to a new page occurred, return false. If NO redirect occurred, return true.
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

preRepriceOrder

public void preRepriceOrder(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
This method gets called before an order is repriced. It provides a hook to easily extend the functionality of repriceOrder. 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

postRepriceOrder

public void postRepriceOrder(DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
This method gets called after all repricing is done to the order. 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

handleRepriceOrder

public boolean handleRepriceOrder(DynamoHttpServletRequest pRequest,
                                  DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
Reprice the order. It will first call the preRepriceOrder method. Then it will make a call into the pipeline chain that will reprice the order. This performed by calling the runProcessRepriceOrder method. When this has completed, it will call postRepriceOrder.

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

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.

Overrides:
handleAddItemToOrder in class OrderModifierFormHandler
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:
CartModifierFormHandler.handleAddItemToOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)

addItemToOrder

protected void addItemToOrder(DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse,
                              boolean pIsGift)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Adds the given item to the order (the shopping cart). This is done by obtaining the list of catalog items to be added from the catalogRefIds array. For each of these items, get the quantity that is to be added. This is done by calling the getQuantity method. After this information has been obtained, for each item that is to be added create a commerce item using this information plus the properties set in the productId and catalogKey. This commerce item is created by using the OrderManager. After the item has been created, the OrderManager is used to

After the item has been added to the order, the order will be repriced and a scenario event will be fired of type ItemAddedToOrder.

If pIsGift is true, this item is a gift and requires special handling. The giftlistManagers addGiftToOrder will get called.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
pIsGift - If this is true, the added items are gifts. see the giftlist property.
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

handleAddConfigurableItemToOrder

public boolean handleAddConfigurableItemToOrder(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
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:
CartModifierFormHandler.handleAddConfigurableItemToOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)

addConfigurableItemToOrder

protected void addConfigurableItemToOrder(DynamoHttpServletRequest pRequest,
                                          DynamoHttpServletResponse pResponse,
                                          boolean pIsGift)
                                   throws javax.servlet.ServletException,
                                          java.io.IOException
Adds the given item to the order (the shopping cart). This is done by obtaining the list of catalog items to be added from the catalogRefIds array. For each of these items, get the quantity that is to be added. This is done by calling the getQuantity method. After this information has been obtained, for each item that is to be added create a commerce item using this information plus the properties set in the productId and catalogKey. This commerce item is created by using the OrderManager. After the item has been created, the OrderManager is used to

After the item has been added to the order, the order will be repriced and a scenario event will be fired of type ItemAddedToOrder.

If pIsGift is true, this item is a gift and requires special handling. The giftlistManagers addGiftToOrder will get called.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
pIsGift - If this is true, the added items are gifts. see the giftlist property.
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

setCommerceItemProperties

protected void setCommerceItemProperties(CommerceItem pItem,
                                         int pItemIndex)
                                  throws CommerceException
Called to fill in "extra" commerce item properties. This implementation does nothing.

Parameters:
pItem - the CommerceItem
pItemIndex - the index of the catalogRefIds array element that corresponds to the commerce item
Throws:
CommerceException - if there was an error while executing the code

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.

Overrides:
handleRemoveItemFromOrder in class OrderModifierFormHandler
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
See Also:
CartModifierFormHandler.handleRemoveItemFromOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)

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
See Also:
CartModifierFormHandler.handleRemoveItemFromOrderByRelationshipId(DynamoHttpServletRequest, DynamoHttpServletResponse)

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.

Overrides:
handleSetOrder in class OrderModifierFormHandler
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:
CartModifierFormHandler.handleSetOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)

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:
CartModifierFormHandler.handleSetOrderByRelationshipId(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
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:
CartModifierFormHandler.handleMoveToPurchaseInfo(DynamoHttpServletRequest, DynamoHttpServletResponse)

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
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:
CartModifierFormHandler.handleMoveToPurchaseInfoByRelId(DynamoHttpServletRequest, DynamoHttpServletResponse)

preMoveToConfirmation

public void preMoveToConfirmation(DynamoHttpServletRequest pRequest,
                                  DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
This method is called before any processing is done on the handleMoveToConfirmation method is dealt with. It allows the user to easily extend the functionality for the moveToConfirmation method to take on their own functinoality. It checks to see if the billing address should be copied to the shipping address. If it should be then it calls the copyBillingAddrToShippingAddr method.

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

postMoveToConfirmation

public void postMoveToConfirmation(DynamoHttpServletRequest pRequest,
                                   DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
Called after all processing is done by the handleMoveToConfirmation 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

handleMoveToConfirmation

public boolean handleMoveToConfirmation(DynamoHttpServletRequest pRequest,
                                        DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
Called when the user is moving to the order confirmation page. It will call the preMoveToConfirmation method, then the runProcessMoveToConfirmation method. Finally, the postMoveToConfirmation will be called.

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

preMoveToOrderCommit

public void preMoveToOrderCommit(DynamoHttpServletRequest pRequest,
                                 DynamoHttpServletResponse pResponse)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
Called before any processing is done by the handleMoveToOrderCommit 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

postMoveToOrderCommit

public void postMoveToOrderCommit(DynamoHttpServletRequest pRequest,
                                  DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
Called after all processing is done by the handleMoveToOrderCommit 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

handleMoveToOrderCommit

public boolean handleMoveToOrderCommit(DynamoHttpServletRequest pRequest,
                                       DynamoHttpServletResponse pResponse)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
This method is used to submit the order. It will first call the preMoveToOrderCommit method. After this, it will ensure that the person is not trying to double submit the order by seeing if the users lastOrder is is equal to the current order id. If the order is okay to submit, the OrderManagers processOrder method will get called. If there are no errors with processing the order, then the current order in the users OrderHolder will get set to null and the submitted order will get assigned to the last order property.

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

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 RemovalCatalogRefIds 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
See Also:
CartModifierFormHandler.handleRemoveAndAddItemToOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)

preEditItem

public void preEditItem(DynamoHttpServletRequest pRequest,
                        DynamoHttpServletResponse pRespone)
                 throws javax.servlet.ServletException,
                        java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

postEditItem

public void postEditItem(DynamoHttpServletRequest pRequest,
                         DynamoHttpServletResponse pResponse)
                  throws javax.servlet.ServletException,
                         java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

handleEditItem

public boolean handleEditItem(DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
This method handles the push of the EDIT button for a particular Commerce Item. Note: Before this is invoked, the setEditItem method is invoked. It sets the CommerceItemIdToEdit property to the ID of the item being edited.

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

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. In addition we check to make sure that the item should even be included in the order any long. 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.

Throws:
javax.servlet.ServletException
java.io.IOException
CommerceException
RunProcessException

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.

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 SHIPPINGAMOUNT. If it is not, an exception wil be thrown.

Throws:
javax.servlet.ServletException
java.io.IOException
CommerceException
RunProcessException

haveId

protected final boolean haveId(java.lang.String pId,
                               java.lang.String[] pIds)
Returns true if the given id is within the supplied id array


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

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

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

runProcessMoveToConfirmation

protected void runProcessMoveToConfirmation(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 handleMoveToConfirmation 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

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

runProcessRepriceOrder

protected void runProcessRepriceOrder(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 order needs to be repriced. This method call defaults to the the pricing operation ORDER_TOTAL.

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
See Also:
atg.commerce.pricing.PricingConstants.OP_REPRICE_ORDER_TOTAL.

runProcessRepriceOrder

protected void runProcessRepriceOrder(java.lang.String pPricingOperation,
                                      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 order needs to be repriced

Parameters:
pPricingOperation - the pricing operation (e.g. order total, subtotal, shipping, etc) that should be performed.
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,
                                           java.lang.String pType)
                                    throws RunProcessException
This method is here to preserve backward compatibility. We needed to add a quantity param to add to the message.

Throws:
RunProcessException

runProcessSendScenarioEvent

protected void runProcessSendScenarioEvent(Order pOrder,
                                           CommerceItem pItem,
                                           long pQuantity,
                                           java.lang.String pType)
                                    throws RunProcessException
Throws:
RunProcessException

addMoreParams

protected void addMoreParams(java.util.HashMap pParam)
This helper method allows me to easily add more parameters before running the pipeline process. Override it when more params need to be added.


runRepricingProcess

protected PipelineResult runRepricingProcess(java.lang.String pChainId,
                                             java.lang.String pPricingOperation,
                                             Order pOrder,
                                             PricingModelHolder pPricingModels,
                                             java.util.Locale pLocale,
                                             RepositoryItem pProfile,
                                             java.util.Map pExtraParameters)
                                      throws RunProcessException
Executes a Pipeline Chain and places the supplies method parameters into a HashMap which is supplied to the chain to execute.

Parameters:
pChainId - the pipeline chain to execute
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

copyBillingAddrToShippingAddr

public void copyBillingAddrToShippingAddr(DynamoHttpServletRequest pRequest,
                                          DynamoHttpServletResponse pResponse)
                                   throws javax.servlet.ServletException,
                                          java.io.IOException
This method obtains the default shipping and billing group from the order object. It then attempt to cast these object to a specific implementation of the ShippingGroup and PaymentGroup interface (namely HardgoodShippingGroup and CreditCard). If there is a problem doing the cast then an exception is logged and this method exits with a false value. The cast is necessary in order to get at an object that actually has address information.

Parameters:
pRequest - the ServletRequest object
pResponse - the ServletResponse object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - 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

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
java.io.IOException

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
java.io.IOException
See Also:
CatalogTools

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

preSaveOrder

public void preSaveOrder(DynamoHttpServletRequest pRequest,
                         DynamoHttpServletResponse pResponse)
                  throws javax.servlet.ServletException,
                         java.io.IOException
Empty method that can be overriden to provide additional functionality if desired. Called before any processing is done by the handleSaveOrder 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

postSaveOrder

public void postSaveOrder(DynamoHttpServletRequest pRequest,
                          DynamoHttpServletResponse pResponse)
                   throws javax.servlet.ServletException,
                          java.io.IOException
Empty method that can be overriden to provide additional functionality if desired. Called after all processing is done by the handleSaveOrder 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

saveOrder

protected void saveOrder(DynamoHttpServletRequest pRequest,
                         DynamoHttpServletResponse pResponse)
                  throws javax.servlet.ServletException,
                         java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

handleSaveOrder

public boolean handleSaveOrder(DynamoHttpServletRequest pRequest,
                               DynamoHttpServletResponse pResponse)
                        throws javax.servlet.ServletException,
                               java.io.IOException
This method is used to save order. It will first make a call to preSaveOrder, then it will callsaveOrder and finally it will call postSaveOrder. It sets the description to the order if provided, otherwise it just sets a String in user's Locale representing date and time.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
true if the request was properly handled
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:
SaveOrderFormHandler.handleSaveOrder(DynamoHttpServletRequest, DynamoHttpServletResponse)

checkDuplicateDescription

protected boolean checkDuplicateDescription(java.lang.String pDescription)
Checks for duplicate Descriptions among the Saved orders in OrderHolder componenet.

Returns:
true if no duplicates are found

handleCheckForExpiredSession

public boolean handleCheckForExpiredSession(DynamoHttpServletRequest pRequest,
                                            DynamoHttpServletResponse pResponse)
                                     throws javax.servlet.ServletException,
                                            java.io.IOException
Check to see if the user's session has expired and redirect to sessionExpirationURL if so.

Throws:
javax.servlet.ServletException
java.io.IOException