atg.projects.store.order.purchase
Class StoreExpressCheckoutFormHandler

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.ExpressCheckoutFormHandler
                          extended by atg.projects.store.order.purchase.StoreExpressCheckoutFormHandler
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 StoreExpressCheckoutFormHandler
extends atg.commerce.order.purchase.ExpressCheckoutFormHandler

This class is needed to get the billing address from the credit card rather than the user's default billing address.

See Also:
ExpressCheckoutFormHandler

Field Summary
static java.lang.String CLASS_VERSION
          Class version string.
 
Fields inherited from class atg.commerce.order.purchase.ExpressCheckoutFormHandler
ERROR_MISSING_BILLING_ADDRESS, ERROR_MISSING_CREDIT_CARD, ERROR_MISSING_SHIPPING_ADDRESS, MSG_EXPRESS_CHECKOUT_ERROR, MSG_ORDER_ALREADY_SUBMITTED, MSG_REPRICE_ORDER_ERROR, MSG_UNABLE_TO_COPY_ADDRESS, MSG_UPDATE_ORDER_ERROR
 
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
StoreExpressCheckoutFormHandler()
           
 
Method Summary
protected  void ensurePaymentGroup(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method overrides the super class to apply the address from the credit card rather than from the user's "default billing".
protected  void ensureShippingGroup(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This extends the base behavior to set the shipping method for all gift shipping groups to the profile's default shipping method.
 StoreBillingProcessHelper getBillingHelper()
           
 CheckoutProgressStates getCheckoutProgressStates()
           
 StoreExpressCheckoutProcessHelper getExpressCheckoutHelper()
           
 atg.commerce.order.ShippingGroup getShippingGroup()
          Overrides base behavior to return non gift hardgood shipping group.
 StorePropertyManager getStorePropertyManager()
           
 boolean isAutoApplyStoreCredits()
          Return the AutoApplyStoreCredits property.
 void moveNonGiftItemsToDefaultShippingGroup()
          Checks whether order contains multiple non-gift shipping groups with relationships and if so moves items from non gift shipping groups to the default shipping group.
 void postExpressCheckout(atg.servlet.DynamoHttpServletRequest request, atg.servlet.DynamoHttpServletResponse response)
           
 void setAutoApplyStoreCredits(boolean pAutoApplyStoreCredits)
          Set the AutoApplyStoreCredits property.
 void setBillingHelper(StoreBillingProcessHelper pBillingHelper)
           
 void setCheckoutProgressStates(CheckoutProgressStates pCheckoutProgressStates)
           
 void setExpressCheckoutHelper(StoreExpressCheckoutProcessHelper pExpressCheckoutHelper)
           
 void setStorePropertyManager(StorePropertyManager pStorePropertyManager)
           
 
Methods inherited from class atg.commerce.order.purchase.ExpressCheckoutFormHandler
commitOrder, getDefaultBillingAddressPropertyName, getDefaultCreditCardPropertyName, getDefaultShippingAddressPropertyName, getDefaultShippingMethodPropertyName, getExpressCheckoutErrorURL, getExpressCheckoutSuccessURL, getOrderId, getPaymentGroup, getPricingOperation, getProcessOrderMap, getSalesChannel, getSiteId, handleExpressCheckout, isCommitOrder, isPaymentGroupNeeded, isShippingGroupNeeded, preExpressCheckout, runRepricingProcess, setCommitOrder, setDefaultBillingAddressPropertyName, setDefaultCreditCardPropertyName, setDefaultShippingAddressPropertyName, setDefaultShippingMethodPropertyName, setExpressCheckoutErrorURL, setExpressCheckoutSuccessURL, setOrderId, setPaymentGroup, setPaymentGroupNeeded, setPricingOperation, setSalesChannel, setShippingGroup, setShippingGroupNeeded, setSiteId
 
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, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
 
Methods inherited from class atg.droplet.EmptyFormHandler
afterGet, beforeGet
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

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

Constructor Detail

StoreExpressCheckoutFormHandler

public StoreExpressCheckoutFormHandler()
Method Detail

getCheckoutProgressStates

public CheckoutProgressStates getCheckoutProgressStates()

setCheckoutProgressStates

public void setCheckoutProgressStates(CheckoutProgressStates pCheckoutProgressStates)

getStorePropertyManager

public StorePropertyManager getStorePropertyManager()
Returns:
the Store property manager property.

setStorePropertyManager

public void setStorePropertyManager(StorePropertyManager pStorePropertyManager)
Parameters:
pStorePropertyManager - - Store property manager.

getExpressCheckoutHelper

public StoreExpressCheckoutProcessHelper getExpressCheckoutHelper()
Returns:
the Store express checkout property.

setExpressCheckoutHelper

public void setExpressCheckoutHelper(StoreExpressCheckoutProcessHelper pExpressCheckoutHelper)
Parameters:
pExpressCheckoutHelper - - Store express checkout helper.

getBillingHelper

public StoreBillingProcessHelper getBillingHelper()

setBillingHelper

public void setBillingHelper(StoreBillingProcessHelper pBillingHelper)

setAutoApplyStoreCredits

public void setAutoApplyStoreCredits(boolean pAutoApplyStoreCredits)
Set the AutoApplyStoreCredits property.

Parameters:
pAutoApplyStoreCredits - a boolean value

isAutoApplyStoreCredits

public boolean isAutoApplyStoreCredits()
Return the AutoApplyStoreCredits property.

Returns:
a boolean value

ensurePaymentGroup

protected void ensurePaymentGroup(atg.servlet.DynamoHttpServletRequest pRequest,
                                  atg.servlet.DynamoHttpServletResponse pResponse)
                           throws java.io.IOException,
                                  javax.servlet.ServletException
This method overrides the super class to apply the address from the credit card rather than from the user's "default billing".

Overrides:
ensurePaymentGroup in class atg.commerce.order.purchase.ExpressCheckoutFormHandler
Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
java.io.IOException - if an error occurs
javax.servlet.ServletException - if an error occurs

ensureShippingGroup

protected void ensureShippingGroup(atg.servlet.DynamoHttpServletRequest pRequest,
                                   atg.servlet.DynamoHttpServletResponse pResponse)
                            throws java.io.IOException,
                                   javax.servlet.ServletException
This extends the base behavior to set the shipping method for all gift shipping groups to the profile's default shipping method. In the case when user switches from multiple shipping to express checkout all non-gift items are moved to default shipping group.

Overrides:
ensureShippingGroup in class atg.commerce.order.purchase.ExpressCheckoutFormHandler
Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
java.io.IOException - if an error occurs
javax.servlet.ServletException - if an error occurs

getShippingGroup

public atg.commerce.order.ShippingGroup getShippingGroup()
Overrides base behavior to return non gift hardgood shipping group. If there is no such shipping group in the order the new one is created and added to the order.

Overrides:
getShippingGroup in class atg.commerce.order.purchase.ExpressCheckoutFormHandler
Returns:
a ShippingGroup value

moveNonGiftItemsToDefaultShippingGroup

public void moveNonGiftItemsToDefaultShippingGroup()
                                            throws javax.servlet.ServletException
Checks whether order contains multiple non-gift shipping groups with relationships and if so moves items from non gift shipping groups to the default shipping group.

Throws:
javax.servlet.ServletException - if an error occurs

postExpressCheckout

public void postExpressCheckout(atg.servlet.DynamoHttpServletRequest request,
                                atg.servlet.DynamoHttpServletResponse response)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Overrides:
postExpressCheckout in class atg.commerce.order.purchase.ExpressCheckoutFormHandler
Throws:
javax.servlet.ServletException
java.io.IOException