atg.projects.store.order.purchase
Class ShippingInfoFormHandler

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.ShippingGroupFormHandler
                          extended by atg.projects.store.order.purchase.ShippingInfoFormHandler
All Implemented Interfaces:
atg.commerce.util.PipelineErrorHandler, atg.droplet.DropletFormHandler, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameResolver, atg.nucleus.AdminableService, 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 ShippingInfoFormHandler
extends atg.commerce.order.purchase.ShippingGroupFormHandler

Form Handler for handling shipping related checkout processes.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string.
static java.lang.String COUNTRY_KEY_PREFIX
           
static java.lang.String COUNTRY_STATE_RESOURCES
           
protected  java.util.List mGiftShippingGroups
          property: Gift shipping groups.
protected static java.lang.String MSG_ERROR_MOVE_TO_BILLING
           
protected static java.lang.String MSG_ERROR_UPDATE_ORDER
          Error Message keys
protected static java.lang.String NICKNAME_SEPARATOR
           
 
Fields inherited from class atg.commerce.order.purchase.ShippingGroupFormHandler
mAllHardgoodCommerceItemShippingInfos, mCommerceItemShippingInfoTools, mConsolidateShippingInfosBeforeApply, mElectronicShippingGroups, MSG_ERROR_UPDATE_SHIPPINGGROUP, MSG_INVALID_SHIPPING_SPLIT_NUMBER, MSG_NO_DEFAULT_SHIPPING_GROUP, mValidateShippingGroups
 
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
ShippingInfoFormHandler()
           
 
Method Summary
protected  void addAddressValidationFormError(java.util.List pMissingProperties, atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Utility method to add form exception.
 void addShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Creates a new shipping group and adds it to the shipping group map container.
protected  java.lang.String createPricingErrorMessage(atg.commerce.pricing.PricingException pe, atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Pulls out the Cybersource error message for invalid address.
 void editShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Edits a shipping group address in the container and saves the changes to the profile if the address is in the profile's address map.
 java.lang.String getAddAddressAndMoveToMultipleShippingErrorURL()
           
 java.lang.String getAddAddressAndMoveToMultipleShippingSuccessURL()
           
 atg.core.util.Address getAddress()
           
 java.lang.String getAddShippingAddressErrorURL()
           
 java.lang.String getAddShippingAddressSuccessURL()
           
 java.util.List getAllHardgoodCommerceItemShippingInfos()
          Get the List of all the CommerceItemShippingInfos for hardgoods from the CommerceItemShippingInfoMap.
 CheckoutOptionSelections getCheckoutOptionSelections()
           
 CheckoutProgressStates getCheckoutProgressStates()
           
 java.lang.String getCouponCode()
           
 java.lang.String getDefaultShippingMethod()
           
 atg.core.util.Address getEditAddress()
           
 java.lang.String getEditShippingAddressErrorURL()
           
 java.lang.String getEditShippingAddressNickName()
           
 java.lang.String getEditShippingAddressSuccessURL()
           
 java.util.List getGiftShippingGroups()
           
 java.lang.String getMoveToBillingErrorURL()
           
 java.lang.String getMoveToBillingSuccessURL()
           
 java.lang.String getNewShipToAddressName()
           
 atg.commerce.util.PlaceUtils getPlaceUtils()
           
 java.lang.String getRemoveShippingAddressErrorURL()
           
 java.lang.String getRemoveShippingAddressNickName()
           
 java.lang.String getRemoveShippingAddressSuccessURL()
           
 boolean getSaveShippingAddress()
           
 java.lang.String getShippingAddressNewNickName()
           
 atg.nucleus.ServiceMap getShippingGroupInitializers()
          Return the ShippingGroupInitializers property.
 StoreShippingProcessHelper getShippingHelper()
           
 java.lang.String getShippingMethod()
           
 java.lang.String getShipToAddressName()
           
 boolean getShipToNewAddress()
           
 java.lang.String getUpdateShippingMethodErrorURL()
           
 java.lang.String getUpdateShippingMethodSuccessURL()
           
 boolean getUseShippingForBilling()
           
 boolean handleAddAddressAndMoveToMultipleShipping(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This handler method will a new shipping group to the ShippingGroupMapContainer if new shipping address is not empty.
 boolean handleAddShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Adds a new shipping group to the ShippingGroupMapContainer.
 boolean handleCancel(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Override handleCancel to clear form exceptions so that error message about missing required fields is not displayed when a shopper hits "Cancel"
 boolean handleCreateAndMoveToBilling(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This handler method will validate new shipping address and apply the shipping groups to the order.
 boolean handleEditShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Handler for editing an address.
 boolean handleInitEditAddressForm(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Initializes the address property with the shipping group address identified by the editNickName.
 boolean handleInitMultipleShippingForm(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Initializes the form handler for multiple shipping group selection.
 boolean handleInitSingleShippingForm(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Initializes the form handler for single shipping group selection.
 boolean handleMoveToBilling(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This handler method will validate shipping address and apply the shipping groups to the order.
 boolean handleRemoveShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Handler for removing a shipping address.
 boolean handleUpdateShippingMethod(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Handler for editing shipping group's shipping method.
 boolean isEmptyNewAddress(atg.core.util.ContactInfo pAddress)
          Checks whether new address is empty.
 boolean isMultipleNonGiftHardgoodItems()
          Determines if the total quantity of all non-gift hardgood items is more than one.
 boolean isSingleShippingGroupCheckout()
           
 void moveToBilling(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Applies the data in the CommerceItemShippingInfoContainer and ShippingGroupMapContainer to the order.
 void postAddShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Copies the new shipping group address to the order's credit card payment group address.
 void postEditShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Post edit shipping address processing.
 void postMoveToBilling(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method will reprice the order to catch address problems through CyberSource.
 void postRemoveShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Post remove shipping address processing.
protected  void postSetupGiftShippingDetails(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Perform any post actions after setting up gift shipping groups
protected  void postShipToMultipleAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Sets the profile default shipping method if not set already
protected  void postShipToNewAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method initializes the billing address from the shipping address if the user selected that option.
protected  void postShipToProfileAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method initializes the billing address from the shipping address if the user selected that option.
 void postUpdateShippingMethod(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Post edit shipping method processing.
 void preAddShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Validates the selected nickname and address properties.
 void preEditShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Validates the address properties.
 void preMoveToBilling(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method validates the user inputs for the Move To Billing process
 void preRemoveShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Pre remove shipping address processing.
protected  void preSetupGiftShippingDetails(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Perfirms validations for Gift Shipping Groups in the order, against the selected shipping method and shipping restrictions
protected  void preShipToMultipleAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method performs input data validations for multiple shipping addresses specified by shopper
protected  void preShipToNewAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Performs input data validations for new shipping address specified by shopper
protected  void preShipToProfileAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method provides inputa data validations for a profile shipping address selected by shopper
 void preUpdateShippingMethod(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Validates the shipping group's shipping method.
protected  void processShippingRestrictionsErrors(java.util.List pshippingValidationResult, atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Process shipping restriction errors and add them to form exceptions
 void removeShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Removes a shipping group address from the container.
protected  void repriceOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Logic to reprice order, and parse any errors.
 void setAddAddressAndMoveToMultipleShippingErrorURL(java.lang.String pAddAddressAndMoveToMultipleShippingErrorURL)
           
 void setAddAddressAndMoveToMultipleShippingSuccessURL(java.lang.String pAddAddressAndMoveToMultipleShippingSuccessURL)
           
 void setAddress(atg.core.util.Address pAddress)
           
 void setAddShippingAddressErrorURL(java.lang.String pAddShippingAddressErrorURL)
           
 void setAddShippingAddressSuccessURL(java.lang.String pAddShippingAddressSuccessURL)
           
 void setCheckoutOptionSelections(CheckoutOptionSelections pCheckoutOptionSelections)
           
 void setCheckoutProgressStates(CheckoutProgressStates pCheckoutProgressStates)
           
 void setCouponCode(java.lang.String pCouponCode)
           
 void setDefaultShippingMethod(java.lang.String pDefaultShippingMethod)
           
 void setEditAddress(atg.core.util.Address pEditAddress)
           
 void setEditShippingAddressErrorURL(java.lang.String pEditShippingAddressErrorURL)
           
 void setEditShippingAddressNickName(java.lang.String pEditShippingAddressNickName)
           
 void setEditShippingAddressSuccessURL(java.lang.String pEditShippingAddressSuccessURL)
           
 void setMoveToBillingErrorURL(java.lang.String pMoveToBillingErrorURL)
           
 void setMoveToBillingSuccessURL(java.lang.String pMoveToBillingSuccessURL)
           
 void setNewShipToAddressName(java.lang.String pNewShipToAddressName)
           
 void setPlaceUtils(atg.commerce.util.PlaceUtils pPlaceUtils)
          Sets place utils
 void setRemoveShippingAddressErrorURL(java.lang.String pRemoveShippingAddressErrorURL)
           
 void setRemoveShippingAddressNickName(java.lang.String pRemoveShippingAddressNickName)
           
 void setRemoveShippingAddressSuccessURL(java.lang.String pRemoveShippingAddressSuccessURL)
           
 void setSaveShippingAddress(boolean pSaveShippingAddress)
           
 void setShippingAddressNewNickName(java.lang.String pShippingAddressNewNickName)
           
 void setShippingGroupInitializers(atg.nucleus.ServiceMap pShippingGroupInitializers)
          Set the ShippingGroupInitializers property.
 void setShippingHelper(StoreShippingProcessHelper pShippingHelper)
           
 void setShippingMethod(java.lang.String pShippingMethod)
           
 void setShipToAddressName(java.lang.String pShipToAddressName)
           
 void setShipToNewAddress(boolean pShipToNewAddress)
           
 void setSingleShippingGroupCheckout(boolean pSingleShippingGroupCheckout)
           
 void setUpdateShippingMethodErrorURL(java.lang.String pUpdateShippingMethodErrorURL)
           
 void setUpdateShippingMethodSuccessURL(java.lang.String pUpdateShippingMethodSuccessURL)
           
protected  void setupGiftShippingDetails(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Setup shipping details for gift shipping groups
 void setUseShippingForBilling(boolean pUseShippingForBilling)
           
protected  void shipToMultipleAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Setup multi shipping details for shipping to profile addresses
protected  void shipToNewAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Setup single shipping details for shipping to a new address
protected  void shipToProfileAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Setup single shipping details for shipping to profile addresses
protected  void splitShippingGroupsByMethod(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Creates separate shipping groups for the same shipping addresses but with different shipping methods.
 void updateShippingMethod(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Save changes to shipping groups.
protected  void validateAddressNickname(java.lang.String pNickName, atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Validate address nickname for duplicacy
protected  void validateMultiShippingAddresses(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Validate the shipping addresses on the multi shipping page
protected  void validateShippingAddress(atg.core.util.Address pAddress, atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Validates the new address.
protected  void validateShippingMethod(atg.core.util.Address pAddress, java.lang.String pShippingMethod, atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Validates the new address - Make sure user isn't trying to Express ship to AK, etc.
protected  void validateShippingMethodForContainerShippingGroups(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Validates the shipping group addresses against the provided shipping method.
protected  void validateShippingMethodForGiftShippingGroups(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Validate the gift shipping addresses against the shipping methods being used.
protected  void validateShippingRestrictions(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Determines if the customer is attempting to ship an item to a country that is restricted.
 
Methods inherited from class atg.commerce.order.purchase.ShippingGroupFormHandler
addShippingGroupToMap, applyCommerceItemShippingInfo, applyDefaultShippingGroup, applyShippingGroups, consolidateShippingInfos, getApplyShippingGroupsErrorURL, getApplyShippingGroupsSuccessURL, getCommerceItemShippingInfoTools, getCurrentList, getCurrentShippingGroup, getDefaultShippingGroupName, getElectronicShippingGroups, getFirstNonGiftHardgoodShippingGroupWithRels, getListId, getLocale, getNonGiftHardgoodShippingGroupCount, getNonGiftHardgoodShippingGroups, getShippingGroup, getShippingGroupId, getSpecifyDefaultShippingGroupErrorURL, getSpecifyDefaultShippingGroupSuccessURL, getSplitShippingInfosErrorURL, getSplitShippingInfosSuccessURL, getValidateShippingGroupsChainId, handleApplyShippingGroups, handleSpecifyDefaultShippingGroup, handleSplitShippingInfos, isAnyElectronicShippingGroups, isAnyHardgoodShippingGroups, isAnyNonGiftHardgoodShippingGroups, isApplyDefaultShippingGroup, isConsolidateShippingInfosBeforeApply, isMultipleHardgoodShippingGroupsWithRelationships, isMultipleNonGiftHardgoodShippingGroups, isShippingGroupInOrder, isValidateShippingGroups, mergeCommerceItemShippingInfos, postApplyShippingGroups, postSpecifyDefaultShippingGroup, postSplitShippingInfos, preApplyShippingGroups, preSpecifyDefaultShippingGroup, preSplitShippingInfos, removeShippingGroupFromMap, runProcessValidateShippingGroups, setApplyDefaultShippingGroup, setApplyShippingGroupsErrorURL, setApplyShippingGroupsSuccessURL, setCommerceItemShippingInfoTools, setConsolidateShippingInfosBeforeApply, setCurrentList, setCurrentShippingGroup, setDefaultShippingGroupName, setListId, setLocale, setShippingGroupId, setSpecifyDefaultShippingGroupErrorURL, setSpecifyDefaultShippingGroupSuccessURL, setSplitShippingInfosErrorURL, setSplitShippingInfosSuccessURL, setValidateShippingGroups, setValidateShippingGroupsChainId, specifyDefaultShippingGroup, splitCommerceItemShippingInfoByQuantity, splitShippingInfos
 
Methods inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler
acquireTransactionLock, acquireTransactionLock, afterSet, beforeSet, checkFormRedirect, commitTransaction, copyConfiguration, createRepriceParameterMap, defaultLocalLockManager, defaultUserProfile, doStartService, ensureTransaction, formatUserMessage, formatUserMessage, formatUserMessage, formatUserMessage, generatePropertyPath, getClaimableManager, getCommerceIdentifierPaymentInfoContainer, getCommerceItemManager, getCommerceItemShippingInfoContainer, getCommerceProfileTools, getCommercePropertyManager, getConfiguration, getCurrentTransaction, getDefaultLocale, getGiftlistManager, getHandlingInstructionManager, getLocalLockManager, getOrder, getOrderManager, getPaymentGroupManager, getPaymentGroupMapContainer, getPipelineManager, getPriceList, getPriceListId, getPriceListManager, getProfile, getProfileRepository, getPurchaseProcessHelper, getRepeatingRequestMonitor, getRepriceOrderChainId, getResourceBundle, getResourceBundle, getResourceBundleName, getSessionExpirationURL, getShippingGroupManager, getShippingGroupMapContainer, getShoppingCart, getTransactionManager, getUserLocale, getUserLocale, getUserPricingModels, handlePipelineError, isEnsureTransaction, isFormSubmission, isTransactionCreated, isTransactionMarkedAsRollBack, isUseLocksAroundTransactions, isUseRequestLocale, processException, processPipelineErrors, releaseTransactionLock, releaseTransactionLock, runProcess, runProcess, runProcess, runProcessRepriceOrder, runProcessRepriceOrder, runRepricingProcess, setClaimableManager, setCommerceIdentifierPaymentInfoContainer, setCommerceItemManager, setCommerceItemShippingInfoContainer, setCommerceProfileTools, setCommercePropertyManager, setConfiguration, setCurrentTransaction, setDefaultLocale, setEnsureTransaction, setGiftlistManager, setHandlingInstructionManager, setLocalLockManager, setOrder, setOrderManager, setPaymentGroupManager, setPaymentGroupMapContainer, setPipelineManager, setPriceListId, setPriceListManager, setProfile, setProfileRepository, setPurchaseProcessHelper, setRepeatingRequestMonitor, setRepriceOrderChainId, setSessionExpirationURL, setShippingGroupManager, setShippingGroupMapContainer, setShoppingCart, setTransactionCreated, setTransactionManager, setTransactionToRollbackOnly, setUseLocksAroundTransactions, setUseRequestLocale, setUserLocale, setUserPricingModels, transactionLockName, unsetTransactionCreated
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, 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, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, 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, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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 java.lang.String CLASS_VERSION
Class version string.


NICKNAME_SEPARATOR

protected static java.lang.String NICKNAME_SEPARATOR

COUNTRY_KEY_PREFIX

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

COUNTRY_STATE_RESOURCES

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

MSG_ERROR_UPDATE_ORDER

protected static java.lang.String MSG_ERROR_UPDATE_ORDER
Error Message keys


MSG_ERROR_MOVE_TO_BILLING

protected static java.lang.String MSG_ERROR_MOVE_TO_BILLING

mGiftShippingGroups

protected java.util.List mGiftShippingGroups
property: Gift shipping groups.

Constructor Detail

ShippingInfoFormHandler

public ShippingInfoFormHandler()
Method Detail

getCheckoutProgressStates

public CheckoutProgressStates getCheckoutProgressStates()

setCheckoutProgressStates

public void setCheckoutProgressStates(CheckoutProgressStates pCheckoutProgressStates)

getShippingHelper

public StoreShippingProcessHelper getShippingHelper()
Returns:
the Shipping Helper component.

setShippingHelper

public void setShippingHelper(StoreShippingProcessHelper pShippingHelper)
Parameters:
pShippingHelper - the shipping helper component to set.

getCheckoutOptionSelections

public CheckoutOptionSelections getCheckoutOptionSelections()
Returns:
the CheckoutOptionSelections component.

setCheckoutOptionSelections

public void setCheckoutOptionSelections(CheckoutOptionSelections pCheckoutOptionSelections)
Parameters:
pCheckoutOptionSelections - the CheckoutOptionSelections component to set.

setShippingGroupInitializers

public void setShippingGroupInitializers(atg.nucleus.ServiceMap pShippingGroupInitializers)
Set the ShippingGroupInitializers property.

Overrides:
setShippingGroupInitializers in class atg.commerce.order.purchase.ShippingGroupFormHandler
Parameters:
pShippingGroupInitializers - a ServiceMap value

getShippingGroupInitializers

public atg.nucleus.ServiceMap getShippingGroupInitializers()
Return the ShippingGroupInitializers property.

Overrides:
getShippingGroupInitializers in class atg.commerce.order.purchase.ShippingGroupFormHandler
Returns:
a ServiceMap value

getDefaultShippingMethod

public java.lang.String getDefaultShippingMethod()
Returns:
the default shipping method name.

setDefaultShippingMethod

public void setDefaultShippingMethod(java.lang.String pDefaultShippingMethod)
Parameters:
pDefaultShippingMethod - - the default shipping method to set.

getPlaceUtils

public atg.commerce.util.PlaceUtils getPlaceUtils()
Returns:
place utils

setPlaceUtils

public void setPlaceUtils(atg.commerce.util.PlaceUtils pPlaceUtils)
Sets place utils

Parameters:
pPlaceUtils -

getShippingMethod

public java.lang.String getShippingMethod()
Returns:
the shipping method.

setShippingMethod

public void setShippingMethod(java.lang.String pShippingMethod)
Parameters:
pShippingMethod - - the shipping method to set.

isSingleShippingGroupCheckout

public boolean isSingleShippingGroupCheckout()
Returns:
true if single shipping group should be checkouted, false - otherwise.

setSingleShippingGroupCheckout

public void setSingleShippingGroupCheckout(boolean pSingleShippingGroupCheckout)
Parameters:
pSingleShippingGroupCheckout - - true if single shipping group should be checkouted, false - otherwise.

getUseShippingForBilling

public boolean getUseShippingForBilling()
Returns:
true if shipping address should be used for billing, false - otherwise.

setUseShippingForBilling

public void setUseShippingForBilling(boolean pUseShippingForBilling)
Parameters:
pUseShippingForBilling - - true if shipping address should be used for billing, false otherwise.

getSaveShippingAddress

public boolean getSaveShippingAddress()
Returns:
true if shipping address should be saved, false - otherwise.

setSaveShippingAddress

public void setSaveShippingAddress(boolean pSaveShippingAddress)
Parameters:
pSaveShippingAddress - - true if shipping address should be saved, false - otherwise.

getShipToNewAddress

public boolean getShipToNewAddress()
Returns:
true if shipping will be performed to the new address, false - otherwise.

setShipToNewAddress

public void setShipToNewAddress(boolean pShipToNewAddress)
Parameters:
pShipToNewAddress - - true if shipping will be performed to the new address, false - otherwise.

getShipToAddressName

public java.lang.String getShipToAddressName()
Returns:
shipping address.

setShipToAddressName

public void setShipToAddressName(java.lang.String pShipToAddressName)
Parameters:
pShipToAddressName - - shipping address.

getNewShipToAddressName

public java.lang.String getNewShipToAddressName()
Returns:
new shipping address.

setNewShipToAddressName

public void setNewShipToAddressName(java.lang.String pNewShipToAddressName)
Parameters:
pNewShipToAddressName - - new shipping address.

getEditShippingAddressNickName

public java.lang.String getEditShippingAddressNickName()
Returns:
the edit shipping address nickname.

setEditShippingAddressNickName

public void setEditShippingAddressNickName(java.lang.String pEditShippingAddressNickName)
Parameters:
pEditShippingAddressNickName - - the edit shipping address nickname to set.

getRemoveShippingAddressNickName

public java.lang.String getRemoveShippingAddressNickName()
Returns:
the remove shipping address nickname.

setRemoveShippingAddressNickName

public void setRemoveShippingAddressNickName(java.lang.String pRemoveShippingAddressNickName)
Parameters:
pRemoveShippingAddressNickName - - the remove shipping address nickname to set.

getShippingAddressNewNickName

public java.lang.String getShippingAddressNewNickName()
Returns:
the shipping address new nickname.

setShippingAddressNewNickName

public void setShippingAddressNewNickName(java.lang.String pShippingAddressNewNickName)
Parameters:
pShippingAddressNewNickName - - the shipping address new nickname to set.

getAddress

public atg.core.util.Address getAddress()
Returns:
the address.

setAddress

public void setAddress(atg.core.util.Address pAddress)
Parameters:
pAddress - - the address to set.

getEditAddress

public atg.core.util.Address getEditAddress()
Returns:
the edit address.

setEditAddress

public void setEditAddress(atg.core.util.Address pEditAddress)
Parameters:
pEditAddress - - the edit address to set.

getMoveToBillingErrorURL

public java.lang.String getMoveToBillingErrorURL()
Returns:
move to billing error redirect URL.

setMoveToBillingErrorURL

public void setMoveToBillingErrorURL(java.lang.String pMoveToBillingErrorURL)
Parameters:
pMoveToBillingErrorURL - - move to billing error redirect URL.

getMoveToBillingSuccessURL

public java.lang.String getMoveToBillingSuccessURL()
Returns:
move to billing success redirect URL.

setMoveToBillingSuccessURL

public void setMoveToBillingSuccessURL(java.lang.String pMoveToBillingSuccessURL)
Parameters:
pMoveToBillingSuccessURL - - move to billing success redirect URL.

getAddShippingAddressSuccessURL

public java.lang.String getAddShippingAddressSuccessURL()
Returns:
the add shipping address success redirect URL.

setAddShippingAddressSuccessURL

public void setAddShippingAddressSuccessURL(java.lang.String pAddShippingAddressSuccessURL)
Parameters:
pAddShippingAddressSuccessURL - - the add shipping address success redirect URL to set.

getAddShippingAddressErrorURL

public java.lang.String getAddShippingAddressErrorURL()
Returns:
the add shipping address error redirect URL.

setAddShippingAddressErrorURL

public void setAddShippingAddressErrorURL(java.lang.String pAddShippingAddressErrorURL)
Parameters:
pAddShippingAddressErrorURL - - the add shipping address error redirect URL to set.

getEditShippingAddressSuccessURL

public java.lang.String getEditShippingAddressSuccessURL()
Returns:
the edit shipping address success redirect URL.

setEditShippingAddressSuccessURL

public void setEditShippingAddressSuccessURL(java.lang.String pEditShippingAddressSuccessURL)
Parameters:
pEditShippingAddressSuccessURL - - the edit shipping address success redirect URL to set.

getEditShippingAddressErrorURL

public java.lang.String getEditShippingAddressErrorURL()
Returns:
the edit shipping address error URL.

setEditShippingAddressErrorURL

public void setEditShippingAddressErrorURL(java.lang.String pEditShippingAddressErrorURL)
Parameters:
pEditShippingAddressErrorURL - - the edit shipping address error redirect URL to set.

getRemoveShippingAddressSuccessURL

public java.lang.String getRemoveShippingAddressSuccessURL()
Returns:
the remove shipping address success redirect URL.

setRemoveShippingAddressSuccessURL

public void setRemoveShippingAddressSuccessURL(java.lang.String pRemoveShippingAddressSuccessURL)
Parameters:
pRemoveShippingAddressSuccessURL - - the remove shipping address success redirect URL to set.

getRemoveShippingAddressErrorURL

public java.lang.String getRemoveShippingAddressErrorURL()
Returns:
the remove shipping address error URL.

setRemoveShippingAddressErrorURL

public void setRemoveShippingAddressErrorURL(java.lang.String pRemoveShippingAddressErrorURL)
Parameters:
pRemoveShippingAddressErrorURL - - the remove shipping address error redirect URL to set.

getAddAddressAndMoveToMultipleShippingSuccessURL

public java.lang.String getAddAddressAndMoveToMultipleShippingSuccessURL()
Returns:
the Add Shipping Address and Move to Multiple Shipping success redirect URL.

setAddAddressAndMoveToMultipleShippingSuccessURL

public void setAddAddressAndMoveToMultipleShippingSuccessURL(java.lang.String pAddAddressAndMoveToMultipleShippingSuccessURL)
Parameters:
pAddAddressAndMoveToMultipleShippingSuccessURL - - the Add Shipping Address and Move to Multiple Shipping success redirect URL to set.

getAddAddressAndMoveToMultipleShippingErrorURL

public java.lang.String getAddAddressAndMoveToMultipleShippingErrorURL()
Returns:
the Add Shipping Address and Move to Multiple Shipping error redirect URL.

setAddAddressAndMoveToMultipleShippingErrorURL

public void setAddAddressAndMoveToMultipleShippingErrorURL(java.lang.String pAddAddressAndMoveToMultipleShippingErrorURL)
Parameters:
pAddAddressAndMoveToMultipleShippingErrorURL - - the Add Shipping Address and Move to Multiple Shipping error redirect URL to set.

getUpdateShippingMethodSuccessURL

public java.lang.String getUpdateShippingMethodSuccessURL()
Returns:
the update shipping method success redirect URL.

setUpdateShippingMethodSuccessURL

public void setUpdateShippingMethodSuccessURL(java.lang.String pUpdateShippingMethodSuccessURL)
Parameters:
pUpdateShippingMethodSuccessURL - - the update shipping method success redirect URL to set.

getUpdateShippingMethodErrorURL

public java.lang.String getUpdateShippingMethodErrorURL()
Returns:
the update shipping method error redirect URL.

setUpdateShippingMethodErrorURL

public void setUpdateShippingMethodErrorURL(java.lang.String pUpdateShippingMethodErrorURL)
Parameters:
pUpdateShippingMethodErrorURL - - the update shipping method error redirect URL to set.

getGiftShippingGroups

public java.util.List getGiftShippingGroups()
Overrides:
getGiftShippingGroups in class atg.commerce.order.purchase.ShippingGroupFormHandler
Returns:
a list of all shipping groups that contain gifts.

getAllHardgoodCommerceItemShippingInfos

public java.util.List getAllHardgoodCommerceItemShippingInfos()
Get the List of all the CommerceItemShippingInfos for hardgoods from the CommerceItemShippingInfoMap. If a CommerceItemShippingInfo has no shipping group, assume the item represents hardgoods.

Overrides:
getAllHardgoodCommerceItemShippingInfos in class atg.commerce.order.purchase.ShippingGroupFormHandler
Returns:
a List value - All hardgood commerce item shipping information.

isMultipleNonGiftHardgoodItems

public boolean isMultipleNonGiftHardgoodItems()
Determines if the total quantity of all non-gift hardgood items is more than one.

Returns:
true if the the non-gift hg item quantity is more than one.

handleCancel

public boolean handleCancel(atg.servlet.DynamoHttpServletRequest pRequest,
                            atg.servlet.DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Override handleCancel to clear form exceptions so that error message about missing required fields is not displayed when a shopper hits "Cancel"

Overrides:
handleCancel in class atg.droplet.GenericFormHandler
Throws:
javax.servlet.ServletException
java.io.IOException

handleCreateAndMoveToBilling

public boolean handleCreateAndMoveToBilling(atg.servlet.DynamoHttpServletRequest pRequest,
                                            atg.servlet.DynamoHttpServletResponse pResponse)
                                     throws javax.servlet.ServletException,
                                            java.io.IOException
This handler method will validate new shipping address and apply the shipping groups to the order.

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

handleMoveToBilling

public boolean handleMoveToBilling(atg.servlet.DynamoHttpServletRequest pRequest,
                                   atg.servlet.DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
This handler method will validate shipping address and apply the shipping groups to the order.

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

getCouponCode

public java.lang.String getCouponCode()
Returns:
a coupon code to be claimed

setCouponCode

public void setCouponCode(java.lang.String pCouponCode)

preMoveToBilling

public void preMoveToBilling(atg.servlet.DynamoHttpServletRequest pRequest,
                             atg.servlet.DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
This method validates the user inputs for the Move To Billing process

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

moveToBilling

public void moveToBilling(atg.servlet.DynamoHttpServletRequest pRequest,
                          atg.servlet.DynamoHttpServletResponse pResponse)
                   throws javax.servlet.ServletException,
                          java.io.IOException
Applies the data in the CommerceItemShippingInfoContainer and ShippingGroupMapContainer to the order.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
See Also:
ShippingGroupFormHandler.applyShippingGroups(DynamoHttpServletRequest, DynamoHttpServletResponse)

postMoveToBilling

public void postMoveToBilling(atg.servlet.DynamoHttpServletRequest pRequest,
                              atg.servlet.DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
This method will reprice the order to catch address problems through CyberSource.

Initializes the billing address from the shipping address if the user selected that option.

Saves addresses in the profile, if the user selected that option.

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

preShipToProfileAddress

protected void preShipToProfileAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                       atg.servlet.DynamoHttpServletResponse pResponse)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
This method provides inputa data validations for a profile shipping address selected by shopper

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

shipToProfileAddress

protected void shipToProfileAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                    atg.servlet.DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
Setup single shipping details for shipping to profile addresses

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

postShipToProfileAddress

protected void postShipToProfileAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                        atg.servlet.DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
This method initializes the billing address from the shipping address if the user selected that option. Saves addresses in the profile, if the user selected that option.

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

preShipToMultipleAddress

protected void preShipToMultipleAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                        atg.servlet.DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
This method performs input data validations for multiple shipping addresses specified by shopper

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

validateMultiShippingAddresses

protected void validateMultiShippingAddresses(atg.servlet.DynamoHttpServletRequest pRequest,
                                              atg.servlet.DynamoHttpServletResponse pResponse)
                                       throws javax.servlet.ServletException,
                                              java.io.IOException
Validate the shipping addresses on the multi shipping page

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

shipToMultipleAddress

protected void shipToMultipleAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                     atg.servlet.DynamoHttpServletResponse pResponse)
                              throws javax.servlet.ServletException,
                                     java.io.IOException
Setup multi shipping details for shipping to profile addresses

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

splitShippingGroupsByMethod

protected void splitShippingGroupsByMethod(atg.servlet.DynamoHttpServletRequest pRequest,
                                           atg.servlet.DynamoHttpServletResponse pResponse)
                                    throws atg.commerce.CommerceException
Creates separate shipping groups for the same shipping addresses but with different shipping methods. The method loops through all CISIs and finds items that have the same shipping addresses but different shipping methods and if so creates separate shipping groups for them. As a result all shipping groups that are referenced in CISIs will have only one shipping method associated with them.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
atg.commerce.CommerceException

postShipToMultipleAddress

protected void postShipToMultipleAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                         atg.servlet.DynamoHttpServletResponse pResponse)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException
Sets the profile default shipping method if not set already

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

preShipToNewAddress

protected void preShipToNewAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                   atg.servlet.DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
Performs input data validations for new shipping address specified by shopper

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

shipToNewAddress

protected void shipToNewAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                atg.servlet.DynamoHttpServletResponse pResponse)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Setup single shipping details for shipping to a new address

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

postShipToNewAddress

protected void postShipToNewAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                    atg.servlet.DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
This method initializes the billing address from the shipping address if the user selected that option. Saves addresses in the profile, if the user selected that option.

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

preSetupGiftShippingDetails

protected void preSetupGiftShippingDetails(atg.servlet.DynamoHttpServletRequest pRequest,
                                           atg.servlet.DynamoHttpServletResponse pResponse)
                                    throws javax.servlet.ServletException,
                                           java.io.IOException
Perfirms validations for Gift Shipping Groups in the order, against the selected shipping method and shipping restrictions

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

setupGiftShippingDetails

protected void setupGiftShippingDetails(atg.servlet.DynamoHttpServletRequest pRequest,
                                        atg.servlet.DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
Setup shipping details for gift shipping groups

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

postSetupGiftShippingDetails

protected void postSetupGiftShippingDetails(atg.servlet.DynamoHttpServletRequest pRequest,
                                            atg.servlet.DynamoHttpServletResponse pResponse)
                                     throws javax.servlet.ServletException,
                                            java.io.IOException
Perform any post actions after setting up gift shipping groups

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

repriceOrder

protected void repriceOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                            atg.servlet.DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Logic to reprice order, and parse any errors.

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

handleAddShippingAddress

public boolean handleAddShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                        atg.servlet.DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
Adds a new shipping group to the ShippingGroupMapContainer.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
true if success, false - otherwise
Throws:
javax.servlet.ServletException - if servlet error occurs
java.io.IOException - if IO error occurs

preAddShippingAddress

public void preAddShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                  atg.servlet.DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
Validates the selected nickname and address properties.

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

addShippingAddress

public void addShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                               atg.servlet.DynamoHttpServletResponse pResponse)
                        throws javax.servlet.ServletException,
                               java.io.IOException
Creates a new shipping group and adds it to the shipping group map container. Optionally saves the shipping group address to the profile based on the saveShippingAddress property.

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

postAddShippingAddress

public void postAddShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                   atg.servlet.DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
Copies the new shipping group address to the order's credit card payment group address.

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

handleEditShippingAddress

public boolean handleEditShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                         atg.servlet.DynamoHttpServletResponse pResponse)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException
Handler for editing an address.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
true if success, false - otherwise
Throws:
javax.servlet.ServletException - if servlet error occurs
java.io.IOException - if IO error occurs

preEditShippingAddress

public void preEditShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                   atg.servlet.DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
Validates the address properties.

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

editShippingAddress

public void editShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                atg.servlet.DynamoHttpServletResponse pResponse)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Edits a shipping group address in the container and saves the changes to the profile if the address is in the profile's address map.

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

postEditShippingAddress

public void postEditShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                    atg.servlet.DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
Post edit shipping address processing. If the address nick name is in the profile's map, the updates are applied to that address too.

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

handleRemoveShippingAddress

public boolean handleRemoveShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                           atg.servlet.DynamoHttpServletResponse pResponse)
                                    throws javax.servlet.ServletException,
                                           java.io.IOException
Handler for removing a shipping address.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
true if success, false - otherwise
Throws:
javax.servlet.ServletException - if servlet error occurs
java.io.IOException - if IO error occurs

preRemoveShippingAddress

public void preRemoveShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                     atg.servlet.DynamoHttpServletResponse pResponse)
                              throws javax.servlet.ServletException,
                                     java.io.IOException
Pre remove shipping address processing.

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

removeShippingAddress

public void removeShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                  atg.servlet.DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
Removes a shipping group address from the container.

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

postRemoveShippingAddress

public void postRemoveShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                      atg.servlet.DynamoHttpServletResponse pResponse)
                               throws javax.servlet.ServletException,
                                      java.io.IOException
Post remove shipping address processing. If the address nickname is in the profile's map, the address is removed from the profile too.

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

handleAddAddressAndMoveToMultipleShipping

public boolean handleAddAddressAndMoveToMultipleShipping(atg.servlet.DynamoHttpServletRequest pRequest,
                                                         atg.servlet.DynamoHttpServletResponse pResponse)
                                                  throws javax.servlet.ServletException,
                                                         java.io.IOException
This handler method will a new shipping group to the ShippingGroupMapContainer if new shipping address is not empty. And will redirect to the multiple shipping URL. If new shipping address is empty it will redirect to multiple shipping URL without adding new shipping group.

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

isEmptyNewAddress

public boolean isEmptyNewAddress(atg.core.util.ContactInfo pAddress)
Checks whether new address is empty.

Parameters:
pAddress - address to check
Returns:
true if address is empty, false otherwise

validateShippingRestrictions

protected void validateShippingRestrictions(atg.servlet.DynamoHttpServletRequest pRequest,
                                            atg.servlet.DynamoHttpServletResponse pResponse)
                                     throws javax.servlet.ServletException,
                                            java.io.IOException
Determines if the customer is attempting to ship an item to a country that is restricted.

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

validateAddressNickname

protected void validateAddressNickname(java.lang.String pNickName,
                                       atg.servlet.DynamoHttpServletRequest pRequest,
                                       atg.servlet.DynamoHttpServletResponse pResponse)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
Validate address nickname for duplicacy

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

validateShippingAddress

protected void validateShippingAddress(atg.core.util.Address pAddress,
                                       atg.servlet.DynamoHttpServletRequest pRequest,
                                       atg.servlet.DynamoHttpServletResponse pResponse)
                                throws java.io.IOException,
                                       javax.servlet.ServletException
Validates the new address. Check for required properties, and make sure street address doesn't include PO Box, AFO/FPO.

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

validateShippingMethod

protected void validateShippingMethod(atg.core.util.Address pAddress,
                                      java.lang.String pShippingMethod,
                                      atg.servlet.DynamoHttpServletRequest pRequest,
                                      atg.servlet.DynamoHttpServletResponse pResponse)
                               throws java.io.IOException,
                                      javax.servlet.ServletException
Validates the new address - Make sure user isn't trying to Express ship to AK, etc.

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

validateShippingMethodForGiftShippingGroups

protected void validateShippingMethodForGiftShippingGroups(atg.servlet.DynamoHttpServletRequest pRequest,
                                                           atg.servlet.DynamoHttpServletResponse pResponse)
                                                    throws javax.servlet.ServletException,
                                                           java.io.IOException
Validate the gift shipping addresses against the shipping methods being used.

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

validateShippingMethodForContainerShippingGroups

protected void validateShippingMethodForContainerShippingGroups(atg.servlet.DynamoHttpServletRequest pRequest,
                                                                atg.servlet.DynamoHttpServletResponse pResponse)
                                                         throws javax.servlet.ServletException,
                                                                java.io.IOException
Validates the shipping group addresses against the provided shipping method.

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

handleInitSingleShippingForm

public boolean handleInitSingleShippingForm(atg.servlet.DynamoHttpServletRequest pRequest,
                                            atg.servlet.DynamoHttpServletResponse pResponse)
                                     throws javax.servlet.ServletException,
                                            java.io.IOException
Initializes the form handler for single shipping group selection. Initialization only occurs if there are no form errors.

This method expects that the ShippingGroupMapContainer has been initialized with shipping groups.

The following form properties are initialized:

shipToAddressName
initialied to the profile's address nick name used to originally create the address. This is determined by matching the shipping address to profile addresses. If there's no match it is set to NEW_ADDRESS
address
if the shipping address isn't in the profile this property is initialized with the address
shippingMethod
initialized from the current shipping group's shipping method value, or the profile's default setting, or the default configured value.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
always true
Throws:
javax.servlet.ServletException - if servlet error occurs
java.io.IOException - if IO error occurs

handleInitMultipleShippingForm

public boolean handleInitMultipleShippingForm(atg.servlet.DynamoHttpServletRequest pRequest,
                                              atg.servlet.DynamoHttpServletResponse pResponse)
                                       throws javax.servlet.ServletException,
                                              java.io.IOException
Initializes the form handler for multiple shipping group selection. Initialization only occurs if there are no form errors.

The following form properties are initialized:

shippingMethod
initialized from the first shipping group's shipping method value, or the profile's default setting, or the default configured value. Note that the application only allows one shipping method to be used per order, so all the shipping groups have the same shipping method.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
always true
Throws:
javax.servlet.ServletException - if servlet error occurs
java.io.IOException - if IO error occurs

handleInitEditAddressForm

public boolean handleInitEditAddressForm(atg.servlet.DynamoHttpServletRequest pRequest,
                                         atg.servlet.DynamoHttpServletResponse pResponse)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException
Initializes the address property with the shipping group address identified by the editNickName.

Initialization only takes place if there aren't any form errors.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
true if success, false - otherwise
Throws:
javax.servlet.ServletException - if servlet error occurs
java.io.IOException - if IO error occurs

processShippingRestrictionsErrors

protected void processShippingRestrictionsErrors(java.util.List pshippingValidationResult,
                                                 atg.servlet.DynamoHttpServletRequest pRequest,
                                                 atg.servlet.DynamoHttpServletResponse pResponse)
                                          throws java.io.IOException,
                                                 javax.servlet.ServletException
Process shipping restriction errors and add them to form exceptions

Parameters:
pshippingValidationResult - shipping validation results
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
java.io.IOException
javax.servlet.ServletException

createPricingErrorMessage

protected java.lang.String createPricingErrorMessage(atg.commerce.pricing.PricingException pe,
                                                     atg.servlet.DynamoHttpServletRequest pRequest,
                                                     atg.servlet.DynamoHttpServletResponse pResponse)
Pulls out the Cybersource error message for invalid address.

Parameters:
pe - - pricing exception
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
error message

addAddressValidationFormError

protected void addAddressValidationFormError(java.util.List pMissingProperties,
                                             atg.servlet.DynamoHttpServletRequest pRequest,
                                             atg.servlet.DynamoHttpServletResponse pResponse)
Utility method to add form exception.

Parameters:
pMissingProperties - - missing properties list
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value

handleUpdateShippingMethod

public boolean handleUpdateShippingMethod(atg.servlet.DynamoHttpServletRequest pRequest,
                                          atg.servlet.DynamoHttpServletResponse pResponse)
                                   throws javax.servlet.ServletException,
                                          java.io.IOException
Handler for editing shipping group's shipping method.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
true if success, false - otherwise
Throws:
javax.servlet.ServletException - if servlet error occurs
java.io.IOException - if IO error occurs

preUpdateShippingMethod

public void preUpdateShippingMethod(atg.servlet.DynamoHttpServletRequest pRequest,
                                    atg.servlet.DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
Validates the shipping group's shipping method.

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

updateShippingMethod

public void updateShippingMethod(atg.servlet.DynamoHttpServletRequest pRequest,
                                 atg.servlet.DynamoHttpServletResponse pResponse)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
Save changes to shipping groups.

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

postUpdateShippingMethod

public void postUpdateShippingMethod(atg.servlet.DynamoHttpServletRequest pRequest,
                                     atg.servlet.DynamoHttpServletResponse pResponse)
                              throws javax.servlet.ServletException,
                                     java.io.IOException
Post edit shipping method processing.

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