public class CommitOrderFormHandler extends PurchaseProcessFormHandler
GenericFormHandler, 
PurchaseProcessFormHandler| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
CLASS_VERSION  | 
static java.lang.String | 
MSG_COMMIT_ERROR  | 
static java.lang.String | 
MSG_ORDER_ALREADY_SUBMITTED  | 
static java.lang.String | 
MSG_ORDER_EMPTY  | 
static java.lang.String | 
MSG_ORDER_NOT_CURRENT  | 
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUEPARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDSSERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description | 
|---|
CommitOrderFormHandler()
Creates a new  
CommitOrderFormHandler instance. | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
commitOrder(Order pOrder,
           DynamoHttpServletRequest pRequest,
           DynamoHttpServletResponse pResponse)
This method is called between  
preCommitOrder and postCommitOrder. | 
boolean | 
getAllowEmptyOrders()
Return the allowEmptyOrders property. 
 | 
java.lang.String | 
getAlternateCommitOrderChainId()
Gets the name of an alternate pipeline chain used to commit the order. 
 | 
java.lang.String | 
getCommitOrderErrorURL()
Returns property CommitOrderErrorURL 
 | 
java.lang.String | 
getCommitOrderSuccessURL()
Returns property CommitOrderSuccessURL 
 | 
java.lang.String | 
getOrderId()
Return the OrderId property. 
 | 
java.util.HashMap | 
getProcessOrderMap(java.util.Locale pLocale)
This method calls the  
OrderManager.getProcessOrderMap(pLocale, map)> to get the process order map
 and adds site ID and sales channel to the map if specified. | 
java.lang.String | 
getSalesChannel()
Returns the salesChannel. 
 | 
java.lang.String | 
getSiteId()
Returns the site ID to be recorded in the order 
 | 
boolean | 
handleCommitOrder(DynamoHttpServletRequest pRequest,
                 DynamoHttpServletResponse pResponse)
This method is used to submit the current order. 
 | 
void | 
postCommitOrder(DynamoHttpServletRequest pRequest,
               DynamoHttpServletResponse pResponse)
Called after all processing is done by the handleCommitOrder method. 
 | 
void | 
preCommitOrder(DynamoHttpServletRequest pRequest,
              DynamoHttpServletResponse pResponse)
Called before any processing is done by the handleCommitOrder method. 
 | 
void | 
setAllowEmptyOrders(boolean pAllowEmptyOrders)
Set the allowEmptyOrders property. 
 | 
void | 
setAlternateCommitOrderChainId(java.lang.String pAlternateCommitOrderChainId)
Sets the name of an alternate pipeline chain used to commit the order. 
 | 
void | 
setCommitOrderErrorURL(java.lang.String pCommitOrderErrorURL)
Sets property CommitOrderErrorURL 
 | 
void | 
setCommitOrderSuccessURL(java.lang.String pCommitOrderSuccessURL)
Sets property CommitOrderSuccessURL 
 | 
void | 
setOrderId(java.lang.String pOrderId)
Set the OrderId property. 
 | 
void | 
setSalesChannel(java.lang.String pSalesChannel)
Sets the salesChannel. 
 | 
void | 
setSiteId(java.lang.String pSiteId)
Sets the site ID to be recorded in the order 
 | 
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, isConcurrentUpdate, 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, unsetTransactionCreatedaddFormException, 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, setUseForwardsafterGet, beforeGetaddLogListener, 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, toStringvlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static java.lang.String CLASS_VERSION
public static final java.lang.String MSG_COMMIT_ERROR
public static final java.lang.String MSG_ORDER_ALREADY_SUBMITTED
public static final java.lang.String MSG_ORDER_EMPTY
public static final java.lang.String MSG_ORDER_NOT_CURRENT
public CommitOrderFormHandler()
CommitOrderFormHandler instance.public java.lang.String getSalesChannel()
public void setSalesChannel(java.lang.String pSalesChannel)
pSalesChannel - public void setOrderId(java.lang.String pOrderId)
pOrderId - a String valuepublic java.lang.String getOrderId()
String valuepublic void setSiteId(java.lang.String pSiteId)
pSiteId - a String valuepublic java.lang.String getSiteId()
String valuepublic void setAllowEmptyOrders(boolean pAllowEmptyOrders)
pAllowEmptyOrders - if false, handleCommit
            adds a form exception if called for an order with no itemspublic boolean getAllowEmptyOrders()
boolean valuepublic void setAlternateCommitOrderChainId(java.lang.String pAlternateCommitOrderChainId)
Null means use the OrderManager.processOrder
 default chain.pAlternateCommitOrderChainId - a String valuepublic java.lang.String getAlternateCommitOrderChainId()
Null means use the OrderManager.processOrder
 default chain.String valuepublic void setCommitOrderSuccessURL(java.lang.String pCommitOrderSuccessURL)
pCommitOrderSuccessURL - a String valuepublic java.lang.String getCommitOrderSuccessURL()
String valuepublic void setCommitOrderErrorURL(java.lang.String pCommitOrderErrorURL)
pCommitOrderErrorURL - a String valuepublic java.lang.String getCommitOrderErrorURL()
String valuepublic void preCommitOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest - the request objectpResponse - the response objectjavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void postCommitOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
By the time this method is called the order has been committed to the database by calling OrderManager.processOrder. If an application modifies the order within its own postCommitOrder method, that method is responsible for saving the new state of the order by calling OrderManager.updateOrder.
pRequest - the request objectpResponse - the response objectjavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic boolean handleCommitOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
Assuming the order is not a duplicate submission, the form handler calls OrderManager.processOrder to actually place the order. If placing the order succeeds, then the form handler sets the shopping cart lastOrder to the current (just submitted) order and the currentOrder to null. Finally, it calls the postCommitOrder method for any application-specific post-processing.
pRequest - the servlet's requestpResponse - the servlet's responseboolean valuejavax.servlet.ServletException - if there was an error while executing the codejava.io.IOException - if there was an error with servlet iopublic void commitOrder(Order pOrder, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
preCommitOrder and postCommitOrder. This method
 calls the getProcessOrderMap(Locale) to get the process order map and calls the Order Manager 
 to process the order.pOrder - pRequest - pResponse - javax.servlet.ServletExceptionjava.io.IOExceptionpublic java.util.HashMap getProcessOrderMap(java.util.Locale pLocale)
                                     throws CommerceException
OrderManager.getProcessOrderMap(pLocale, map)> to get the process order map
 and adds site ID and sales channel to the map if specified.CommerceException