atg.commerce.csr.order
Class CSRCartModifierFormHandler

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

public class CSRCartModifierFormHandler
extends atg.commerce.order.purchase.CartModifierFormHandler

This form handler is used to handle the management of new and existing orders in the CSR application.

See Also:
CartModifierFormHandler

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String COMMERCE_ITEM_TYPE
           
static java.lang.String CSR_PRICE_ADJUSTMENT_DESCRIPTION
           
static java.lang.String DEFAULT_KEY
           
static java.lang.String ERROR_WHILE_FETCHING_PRICE_LIST
           
protected  atg.commerce.catalog.CatalogTools mCatalogTools
           
protected  CSRAgentTools mCSRAgentTools
           
protected  atg.commerce.promotion.GWPManager mGwpManager
          Manager component for gift with purchase promotions
protected  atg.web.messaging.MessageTools mMessageTools
           
protected  ReturnManager mReturnManager
           
static java.lang.String MSG_CREDIT_CARD_VALIDATION_ERROR
           
static java.lang.String MSG_ERROR_CHANGING_SKU
           
static java.lang.String MSG_ERROR_PRICING_ITEM
           
static java.lang.String MSG_INVALID_NUMERIC_VALUE
           
static java.lang.String MSG_INVALID_SHIPPING_GROUP_ID
           
static java.lang.String MSG_NO_PAYMENT_GROUP
           
static java.lang.String MSG_NO_SUCH_SKU
           
static java.lang.String MSG_PAYMENT_GROUP_NOT_FOUND_IN_ORDER
           
static java.lang.String MSG_SHIPPING_GROUP_NOT_FOUND_IN_ORDER
           
static java.lang.String MSG_SKU_CHANGE_NO_COMMERCE_ITEMS
           
static java.lang.String MSG_SKU_ID_INVALID_FOR_PRODUCT_ID
           
static java.lang.String MSG_UNABLE_TO_COPY_ADDRESS
           
static java.lang.String MSG_UNABLE_TO_CREDIT_PAYMENT_GROUP
           
static java.lang.String MSG_UNABLE_TO_OVERRIDE_ITEM_PRICE
           
static java.lang.String MSG_UNABLE_TO_PERSIST_ORDER
           
static java.lang.String MY_RESOURCE_NAME
           
static java.lang.String SHIPPING_GROUP_TYPE
           
 
Fields inherited from class atg.commerce.order.purchase.CartModifierFormHandler
MSG_AMBIGUOUS_INPUT_FOR_ADD, MSG_ERROR_ADDING_TO_ORDER, MSG_ERROR_MOVE_TO_PURCHASE_INFO, MSG_ERROR_REMOVING_ITEM, MSG_ERROR_UPDATE_ORDER, MSG_INVALID_QUANTITY, MSG_NO_ITEMS_TO_ADD, MSG_NO_ORDER_TO_MODIFY, MSG_QUANTITY_LESSTHAN_OR_EQUALTO_ZERO, MSG_QUANTITY_LESSTHAN_ZERO, MSG_UNSUPPORTED_RELATIONSHIP
 
Fields inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUE
 
Fields inherited from class atg.droplet.GenericFormHandler
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
CSRCartModifierFormHandler()
           
 
Method Summary
protected  java.util.Map applyItemPriceOverrides(atg.commerce.order.Order pOrder, java.util.Map pPriceOverrides)
          Overrides the prices of the commerce items in the order based on the values in the price override property.
protected  void applyOverrides(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse, java.util.Map pQuantityChangedItems, java.util.Map pRemovedItems)
          Apply item and shipping group price overrides, save any overridden items to the context.
protected  java.util.Map applyShippingGroupPriceOverrides(atg.commerce.order.Order pOrder, java.util.Map pShippingGroupPriceOverrides)
          Overrides the prices of the shipping groups in the order based on the request parameters.
protected  void changePrice(atg.commerce.order.Order pOrder, atg.commerce.pricing.AmountInfo pAmountInfo, double pNewAmount, java.util.Map pChangedItemMap, atg.commerce.order.CommerceIdentifier pItem, java.lang.String pComponentType)
          Sees if the new price is different from the price in the AmountInfo.
protected  void changeSku(atg.commerce.order.Order pOrder, atg.commerce.order.CommerceItem pItem, java.lang.String pNewSkuId, java.util.Map pChangedItems)
          Change Sku in specified item to new Sku and add the item to the map of changed items.
protected  java.util.Map changeSkus(java.util.Map pSkuChanges)
          Perform Sku changes on the specified commerce items in the order.
 boolean clearItemPriceOverride(atg.commerce.order.CommerceItem pItem)
          Clear the price override on specified item
protected  void clearItemPriceOverrides(java.util.Collection pCommerceItems)
          Clear price overrides of specified commerce items.
 void commonPostSetOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          If persistOrder is true, call CSRAgentTools.persistOrder()
protected  java.util.Map createRepriceParameterMap()
          Creates the extra parameter map for pricing the order after form handler modifications.
 void creditPaymentGroup(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          credits a specified payment group
 void editCreditCard(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          credits a specified payment group
 void editShippingGroup(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          credits a specified payment group
 java.lang.String[] getAddressProperties()
           
 CSRAgentMessagingTools getAgentMessagingTools()
          Returns component for sending agent messages
 java.lang.Double getAmount(java.util.Map pAmountMap, java.lang.String pItemId)
          Retrieve a price override value to be used for the given catalog reference id or commerce item id.
 atg.commerce.catalog.CatalogTools getCatalogTools()
           
 java.lang.String getChangeSkusErrorURL()
          Returns property ChangeSkusErrorURL
 java.lang.String getChangeSkusSuccessURL()
          Returns property ChangeSkusSuccessURL
 java.lang.String getComment()
          Return the comment property.
protected  java.util.Map getCommerceItemRequestParameters(java.lang.String pPrefix)
           
 double getCreditAmount()
          Return the creditAmount property.
 java.lang.String getCreditCardId()
          Return the creditCardId property.
 java.lang.String getCreditPaymentGroupErrorURL()
          Get the URL to redirect to after an error is detected in handleCreditPaymentGroup
 java.lang.String getCreditPaymentGroupSuccessURL()
          Get the URL to redirect to after handleChangeShippingAddress is successfully invoked.
 CSRAgentTools getCSRAgentTools()
           
 java.lang.String getEditCreditCardErrorURL()
          Get the URL to redirect to after an error is detected in handleEditCreditCard
 java.lang.String getEditCreditCardSuccessURL()
          Get the URL to redirect to after handleEditCreditCard is successfully invoked.
 java.lang.String getEditShippingGroupErrorURL()
          Get the URL to redirect to after an error is detected in handleEditShippingGroup
 java.lang.String getEditShippingGroupSuccessURL()
          Get the URL to redirect to after handleEditShippingGroup is successfully invoked.
 atg.commerce.promotion.GWPManager getGwpManager()
          Getter for the gift with purchase manager property.
 java.lang.String getHardgoodShippingGroupId()
          Return the hardgoodShippingGroupId property.
 java.util.Map getItemPriceOverrides()
          Get the map of ID to item price override values.
 atg.web.messaging.MessageTools getMessageTools()
          Returns the MessageTools component
 atg.commerce.payment.PaymentManager getPaymentManager()
          Returns property PaymentManager
 atg.commerce.pricing.PricingTools getPricingTools()
          Returns property PricingTools
 java.lang.String getRecalculatePaymentGroupAmountsChainId()
           
 ReturnManager getReturnManager()
           
 java.lang.String getShippingGroupId()
          Get the Id of the shipping group whose address is to be changed
 java.util.Map getShippingGroupPriceOverrides()
          Get the map of ID to item price override values.
 java.lang.String getShippingMethodPropertyName()
          Get the name of the shippingMethod property in a ShippingGroup
protected  java.util.Map getSkuChange()
          Property for use when changing the Sku of one or more items in the order.
static java.lang.String getStringResource(java.lang.String pResourceName)
           
 SubmittedOrderPricingModelHolder getSubmittedOrderPricingModels()
          Returns property SubmittedOrderPricingModels
 java.lang.String getTicketId()
          Returns the Id of the current ticket
 atg.commerce.pricing.PricingModelHolder getUserPricingModels()
          Returns the PricingModelHolder that should be used for the current order.
 boolean handleChangeSkus(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This handler method is used to change the Sku of one or more commerce items in the current order.
 boolean handleCreditPaymentGroup(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Credits a specified payment group.
 boolean handleEditCreditCard(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Edits the attributes of a given credit card payment group
 boolean handleEditShippingGroup(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Edits the attributes of a given credit card payment group
protected  boolean isIncompatibleSitesException(java.lang.Exception pException)
          returns true if the given exception or its source exception is of the type IncompatibleSitesException
 boolean isPersistOrder()
           
 boolean isRecalculatePaymentGroupAmounts()
           
protected  boolean modifyCommerceItemsProperties(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse, java.util.Map pChangedItems, java.util.Map pRemovedItems)
          This method is invoked from the modifyOrder*() methods in order to allow subclasses an opportunity to implement additional processing after the quantity of items in the order has been changed.
protected  void modifyOrderPostReprice(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse, java.util.Map pChangedItems, java.util.Map pRemovedItems)
           
 void postAddItemToOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This is called after all processing is done by the handleAddItemsToOrder method.
 void postChangeSkus(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Called by handleChangeSkus() after Skus have been changed on zero or more order commerce items.
 void postCreditPaymentGroup(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This is called after all processing is done by the handleCreditPaymentGroup method.
 void postEditCreditCard(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This is called after all processing is done by the handleEditCreditCard method.
 void postEditShippingGroup(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This is called after all processing is done by the handleEditShippingGroup method.
 void postMoveToPurchaseInfo(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method extension issues an information message if the order is missing any gwp gift selections.
 void postRemoveItemFromOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Executes post remove item processing.
 void postSetOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Calls commonPostSetOrder()
 void postSetOrderByCommerceId(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Calls commonPostSetOrder()
 void postSetOrderByRelationshipId(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This is called after all processing is done by the handleSetOrderByRelationshipId method.
 void preAddItemToOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Called before any work is done by the handleAddItemToOrder method.
 void preChangeSkus(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Called before any work is done by the handleChangeSkus method.
 void preCreditPaymentGroup(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This is called before any processing is done by the handleCreditPaymentGroup method.
 void preEditCreditCard(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This is called before any processing is done by the handleEditCreditCard method.
 void preEditShippingGroup(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This is called before any processing is done by the handleEditShippingGroup method.
protected  void processChangedSkus(java.util.Map pChangedItems)
          Process commerced items for which the Sku value has changed.
 void processException(java.lang.Exception pException, java.lang.String pMsgId, atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This extension does special handling of IncomptaibleSiteExceptions so a proper resourced message will be added as a DropletException and displayed in the message bar.
protected  void runProcessRecalcPaymentGroupAmounts(atg.commerce.order.Order pOrder, atg.commerce.pricing.PricingModelHolder pPricingModels, java.util.Locale pLocale, atg.repository.RepositoryItem pProfile, java.util.Map pExtraParameters)
          Run the pipeline which recalculates the payment group amounts
protected  void runProcessSendScenarioEvent(atg.commerce.order.Order pOrder, atg.commerce.order.CommerceItem pItem, long pQuantity, java.lang.String pType)
          The runProcessSendScenarioEvent method sends a scenario event.
 void setAddressProperties(java.lang.String[] pAddressProperties)
          Set the properties of the billingAddress of a credit card whose edits should be logged
 void setAgentMessagingTools(CSRAgentMessagingTools pAgentMessagingTools)
          Sets the component for sending agent messages
 void setCatalogTools(atg.commerce.catalog.CatalogTools pCatalogTools)
          Sets the property CatalogTools.
 void setChangeSkusErrorURL(java.lang.String pChangeSkusErrorURL)
          Sets property ChangeSkusErrorURL
 void setChangeSkusSuccessURL(java.lang.String pChangeSkusSuccessURL)
          Sets property ChangeSkusSuccessURL
 void setComment(java.lang.String pComment)
          Set the comment property.
 void setCreditAmount(double pCreditAmount)
          Set the creditAmount property.
 void setCreditCardId(java.lang.String pCreditCardId)
          Set the credit card id property.
 void setCreditPaymentGroupErrorURL(java.lang.String pCreditPaymentGroupErrorURL)
          Set the URL to redirect to after an error is detected in handleCreditPaymentGroup
 void setCreditPaymentGroupSuccessURL(java.lang.String pCreditPaymentGroupSuccessURL)
          Set the URL to redirect to after handleCreditPaymentGroup is successfully invoked.
 void setCSRAgentTools(CSRAgentTools pCSRAgentTools)
          Sets the property CSRAgentTools.
 void setEditCreditCardErrorURL(java.lang.String pEditCreditCardErrorURL)
          Set the URL to redirect to after an error is detected in handleEditCreditCard
 void setEditCreditCardSuccessURL(java.lang.String pEditCreditCardSuccessURL)
          Set the URL to redirect to after editCreditCard is successfully invoked.
 void setEditShippingGroupErrorURL(java.lang.String pEditShippingGroupErrorURL)
          Set the URL to redirect to after an error is detected in handleEditShippingGroup
 void setEditShippingGroupSuccessURL(java.lang.String pEditShippingGroupSuccessURL)
          Set the URL to redirect to after handleEditShippingGroup is successfully invoked.
 void setGwpManager(atg.commerce.promotion.GWPManager pGwpManager)
          Setter for the gift with purchase manager property.
 void setHardgoodShippingGroupId(java.lang.String pHardgoodShippingGroupId)
          Set the hardgoodShippingGroupId property.
 void setMessageTools(atg.web.messaging.MessageTools pMessageTools)
           
 void setPaymentManager(atg.commerce.payment.PaymentManager pPaymentManager)
          Sets property PaymentManager
 void setPersistOrder(boolean pPersistOrder)
          If true, call CSRAgentTools.persistOrder()
 void setPricingTools(atg.commerce.pricing.PricingTools pPricingTools)
          Sets property PricingTools
 void setRecalculatePaymentGroupAmounts(boolean pRecalculatePaymentGroupAmounts)
          Boolean indicating if the payment group amounts should be recalculated after a price override.
 void setRecalculatePaymentGroupAmountsChainId(java.lang.String pRecalculatePaymentGroupAmountsChainId)
          The name of the pipeline chain that will recalculate the payment group amounts
 void setReturnManager(ReturnManager pReturnManager)
          Sets the property ReturnManager.
 void setShippingGroupId(java.lang.String pShippingGroupId)
          Set the Id of the shipping group whose address is to be changed
 void setShippingGroupPriceOverrides(java.util.Map pShippingGroupPriceOverrides)
          Set the map of item price overrides.
 void setShippingMethodPropertyName(java.lang.String pShippingMethodPropertyName)
          Set the name of the shippingMethod property in a ShippingGroup
 void setSubmittedOrderPricingModels(SubmittedOrderPricingModelHolder pSubmittedOrderPricingModels)
          Sets property SubmittedOrderPricingModels
 boolean shouldClearOverride(java.util.Map pAmountMap, java.lang.String pId)
          Return true if entry in override amount map indicates that the price override should be cleared.
protected  long valueAsLong(java.lang.Object pValue)
          Convert an object to a long if possible, otherwise throw a NumberFormatException.
 
Methods inherited from class atg.commerce.order.purchase.CartModifierFormHandler
addConfigurableItemToOrder, addConfigurableItemToOrder, addItemToOrder, addItemToOrder, addItemToShippingGroup, addMultipleItemsToOrder, addMultipleItemsToOrder, applyValueDictionary, createCommerceItem, createConfigurableSubitems, deleteItems, deleteItemsByRelationshipId, doAddItemsToOrder, getAddItemCount, getAddItemInfoClass, getAddItemsToOrderResult, getAddItemToOrderChainId, getAddItemToOrderErrorURL, getAddItemToOrderPricingOp, getAddItemToOrderSuccessURL, getAddMultipleItemsToOrderErrorURL, getAddMultipleItemsToOrderSuccessURL, getCatalogKey, getCatalogRefIds, getCommerceIds, getCommerceItemType, getConfigurableItemTypeName, getCreditCard, getDeletedSkus, getDeleteItemsFromOrderPricingOp, getGiftCertificate, getGiftlistId, getGiftlistItemId, getHardgoodShippingGroup, getInvalidQuantityCancelsAdd, getItems, getModifyOrderPricingOp, getMoveToPurchaseInfoByRelIdErrorURL, getMoveToPurchaseInfoByRelIdSuccessURL, getMoveToPurchaseInfoChainId, getMoveToPurchaseInfoErrorURL, getMoveToPurchaseInfoSuccessURL, getPaymentGroup, getProductId, getProductIds, getQuantity, getQuantity, getRemovalCatalogRefIds, getRemovalCommerceIds, getRemovalRelationshipIds, getRemoveAndAddItemToOrderErrorURL, getRemoveAndAddItemToOrderSuccessURL, getRemoveItemFromOrderByRelationshipIdErrorURL, getRemoveItemFromOrderByRelationshipIdSuccessURL, getRemoveItemFromOrderErrorURL, getRemoveItemFromOrderSuccessURL, getRepriceOrderErrorURL, getRepriceOrderSuccessURL, getSetOrderByRelationshipIdErrorURL, getSetOrderByRelationshipIdSuccessURL, getSetOrderChainId, getSetOrderErrorURL, getSetOrderSuccessURL, getShippingGroup, getShippingGroupCommerceItemRelationships, getSiteId, getValue, handleAddConfigurableItemToOrder, handleAddItemToOrder, handleAddMultipleItemsToOrder, handleMoveToPurchaseInfo, handleMoveToPurchaseInfoByCommerceId, handleMoveToPurchaseInfoByRelId, handleRemoveAndAddItemToOrder, handleRemoveItemFromOrder, handleRemoveItemFromOrderByRelationshipId, handleSetOrder, handleSetOrderByCommerceId, handleSetOrderByRelationshipId, isCheckForChangedQuantity, mergeItemInputForAdd, mergeValueDictionaries, modifyOrder, modifyOrderByCommerceId, modifyOrderByRelationshipId, postAddMultipleItemsToOrder, postRemoveAndAddItemToOrder, postRemoveItemFromOrderByRelationshipId, preAddMultipleItemsToOrder, preMoveToPurchaseInfo, preRemoveAndAddItemToOrder, preRemoveItemFromOrder, preRemoveItemFromOrderByRelationshipId, preSetOrder, preSetOrderByCommerceId, preSetOrderByRelationshipId, processGiftAddition, runProcessAddItemToOrder, runProcessAddItemToOrder, runProcessMoveToPurchaseInfo, runProcessSendScenarioEvent, runProcessSendScenarioEvent, runProcessSendScenarioEvent, runProcessSetOrder, setAddItemCount, setAddItemInfoClass, setAddItemsToOrderResult, setAddItemToOrderChainId, setAddItemToOrderErrorURL, setAddItemToOrderPricingOp, setAddItemToOrderSuccessURL, setAddMultipleItemsToOrderErrorURL, setAddMultipleItemsToOrderSuccessURL, setCatalogRefIds, setCheckForChangedQuantity, setCommerceIds, setCommerceItemProperties, setCommerceItemType, setConfigurableItemTypeName, setCreditCard, setDeletedSkus, setDeleteItemsFromOrderPricingOp, setGiftCertificate, setGiftlistId, setGiftlistItemId, setHardgoodShippingGroup, setInvalidQuantityCancelsAdd, setModifyOrderPricingOp, setMoveToPurchaseInfoByRelIdErrorURL, setMoveToPurchaseInfoByRelIdSuccessURL, setMoveToPurchaseInfoChainId, setMoveToPurchaseInfoErrorURL, setMoveToPurchaseInfoSuccessURL, setPaymentGroup, setProductId, setProductIds, setQuantity, setRemovalCatalogRefIds, setRemovalCommerceIds, setRemovalRelationshipIds, setRemoveAndAddItemToOrderErrorURL, setRemoveAndAddItemToOrderSuccessURL, setRemoveItemFromOrderByRelationshipIdErrorURL, setRemoveItemFromOrderByRelationshipIdSuccessURL, setRemoveItemFromOrderErrorURL, setRemoveItemFromOrderSuccessURL, setRepriceOrderErrorURL, setRepriceOrderSuccessURL, setSetOrderByRelationshipIdErrorURL, setSetOrderByRelationshipIdSuccessURL, setSetOrderChainId, setSetOrderErrorURL, setSetOrderSuccessURL, setShippingGroup, setSiteId, updateOrder, validateShippingGroupForAdd
 
Methods inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler
acquireTransactionLock, acquireTransactionLock, afterSet, beforeSet, checkFormRedirect, commitTransaction, copyConfiguration, defaultLocalLockManager, defaultUserProfile, doStartService, ensureTransaction, formatUserMessage, formatUserMessage, formatUserMessage, formatUserMessage, generatePropertyPath, getClaimableManager, getCommerceIdentifierPaymentInfoContainer, getCommerceItemManager, getCommerceItemShippingInfoContainer, getCommerceProfileTools, getCommercePropertyManager, getConfiguration, getCurrentTransaction, getDefaultLocale, getGiftlistManager, getHandlingInstructionManager, getLocalLockManager, getOrder, getOrderManager, getPaymentGroupManager, getPaymentGroupMapContainer, getPipelineManager, getPriceList, getPriceListId, getPriceListManager, getProfile, getProfileRepository, getPurchaseProcessHelper, getRepeatingRequestMonitor, getRepriceOrderChainId, getResourceBundle, getResourceBundle, getResourceBundleName, getSessionExpirationURL, getShippingGroupManager, getShippingGroupMapContainer, getShoppingCart, getTransactionManager, getUserLocale, getUserLocale, handlePipelineError, isEnsureTransaction, isFormSubmission, isTransactionCreated, isTransactionMarkedAsRollBack, isUseLocksAroundTransactions, isUseRequestLocale, processPipelineErrors, releaseTransactionLock, releaseTransactionLock, runProcess, runProcess, runProcess, runProcessRepriceOrder, runProcessRepriceOrder, runRepricingProcess, setClaimableManager, setCommerceIdentifierPaymentInfoContainer, setCommerceItemManager, setCommerceItemShippingInfoContainer, setCommerceProfileTools, setCommercePropertyManager, setConfiguration, setCurrentTransaction, setDefaultLocale, setEnsureTransaction, setGiftlistManager, setHandlingInstructionManager, setLocalLockManager, setOrder, setOrderManager, setPaymentGroupManager, setPaymentGroupMapContainer, setPipelineManager, setPriceListId, setPriceListManager, setProfile, setProfileRepository, setPurchaseProcessHelper, setRepeatingRequestMonitor, setRepriceOrderChainId, setSessionExpirationURL, setShippingGroupManager, setShippingGroupMapContainer, setShoppingCart, setTransactionCreated, setTransactionManager, setTransactionToRollbackOnly, setUseLocksAroundTransactions, setUseRequestLocale, setUserLocale, setUserPricingModels, transactionLockName, unsetTransactionCreated
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
 
Methods inherited from class atg.droplet.EmptyFormHandler
afterGet, beforeGet
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values

MY_RESOURCE_NAME

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

DEFAULT_KEY

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

CSR_PRICE_ADJUSTMENT_DESCRIPTION

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

SHIPPING_GROUP_TYPE

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

COMMERCE_ITEM_TYPE

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

MSG_NO_PAYMENT_GROUP

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

MSG_UNABLE_TO_COPY_ADDRESS

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

ERROR_WHILE_FETCHING_PRICE_LIST

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

MSG_ERROR_PRICING_ITEM

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

MSG_INVALID_NUMERIC_VALUE

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

MSG_ERROR_CHANGING_SKU

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

MSG_CREDIT_CARD_VALIDATION_ERROR

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

MSG_PAYMENT_GROUP_NOT_FOUND_IN_ORDER

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

MSG_SHIPPING_GROUP_NOT_FOUND_IN_ORDER

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

MSG_INVALID_SHIPPING_GROUP_ID

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

MSG_NO_SUCH_SKU

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

MSG_UNABLE_TO_CREDIT_PAYMENT_GROUP

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

MSG_UNABLE_TO_OVERRIDE_ITEM_PRICE

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

MSG_UNABLE_TO_PERSIST_ORDER

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

MSG_SKU_ID_INVALID_FOR_PRODUCT_ID

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

MSG_SKU_CHANGE_NO_COMMERCE_ITEMS

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

mMessageTools

protected atg.web.messaging.MessageTools mMessageTools

mGwpManager

protected atg.commerce.promotion.GWPManager mGwpManager
Manager component for gift with purchase promotions


mCatalogTools

protected atg.commerce.catalog.CatalogTools mCatalogTools

mCSRAgentTools

protected CSRAgentTools mCSRAgentTools

mReturnManager

protected ReturnManager mReturnManager
Constructor Detail

CSRCartModifierFormHandler

public CSRCartModifierFormHandler()
Method Detail

getMessageTools

public atg.web.messaging.MessageTools getMessageTools()
Returns the MessageTools component

Returns:
MessageTools

setMessageTools

public void setMessageTools(atg.web.messaging.MessageTools pMessageTools)

setGwpManager

public void setGwpManager(atg.commerce.promotion.GWPManager pGwpManager)
Setter for the gift with purchase manager property.

Parameters:
pGwpManager - GWPManager

getGwpManager

public atg.commerce.promotion.GWPManager getGwpManager()
Getter for the gift with purchase manager property.

Returns:
GWPManager

valueAsLong

protected long valueAsLong(java.lang.Object pValue)
                    throws java.lang.NumberFormatException
Convert an object to a long if possible, otherwise throw a NumberFormatException. The object can be either an instance of a Number or a string.

Parameters:
pValue - a Number or a String object
Returns:
the result
Throws:
java.lang.NumberFormatException

setChangeSkusErrorURL

public void setChangeSkusErrorURL(java.lang.String pChangeSkusErrorURL)
Sets property ChangeSkusErrorURL

Parameters:
pChangeSkusErrorURL - a String value

getChangeSkusErrorURL

public java.lang.String getChangeSkusErrorURL()
Returns property ChangeSkusErrorURL

Returns:
a String value

setChangeSkusSuccessURL

public void setChangeSkusSuccessURL(java.lang.String pChangeSkusSuccessURL)
Sets property ChangeSkusSuccessURL

Parameters:
pChangeSkusSuccessURL - a String value

getChangeSkusSuccessURL

public java.lang.String getChangeSkusSuccessURL()
Returns property ChangeSkusSuccessURL

Returns:
a String value

getSkuChange

protected java.util.Map getSkuChange()
Property for use when changing the Sku of one or more items in the order. The map key is the commerce item ID, and the value is the new SKU for that item.

Returns:
a possibly empty map of old to new Sku IDs

getItemPriceOverrides

public java.util.Map getItemPriceOverrides()
Get the map of ID to item price override values. The ID is the commerceItemId.

Returns:
a possibly empty map of commerceItemId to price override values

getShippingGroupPriceOverrides

public java.util.Map getShippingGroupPriceOverrides()
Get the map of ID to item price override values. The ID is the commerceItemId.

Returns:
a possibly empty map of commerceItemId to price override values

setShippingGroupPriceOverrides

public void setShippingGroupPriceOverrides(java.util.Map pShippingGroupPriceOverrides)
Set the map of item price overrides. The key is the commerceItemId and the value is the new price for that item.

Parameters:
pShippingGroupPriceOverrides - the override values

getUserPricingModels

public atg.commerce.pricing.PricingModelHolder getUserPricingModels()
Returns the PricingModelHolder that should be used for the current order.

Overrides:
getUserPricingModels in class atg.commerce.order.purchase.PurchaseProcessFormHandler
Returns:
a PricingModelHolder value
See Also:
CSREnvironmentTools.getOrderPricingModelHolder(Order)

setPersistOrder

public void setPersistOrder(boolean pPersistOrder)
If true, call CSRAgentTools.persistOrder()


isPersistOrder

public boolean isPersistOrder()

setSubmittedOrderPricingModels

public void setSubmittedOrderPricingModels(SubmittedOrderPricingModelHolder pSubmittedOrderPricingModels)
Sets property SubmittedOrderPricingModels

Parameters:
pSubmittedOrderPricingModels - a SubmittedOrderPricingModels value

getSubmittedOrderPricingModels

public SubmittedOrderPricingModelHolder getSubmittedOrderPricingModels()
Returns property SubmittedOrderPricingModels

Returns:
a SubmittedOrderPricingModels value

setCatalogTools

public void setCatalogTools(atg.commerce.catalog.CatalogTools pCatalogTools)
Sets the property CatalogTools. description: the CatalogTools component used to look up the sku


getCatalogTools

public atg.commerce.catalog.CatalogTools getCatalogTools()
Returns:
The CatalogTools component used to look up the sku

setCSRAgentTools

public void setCSRAgentTools(CSRAgentTools pCSRAgentTools)
Sets the property CSRAgentTools.


getCSRAgentTools

public CSRAgentTools getCSRAgentTools()
Returns:
The value of the property CSRAgentTools.

setReturnManager

public void setReturnManager(ReturnManager pReturnManager)
Sets the property ReturnManager.


getReturnManager

public ReturnManager getReturnManager()
Returns:
The value of the property ReturnManager.

getAddressProperties

public java.lang.String[] getAddressProperties()
Returns:
The properties of the billingAddress of a credit card whose edits should be logged

setAddressProperties

public void setAddressProperties(java.lang.String[] pAddressProperties)
Set the properties of the billingAddress of a credit card whose edits should be logged

Parameters:
pAddressProperties - the properties of the billingAddress of a credit card whose edits should be logged

setAgentMessagingTools

public void setAgentMessagingTools(CSRAgentMessagingTools pAgentMessagingTools)
Sets the component for sending agent messages

Parameters:
pAgentMessagingTools -

getAgentMessagingTools

public CSRAgentMessagingTools getAgentMessagingTools()
Returns component for sending agent messages

Returns:
AgentMessagingTools

setComment

public void setComment(java.lang.String pComment)
Set the comment property.

Parameters:
pComment - a String value

getComment

public java.lang.String getComment()
Return the comment property.

Returns:
a String value

setCreditAmount

public void setCreditAmount(double pCreditAmount)
Set the creditAmount property.

Parameters:
pCreditAmount - a double value

getCreditAmount

public double getCreditAmount()
Return the creditAmount property.

Returns:
a double value

setCreditCardId

public void setCreditCardId(java.lang.String pCreditCardId)
Set the credit card id property. This will also set the "creditCard" property to the appropriate payment group.

Parameters:
pCreditCardId - a String value

getCreditCardId

public java.lang.String getCreditCardId()
Return the creditCardId property.

Returns:
a String value

getCreditPaymentGroupErrorURL

public java.lang.String getCreditPaymentGroupErrorURL()
Get the URL to redirect to after an error is detected in handleCreditPaymentGroup


setCreditPaymentGroupErrorURL

public void setCreditPaymentGroupErrorURL(java.lang.String pCreditPaymentGroupErrorURL)
Set the URL to redirect to after an error is detected in handleCreditPaymentGroup

Parameters:
pCreditPaymentGroupErrorURL - the URL to redirect to after an error is detected in handleCreditPaymentGroup

getCreditPaymentGroupSuccessURL

public java.lang.String getCreditPaymentGroupSuccessURL()
Get the URL to redirect to after handleChangeShippingAddress is successfully invoked.


setCreditPaymentGroupSuccessURL

public void setCreditPaymentGroupSuccessURL(java.lang.String pCreditPaymentGroupSuccessURL)
Set the URL to redirect to after handleCreditPaymentGroup is successfully invoked.

Parameters:
pCreditPaymentGroupSuccessURL - the URL to redirect to after handleCreditPaymentGroup is successfully invoked.

getEditCreditCardErrorURL

public java.lang.String getEditCreditCardErrorURL()
Get the URL to redirect to after an error is detected in handleEditCreditCard


setEditCreditCardErrorURL

public void setEditCreditCardErrorURL(java.lang.String pEditCreditCardErrorURL)
Set the URL to redirect to after an error is detected in handleEditCreditCard

Parameters:
pEditCreditCardErrorURL - the URL to redirect to after an error is detected in handleEditCreditCard

getEditCreditCardSuccessURL

public java.lang.String getEditCreditCardSuccessURL()
Get the URL to redirect to after handleEditCreditCard is successfully invoked.


setEditCreditCardSuccessURL

public void setEditCreditCardSuccessURL(java.lang.String pEditCreditCardSuccessURL)
Set the URL to redirect to after editCreditCard is successfully invoked.

Parameters:
pEditCreditCardSuccessURL - the URL to redirect to after handleEditCreditCard is successfully invoked.

getEditShippingGroupErrorURL

public java.lang.String getEditShippingGroupErrorURL()
Get the URL to redirect to after an error is detected in handleEditShippingGroup


setEditShippingGroupErrorURL

public void setEditShippingGroupErrorURL(java.lang.String pEditShippingGroupErrorURL)
Set the URL to redirect to after an error is detected in handleEditShippingGroup

Parameters:
pEditShippingGroupErrorURL - the URL to redirect to after an error is detected in handleEditShippingGroup

getEditShippingGroupSuccessURL

public java.lang.String getEditShippingGroupSuccessURL()
Get the URL to redirect to after handleEditShippingGroup is successfully invoked.


setEditShippingGroupSuccessURL

public void setEditShippingGroupSuccessURL(java.lang.String pEditShippingGroupSuccessURL)
Set the URL to redirect to after handleEditShippingGroup is successfully invoked.

Parameters:
pEditShippingGroupSuccessURL - the URL to redirect to after handleEditShippingGroup is successfully invoked.

setHardgoodShippingGroupId

public void setHardgoodShippingGroupId(java.lang.String pHardgoodShippingGroupId)
Set the hardgoodShippingGroupId property. This will also set the "hardgoodShippingGroup" property to the appropriate shipping group.

Parameters:
pHardgoodShippingGroupId - a String value

getHardgoodShippingGroupId

public java.lang.String getHardgoodShippingGroupId()
Return the hardgoodShippingGroupId property.

Returns:
a String value

setPricingTools

public void setPricingTools(atg.commerce.pricing.PricingTools pPricingTools)
Sets property PricingTools

Parameters:
pPricingTools - a PricingTools value

getPricingTools

public atg.commerce.pricing.PricingTools getPricingTools()
Returns property PricingTools

Returns:
a PricingTools value

setPaymentManager

public void setPaymentManager(atg.commerce.payment.PaymentManager pPaymentManager)
Sets property PaymentManager

Parameters:
pPaymentManager - a PaymentManager value

getPaymentManager

public atg.commerce.payment.PaymentManager getPaymentManager()
Returns property PaymentManager

Returns:
a PaymentManager value

setRecalculatePaymentGroupAmounts

public void setRecalculatePaymentGroupAmounts(boolean pRecalculatePaymentGroupAmounts)
Boolean indicating if the payment group amounts should be recalculated after a price override.

Parameters:
pRecalculatePaymentGroupAmounts - boolean indicating if the payment group amounts should be recalculated after a price override

isRecalculatePaymentGroupAmounts

public boolean isRecalculatePaymentGroupAmounts()
Returns:
boolean indicating if the payment group amounts should be recalculated after a price override

setRecalculatePaymentGroupAmountsChainId

public void setRecalculatePaymentGroupAmountsChainId(java.lang.String pRecalculatePaymentGroupAmountsChainId)
The name of the pipeline chain that will recalculate the payment group amounts

Parameters:
pRecalculatePaymentGroupAmountsChainId - the name of the pipeline chain that will recalculate the payment group amounts

getRecalculatePaymentGroupAmountsChainId

public java.lang.String getRecalculatePaymentGroupAmountsChainId()
Returns:
the name of the pipeline chain that will recalculate the payment group amounts

getShippingGroupId

public java.lang.String getShippingGroupId()
Get the Id of the shipping group whose address is to be changed


setShippingGroupId

public void setShippingGroupId(java.lang.String pShippingGroupId)
Set the Id of the shipping group whose address is to be changed

Parameters:
pShippingGroupId - the Id of the shipping group whose address is to be changed

getShippingMethodPropertyName

public java.lang.String getShippingMethodPropertyName()
Get the name of the shippingMethod property in a ShippingGroup


setShippingMethodPropertyName

public void setShippingMethodPropertyName(java.lang.String pShippingMethodPropertyName)
Set the name of the shippingMethod property in a ShippingGroup

Parameters:
pShippingMethodPropertyName - the name of the shippingMethod property in a ShippingGroup

preCreditPaymentGroup

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

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

postCreditPaymentGroup

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

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

handleCreditPaymentGroup

public boolean handleCreditPaymentGroup(atg.servlet.DynamoHttpServletRequest pRequest,
                                        atg.servlet.DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
Credits a specified payment group.

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

creditPaymentGroup

public void creditPaymentGroup(atg.servlet.DynamoHttpServletRequest pRequest,
                               atg.servlet.DynamoHttpServletResponse pResponse)
                        throws java.io.IOException,
                               javax.servlet.ServletException
credits a specified payment group

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

getCommerceItemRequestParameters

protected java.util.Map getCommerceItemRequestParameters(java.lang.String pPrefix)

preEditCreditCard

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

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

postEditCreditCard

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

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

handleEditCreditCard

public boolean handleEditCreditCard(atg.servlet.DynamoHttpServletRequest pRequest,
                                    atg.servlet.DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
Edits the attributes of a given credit card payment group

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

editCreditCard

public void editCreditCard(atg.servlet.DynamoHttpServletRequest pRequest,
                           atg.servlet.DynamoHttpServletResponse pResponse)
                    throws java.io.IOException,
                           javax.servlet.ServletException
credits a specified payment group

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

preEditShippingGroup

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

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

postEditShippingGroup

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

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

handleEditShippingGroup

public boolean handleEditShippingGroup(atg.servlet.DynamoHttpServletRequest pRequest,
                                       atg.servlet.DynamoHttpServletResponse pResponse)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
Edits the attributes of a given credit card payment group

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

editShippingGroup

public void editShippingGroup(atg.servlet.DynamoHttpServletRequest pRequest,
                              atg.servlet.DynamoHttpServletResponse pResponse)
                       throws java.io.IOException,
                              javax.servlet.ServletException
credits a specified payment group

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

clearItemPriceOverride

public boolean clearItemPriceOverride(atg.commerce.order.CommerceItem pItem)
Clear the price override on specified item

Returns:
true if override was cleared, false if there was no override

clearItemPriceOverrides

protected void clearItemPriceOverrides(java.util.Collection pCommerceItems)
Clear price overrides of specified commerce items.

Parameters:
pCommerceItems - the items to clear

applyOverrides

protected void applyOverrides(atg.servlet.DynamoHttpServletRequest pRequest,
                              atg.servlet.DynamoHttpServletResponse pResponse,
                              java.util.Map pQuantityChangedItems,
                              java.util.Map pRemovedItems)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Apply item and shipping group price overrides, save any overridden items to the context.

Parameters:
pRequest - the Dynamo request
pResponse - the Dynamo response
pRemovedItems - a map of items that have been removed from the order because their quantity was set to something less than zero. 1. They key is the commerce item and the value is the old quantity.
Throws:
javax.servlet.ServletException
java.io.IOException

modifyCommerceItemsProperties

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

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

modifyOrderPostReprice

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

getAmount

public java.lang.Double getAmount(java.util.Map pAmountMap,
                                  java.lang.String pItemId)
                           throws javax.servlet.ServletException,
                                  java.io.IOException,
                                  java.text.ParseException
Retrieve a price override value to be used for the given catalog reference id or commerce item id.

Parameters:
pItemId - String value
Returns:
A price override value which will be -1 if not specified
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
java.lang.NumberFormatException - if an error occurs
java.text.ParseException

shouldClearOverride

public boolean shouldClearOverride(java.util.Map pAmountMap,
                                   java.lang.String pId)
Return true if entry in override amount map indicates that the price override should be cleared.

Parameters:
pAmountMap - the input map for the price override
pId - the ID of the item in the map

applyItemPriceOverrides

protected java.util.Map applyItemPriceOverrides(atg.commerce.order.Order pOrder,
                                                java.util.Map pPriceOverrides)
                                         throws javax.servlet.ServletException,
                                                java.io.IOException,
                                                java.text.ParseException
Overrides the prices of the commerce items in the order based on the values in the price override property.

Parameters:
pOrder - the order
pPriceOverrides - a commerceItemId -> new price map
Returns:
a map of CommerceItem -> old price for all items who's price has changed.
Throws:
javax.servlet.ServletException
java.io.IOException
java.text.ParseException

applyShippingGroupPriceOverrides

protected java.util.Map applyShippingGroupPriceOverrides(atg.commerce.order.Order pOrder,
                                                         java.util.Map pShippingGroupPriceOverrides)
                                                  throws javax.servlet.ServletException,
                                                         java.io.IOException,
                                                         java.text.ParseException
Overrides the prices of the shipping groups in the order based on the request parameters.

Parameters:
pOrder - the order
Returns:
a possibly empty map of shipping group items that have changed
Throws:
javax.servlet.ServletException
java.io.IOException
java.text.ParseException

changePrice

protected void changePrice(atg.commerce.order.Order pOrder,
                           atg.commerce.pricing.AmountInfo pAmountInfo,
                           double pNewAmount,
                           java.util.Map pChangedItemMap,
                           atg.commerce.order.CommerceIdentifier pItem,
                           java.lang.String pComponentType)
                    throws javax.servlet.ServletException,
                           java.io.IOException
Sees if the new price is different from the price in the AmountInfo. If so, it changes the price and marks it as final

Parameters:
pOrder - the order containing the item whose price is being changed
pAmountInfo - the Amount info object
pNewAmount - the new amout of the item
pChangedItemMap - a map that holds information on items in the order whose prices have changed, or null if not required
pItem - the item whose price is changing
pComponentType - the type of object (commerceItem, shippingGroup) whose price is being changed
Throws:
javax.servlet.ServletException
java.io.IOException

preAddItemToOrder

public void preAddItemToOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                              atg.servlet.DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Called before any work is done by the handleAddItemToOrder method. This will set the ProductId property if none is currently set.

Overrides:
preAddItemToOrder in class atg.commerce.order.purchase.CartModifierFormHandler
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(atg.servlet.DynamoHttpServletRequest pRequest,
                               atg.servlet.DynamoHttpServletResponse pResponse)
                        throws javax.servlet.ServletException,
                               java.io.IOException
This is called after all processing is done by the handleAddItemsToOrder method. It calls the updateState() and notifyFulfillment() methods of CSRPurchaseProcessHelper.

Overrides:
postAddItemToOrder in class atg.commerce.order.purchase.CartModifierFormHandler
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

commonPostSetOrder

public void commonPostSetOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                               atg.servlet.DynamoHttpServletResponse pResponse)
                        throws javax.servlet.ServletException,
                               java.io.IOException
If persistOrder is true, call CSRAgentTools.persistOrder()

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

postSetOrderByCommerceId

public void postSetOrderByCommerceId(atg.servlet.DynamoHttpServletRequest pRequest,
                                     atg.servlet.DynamoHttpServletResponse pResponse)
                              throws javax.servlet.ServletException,
                                     java.io.IOException
Calls commonPostSetOrder()

Overrides:
postSetOrderByCommerceId in class atg.commerce.order.purchase.CartModifierFormHandler
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

postSetOrder

public void postSetOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                         atg.servlet.DynamoHttpServletResponse pResponse)
                  throws javax.servlet.ServletException,
                         java.io.IOException
Calls commonPostSetOrder()

Overrides:
postSetOrder in class atg.commerce.order.purchase.CartModifierFormHandler
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(atg.servlet.DynamoHttpServletRequest pRequest,
                                         atg.servlet.DynamoHttpServletResponse pResponse)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException
This is called after all processing is done by the handleSetOrderByRelationshipId method. It calls the updateState() and notifyFulfillment() methods of CSRPurchaseProcessHelper.

Overrides:
postSetOrderByRelationshipId in class atg.commerce.order.purchase.CartModifierFormHandler
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

runProcessRecalcPaymentGroupAmounts

protected void runProcessRecalcPaymentGroupAmounts(atg.commerce.order.Order pOrder,
                                                   atg.commerce.pricing.PricingModelHolder pPricingModels,
                                                   java.util.Locale pLocale,
                                                   atg.repository.RepositoryItem pProfile,
                                                   java.util.Map pExtraParameters)
                                            throws atg.service.pipeline.RunProcessException
Run the pipeline which recalculates the payment group amounts

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:
atg.service.pipeline.RunProcessException

runProcessSendScenarioEvent

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

Overrides:
runProcessSendScenarioEvent in class atg.commerce.order.purchase.CartModifierFormHandler
Parameters:
pOrder - an Order value
pItem - a CommerceItem value
pQuantity - the quantity affected
pType - a String value
Throws:
atg.service.pipeline.RunProcessException - if an error occurs

getStringResource

public static java.lang.String getStringResource(java.lang.String pResourceName)
                                          throws java.util.MissingResourceException
Throws:
java.util.MissingResourceException

getTicketId

public java.lang.String getTicketId()
Returns the Id of the current ticket


createRepriceParameterMap

protected java.util.Map createRepriceParameterMap()
Creates the extra parameter map for pricing the order after form handler modifications.

Overrides:
createRepriceParameterMap in class atg.commerce.order.purchase.PurchaseProcessFormHandler
Returns:
Map of parameters or null
See Also:
CSRAgentTools.addCurrentOrderPricingParameters(Map)

changeSku

protected void changeSku(atg.commerce.order.Order pOrder,
                         atg.commerce.order.CommerceItem pItem,
                         java.lang.String pNewSkuId,
                         java.util.Map pChangedItems)
                  throws atg.commerce.CommerceException
Change Sku in specified item to new Sku and add the item to the map of changed items. Calls CommerceItemManager.setCommerceItemSku().

Parameters:
pOrder - the current order
pItem - the item
pNewSkuId - the new Sku for the item
pChangedItems - a map of items in which the Sku has been changed. The key is the CommerceItem with the new Sku value, and the associated value is the old Sku String.
Throws:
atg.commerce.CommerceException

changeSkus

protected java.util.Map changeSkus(java.util.Map pSkuChanges)
                            throws atg.commerce.CommerceException,
                                   javax.servlet.ServletException,
                                   java.io.IOException
Perform Sku changes on the specified commerce items in the order. This method iterates all entries in the pSkuChanges map, a map with a keys of commerce item ID and values of new Sku IDs, and calls changeSku() for each non-blank new Sku value that is not the same as the item's current Sku ID.

Parameters:
pSkuChanges - non-null map of commerce item ID String keys associated with Sku ID Strings.
Returns:
a potentially empty map of items that have changed. The key is the changed CommerceItem and the value is old catalogRefId (Sku) value.
Throws:
atg.commerce.CommerceException
javax.servlet.ServletException
java.io.IOException

processChangedSkus

protected void processChangedSkus(java.util.Map pChangedItems)
                           throws atg.commerce.CommerceException,
                                  atg.service.pipeline.RunProcessException
Process commerced items for which the Sku value has changed. If the map of changed items is null or empty, just return. Otherwise, it first reprices the order, then sends an ItemSkuChanged scenario event for each changed item.

Parameters:
pChangedItems - the map key is the CommerceItem with the new SKU value. The associated value is the old SKU.
Throws:
atg.commerce.CommerceException
atg.service.pipeline.RunProcessException

preChangeSkus

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

postChangeSkus

public void postChangeSkus(atg.servlet.DynamoHttpServletRequest pRequest,
                           atg.servlet.DynamoHttpServletResponse pResponse)
                    throws javax.servlet.ServletException,
                           java.io.IOException
Called by handleChangeSkus() after Skus have been changed on zero or more order commerce items.

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

handleChangeSkus

public boolean handleChangeSkus(atg.servlet.DynamoHttpServletRequest pRequest,
                                atg.servlet.DynamoHttpServletResponse pResponse)
                         throws javax.servlet.ServletException,
                                java.io.IOException
This handler method is used to change the Sku of one or more commerce items in the current order. The 'skuChange' map property should be populated with the items to change. The map keys are the commerce item IDs and the map values are the new SKU IDs. The configured CommerceItemManager's productContainsSku() method is invoked to ensure that the new SKU ID is valid for the specified commerce item.

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

postRemoveItemFromOrder

public void postRemoveItemFromOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                                    atg.servlet.DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
Executes post remove item processing.

Whe an exchange is in progress this method will force the suggested amounts to be recalculated when there are no items left in the exchange order.

Overrides:
postRemoveItemFromOrder in class atg.commerce.order.purchase.CartModifierFormHandler
Throws:
javax.servlet.ServletException
java.io.IOException

processException

public void processException(java.lang.Exception pException,
                             java.lang.String pMsgId,
                             atg.servlet.DynamoHttpServletRequest pRequest,
                             atg.servlet.DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
This extension does special handling of IncomptaibleSiteExceptions so a proper resourced message will be added as a DropletException and displayed in the message bar.

Overrides:
processException in class atg.commerce.order.purchase.PurchaseProcessFormHandler
Throws:
javax.servlet.ServletException
java.io.IOException

isIncompatibleSitesException

protected boolean isIncompatibleSitesException(java.lang.Exception pException)
returns true if the given exception or its source exception is of the type IncompatibleSitesException

Parameters:
pException -

postMoveToPurchaseInfo

public void postMoveToPurchaseInfo(atg.servlet.DynamoHttpServletRequest pRequest,
                                   atg.servlet.DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
This method extension issues an information message if the order is missing any gwp gift selections.

Overrides:
postMoveToPurchaseInfo in class atg.commerce.order.purchase.CartModifierFormHandler
Throws:
javax.servlet.ServletException
java.io.IOException