atg.projects.store.order.purchase
Class StoreCommitOrderHandler

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

Extends the default CommitOrderFormHandler as to implement custom preCommitOrder and postCommitOrder functionality.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string.
protected static java.lang.String CONFIRM_EMAIL_INVALID
          Confirm Email Address invalid message key.
protected  StoreCommitOrderProcessHelper mCommitOrderHelper
          Commit Order Helper.
protected  java.lang.String mConfirmEmailAddress
          Confirm e-mail address.
protected  java.lang.String mCreditCardVerificationNumber
          Credit card verification number.
protected static java.lang.String VERIFICATION_NUMBER_INVALID
          Verification number invalid message key.
 
Fields inherited from class atg.commerce.order.purchase.CommitOrderFormHandler
MSG_COMMIT_ERROR, MSG_ORDER_ALREADY_SUBMITTED, MSG_ORDER_EMPTY, MSG_ORDER_NOT_CURRENT
 
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
StoreCommitOrderHandler()
           
 
Method Summary
 StoreCommitOrderProcessHelper getCommitOrderHelper()
           
 java.lang.String getConfirmEmailAddress()
           
 atg.commerce.order.CreditCard getCreditCard()
          Method to allow page access to CreditCard object.
 java.lang.String getCreditCardVerificationNumber()
           
 void postCommitOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Called after all processing is done by the handleCommitOrder method.
 void preCommitOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Ensures that an email address is set in the billing address, as required by Cybersource.
 void setCommitOrderHelper(StoreCommitOrderProcessHelper pCommitOrderHelper)
           
 void setConfirmEmailAddress(java.lang.String pConfirmEmailAddress)
           
 void setCreditCardVerificationNumber(java.lang.String pCreditCardVerificationNumber)
           
 
Methods inherited from class atg.commerce.order.purchase.CommitOrderFormHandler
commitOrder, getAllowEmptyOrders, getCommitOrderErrorURL, getCommitOrderSuccessURL, getOrderId, getProcessOrderMap, getSalesChannel, handleCommitOrder, setAllowEmptyOrders, setCommitOrderErrorURL, setCommitOrderSuccessURL, setOrderId, setSalesChannel
 
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, 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, 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.


VERIFICATION_NUMBER_INVALID

protected static final java.lang.String VERIFICATION_NUMBER_INVALID
Verification number invalid message key.

See Also:
Constant Field Values

CONFIRM_EMAIL_INVALID

protected static final java.lang.String CONFIRM_EMAIL_INVALID
Confirm Email Address invalid message key.

See Also:
Constant Field Values

mCommitOrderHelper

protected StoreCommitOrderProcessHelper mCommitOrderHelper
Commit Order Helper.


mConfirmEmailAddress

protected java.lang.String mConfirmEmailAddress
Confirm e-mail address.


mCreditCardVerificationNumber

protected java.lang.String mCreditCardVerificationNumber
Credit card verification number.

Constructor Detail

StoreCommitOrderHandler

public StoreCommitOrderHandler()
Method Detail

getCommitOrderHelper

public StoreCommitOrderProcessHelper getCommitOrderHelper()
Returns:
the Order Helper component.

setCommitOrderHelper

public void setCommitOrderHelper(StoreCommitOrderProcessHelper pCommitOrderHelper)
Parameters:
pCommitOrderHelper - the order helper component to set.

getConfirmEmailAddress

public java.lang.String getConfirmEmailAddress()
Returns:
the confirm e-mail address.

setConfirmEmailAddress

public void setConfirmEmailAddress(java.lang.String pConfirmEmailAddress)
Parameters:
pConfirmEmailAddress - - the confirm e-mail address to set.

getCreditCardVerificationNumber

public java.lang.String getCreditCardVerificationNumber()
Returns:
the credit card verification number.

setCreditCardVerificationNumber

public void setCreditCardVerificationNumber(java.lang.String pCreditCardVerificationNumber)
Parameters:
pCreditCardVerificationNumber - - the credit card verification number to set.

preCommitOrder

public void preCommitOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                           atg.servlet.DynamoHttpServletResponse pResponse)
                    throws javax.servlet.ServletException,
                           java.io.IOException
Ensures that an email address is set in the billing address, as required by Cybersource. Also assures that the profile ID associated with the order is correct.

Overrides:
preCommitOrder in class atg.commerce.order.purchase.CommitOrderFormHandler
Parameters:
pRequest - - http request
pResponse - - http response
Throws:
javax.servlet.ServletException - if servlet error occurs
java.io.IOException - if IO error occurs
See Also:
CommitOrderFormHandler.handleCommitOrder(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)

postCommitOrder

public void postCommitOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                            atg.servlet.DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Called after all processing is done by the handleCommitOrder method. This method is responsible for populating the profile with the attributes on the profile, such as itemsBought, lastPurchaseDate, numberOfOrders, etc.

Overrides:
postCommitOrder in class atg.commerce.order.purchase.CommitOrderFormHandler
Parameters:
pRequest - the request object
pResponse - the response object
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
See Also:
CommitOrderFormHandler.handleCommitOrder(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)

getCreditCard

public atg.commerce.order.CreditCard getCreditCard()
Method to allow page access to CreditCard object.

Returns:
credit card with this order