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.
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
 
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.
 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()
           
 java.lang.String getDefaultShippingMethod()
           
 atg.core.util.Address getEditAddress()
           
 java.lang.String getEditShippingAddressErrorURL()
           
 java.lang.String getEditShippingAddressNickName()
           
 java.lang.String getEditShippingAddressSuccessURL()
           
 java.util.List getElectronicShippingGroups()
          Electronic shipping groups.
 java.util.List getGiftShippingGroups()
           
 java.lang.String getMoveToBillingErrorURL()
           
 java.lang.String getMoveToBillingSuccessURL()
           
 java.lang.String getNewShipToAddressName()
           
 atg.commerce.util.PlaceUtils getPlaceUtils()
           
 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 getUpdateElectronicShippingInfoErrorURL()
           
 java.lang.String getUpdateElectronicShippingInfoSuccessURL()
           
 boolean getUseShippingForBilling()
           
 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 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 handleUpdateElectronicShippingInfo(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Handler for editing electronic shipping group properties.
 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.
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 postUpdateElectronicShippingInfo(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Post edit electronic shipping info 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
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 preUpdateElectronicShippingInfo(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Validates the electronic shipping group properties.
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
protected  void repriceOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Logic to reprice order, and parse any errors.
 void setAddress(atg.core.util.Address pAddress)
           
 void setAddShippingAddressErrorURL(java.lang.String pAddShippingAddressErrorURL)
           
 void setAddShippingAddressSuccessURL(java.lang.String pAddShippingAddressSuccessURL)
           
 void setCheckoutOptionSelections(CheckoutOptionSelections pCheckoutOptionSelections)
           
 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 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 setUpdateElectronicShippingInfoErrorURL(java.lang.String pUpdateElectronicShippingInfoErrorURL)
           
 void setUpdateElectronicShippingInfoSuccessURL(java.lang.String pUpdateElectronicShippingInfoSuccessURL)
           
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
 void updateElectronicShippingInfo(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Saves changes/edits to electronic shipping group properties.
protected  void validateAddressNickname(java.lang.String pNickName)
          Validate address nickname for duplicacy
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, 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, 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, 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.


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

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.

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.

getUpdateElectronicShippingInfoSuccessURL

public java.lang.String getUpdateElectronicShippingInfoSuccessURL()
Returns:
the update electronic shipping information success redirect URL.

setUpdateElectronicShippingInfoSuccessURL

public void setUpdateElectronicShippingInfoSuccessURL(java.lang.String pUpdateElectronicShippingInfoSuccessURL)
Parameters:
pUpdateElectronicShippingInfoSuccessURL - - the update electronic shipping information success redirect URL to set.

getUpdateElectronicShippingInfoErrorURL

public java.lang.String getUpdateElectronicShippingInfoErrorURL()
Returns:
the update electronic shipping information error redirect URL.

setUpdateElectronicShippingInfoErrorURL

public void setUpdateElectronicShippingInfoErrorURL(java.lang.String pUpdateElectronicShippingInfoErrorURL)
Parameters:
pUpdateElectronicShippingInfoErrorURL - - the update electronic shipping information error redirect URL to set.

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.

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.

getElectronicShippingGroups

public java.util.List getElectronicShippingGroups()
Electronic shipping groups.

Overrides:
getElectronicShippingGroups in class atg.commerce.order.purchase.ShippingGroupFormHandler
Returns:
a list of all electronic groups that contain commerce items.

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

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

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

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

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

handleUpdateElectronicShippingInfo

public boolean handleUpdateElectronicShippingInfo(atg.servlet.DynamoHttpServletRequest pRequest,
                                                  atg.servlet.DynamoHttpServletResponse pResponse)
                                           throws javax.servlet.ServletException,
                                                  java.io.IOException
Handler for editing electronic shipping group properties.

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

preUpdateElectronicShippingInfo

public void preUpdateElectronicShippingInfo(atg.servlet.DynamoHttpServletRequest pRequest,
                                            atg.servlet.DynamoHttpServletResponse pResponse)
                                     throws javax.servlet.ServletException,
                                            java.io.IOException
Validates the electronic shipping group 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

updateElectronicShippingInfo

public void updateElectronicShippingInfo(atg.servlet.DynamoHttpServletRequest pRequest,
                                         atg.servlet.DynamoHttpServletResponse pResponse)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException
Saves changes/edits to electronic shipping group 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

postUpdateElectronicShippingInfo

public void postUpdateElectronicShippingInfo(atg.servlet.DynamoHttpServletRequest pRequest,
                                             atg.servlet.DynamoHttpServletResponse pResponse)
                                      throws javax.servlet.ServletException,
                                             java.io.IOException
Post edit electronic shipping info 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

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

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)
Validate address nickname for duplicacy

Parameters:
pNickName - - nickname

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