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 static java.lang.String GROUND_SHIPPING_METHOD
           
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 pPe, 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.
 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 getNewShipToAddressName()
           
 java.lang.String getRemoveShippingAddressErrorURL()
           
 java.lang.String getRemoveShippingAddressNickName()
           
 java.lang.String getRemoveShippingAddressSuccessURL()
           
 java.lang.String getShippingAddressNewNickName()
           
 StoreShippingProcessHelper getShippingHelper()
           
 java.lang.String getShippingMethod()
           
 java.lang.String getShipToAddressName()
           
 java.lang.String getShipToExistingAddressErrorURL()
           
 java.lang.String getShipToExistingAddressSuccessURL()
           
 java.lang.String getShipToMultipleAddressesErrorURL()
           
 java.lang.String getShipToMultipleAddressesSuccessURL()
           
 java.lang.String getShipToNewAddressErrorURL()
           
 java.lang.String getShipToNewAddressSuccessURL()
           
 java.lang.String getUpdateShippingMethodErrorURL()
           
 java.lang.String getUpdateShippingMethodSuccessURL()
           
 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 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 handleRemoveShippingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Handler for removing a shipping address.
 boolean handleShipToExistingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Handle 'Ship to existing address' case
 boolean handleShipToMultipleAddresses(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This handler method will validate shipping address and apply the shipping groups to the order.
 boolean handleShipToNewAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Handle 'Ship to new address' case
 boolean handleUpdateShippingMethod(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Handler for editing shipping group's shipping method.
 boolean isMultipleNonGiftHardgoodItems()
          Determines if the total quantity of all non-gift hardgood items is more than one.
 boolean isMultipleNonGiftWrapItems()
          Determines if the total quantity of all non-giftwrap items is more than one.
 boolean isSaveShippingAddress()
           
 boolean isShipToNewAddress()
           
 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 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 postShipToExistingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Post-shipping processing.
 void postShipToMultipleAddresses(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method will reprice the order to catch address problems through CyberSource.
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.
 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 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)
          Performs validations for Gift Shipping Groups in the order, against the selected shipping method and shipping restrictions
protected  void preShipToExistingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Pre-shipping validation.
 void preShipToMultipleAddresses(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method validates the user inputs for the Move To Billing process
protected  void preShipToNewAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Performs input data validations for new shipping address specified 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 re-price 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 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 setNewShipToAddressName(java.lang.String pNewShipToAddressName)
           
 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 setShippingHelper(StoreShippingProcessHelper pShippingHelper)
           
 void setShippingMethod(java.lang.String pShippingMethod)
           
 void setShipToAddressName(java.lang.String pShipToAddressName)
           
 void setShipToExistingAddressErrorURL(java.lang.String pShipToExistingAddressErrorURL)
           
 void setShipToExistingAddressSuccessURL(java.lang.String pShipToExistingAddressSuccessURL)
           
 void setShipToMultipleAddressesErrorURL(java.lang.String pShipToMultipleAddressesErrorURL)
           
 void setShipToMultipleAddressesSuccessURL(java.lang.String pShipToMultipleAddressesSuccessURL)
           
 void setShipToNewAddress(boolean pShipToNewAddress)
           
 void setShipToNewAddressErrorURL(java.lang.String pShipToNewAddressErrorURL)
           
 void setShipToNewAddressSuccessURL(java.lang.String pShipToNewAddressSuccessURL)
           
 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
protected  void shipToExistingAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Shiping to existing address.
 void shipToMultipleAddresses(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Applies the data in the CommerceItemShippingInfoContainer and ShippingGroupMapContainer to the order.
protected  void shipToNewAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Setup single shipping details for shipping to a new address
 void updateShippingMethod(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Save changes to shipping groups.
protected  void validateAddressNicknameForUniqueness(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, getShippingGroupInitializers, 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, setShippingGroupInitializers, 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, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

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

See Also:
Constant Field Values

GROUND_SHIPPING_METHOD

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

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 final java.lang.String MSG_ERROR_UPDATE_ORDER
Error Message keys

See Also:
Constant Field Values

MSG_ERROR_MOVE_TO_BILLING

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

mGiftShippingGroups

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

Constructor Detail

ShippingInfoFormHandler

public ShippingInfoFormHandler()
Method Detail

getCouponCode

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

setCouponCode

public void setCouponCode(java.lang.String pCouponCode)
Parameters:
pCouponCode - the coupon code to set

getCheckoutProgressStates

public CheckoutProgressStates getCheckoutProgressStates()
Returns:
the checkout progress states

setCheckoutProgressStates

public void setCheckoutProgressStates(CheckoutProgressStates pCheckoutProgressStates)
Parameters:
pCheckoutProgressStates - the checkout progress states to set

getShippingHelper

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

setShippingHelper

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

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.

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.

isSaveShippingAddress

public boolean isSaveShippingAddress()
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.

isShipToNewAddress

public boolean isShipToNewAddress()
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.

getShipToMultipleAddressesErrorURL

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

setShipToMultipleAddressesErrorURL

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

getShipToMultipleAddressesSuccessURL

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

setShipToMultipleAddressesSuccessURL

public void setShipToMultipleAddressesSuccessURL(java.lang.String pShipToMultipleAddressesSuccessURL)
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.

getShipToNewAddressErrorURL

public java.lang.String getShipToNewAddressErrorURL()

setShipToNewAddressErrorURL

public void setShipToNewAddressErrorURL(java.lang.String pShipToNewAddressErrorURL)

getShipToNewAddressSuccessURL

public java.lang.String getShipToNewAddressSuccessURL()

setShipToNewAddressSuccessURL

public void setShipToNewAddressSuccessURL(java.lang.String pShipToNewAddressSuccessURL)

getShipToExistingAddressSuccessURL

public java.lang.String getShipToExistingAddressSuccessURL()

setShipToExistingAddressSuccessURL

public void setShipToExistingAddressSuccessURL(java.lang.String pShipToExistingAddressSuccessURL)

getShipToExistingAddressErrorURL

public java.lang.String getShipToExistingAddressErrorURL()

setShipToExistingAddressErrorURL

public void setShipToExistingAddressErrorURL(java.lang.String pShipToExistingAddressErrorURL)

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.

isMultipleNonGiftWrapItems

public boolean isMultipleNonGiftWrapItems()
Determines if the total quantity of all non-giftwrap items is more than one.

Returns:
true if the total quantity of all non-giftwrap items 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
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

handleShipToMultipleAddresses

public boolean handleShipToMultipleAddresses(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

preShipToMultipleAddresses

public void preShipToMultipleAddresses(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

shipToMultipleAddresses

public void shipToMultipleAddresses(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)

postShipToMultipleAddresses

public void postShipToMultipleAddresses(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

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
Performs 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

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

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
initialized 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

handleShipToNewAddress

public boolean handleShipToNewAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                      atg.servlet.DynamoHttpServletResponse pResponse)
                               throws javax.servlet.ServletException,
                                      java.io.IOException
Handle 'Ship to new address' case

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

handleShipToExistingAddress

public boolean handleShipToExistingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                           atg.servlet.DynamoHttpServletResponse pResponse)
                                    throws javax.servlet.ServletException,
                                           java.io.IOException
Handle 'Ship to existing address' case

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

preShipToExistingAddress

protected void preShipToExistingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                        atg.servlet.DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
Pre-shipping validation. Required fields should be filled in and address should be available for shipping.

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

postShipToExistingAddress

protected void postShipToExistingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                         atg.servlet.DynamoHttpServletResponse pResponse)
Post-shipping processing.

Parameters:
pRequest - Dynamo HTTP request
pResponse - Dynamo HTTP response

shipToExistingAddress

protected void shipToExistingAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                     atg.servlet.DynamoHttpServletResponse pResponse)
                              throws javax.servlet.ServletException,
                                     java.io.IOException
Shiping to existing address.

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

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

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

validateAddressNicknameForUniqueness

protected void validateAddressNicknameForUniqueness(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
pShippingMethod - a shipping method
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

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:
javax.servlet.ServletException - if servlet error occurs
java.io.IOException - if IO error occurs

createPricingErrorMessage

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

Parameters:
pPe - - 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

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

repriceOrder

protected void repriceOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                            atg.servlet.DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Logic to re-price 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