atg.commerce.csr.order
Class CSRCommitOrderFormHandler

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.commerce.csr.order.CSRCommitOrderFormHandler
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 CSRCommitOrderFormHandler
extends atg.commerce.order.purchase.CommitOrderFormHandler

This extends the CommitOrderFormHandler to allow the CSR to log a comment when committing a new order.

See Also:
CommitOrderFormHandler, PurchaseProcessFormHandler

Field Summary
static java.lang.String CLASS_VERSION
           
static java.lang.String ERROR_WHILE_FETCHING_PRICE_LIST
           
protected  CSRAgentMessagingTools mAgentMessagingTools
           
protected  boolean mAutoEmailSent
           
protected  boolean mAutoSendEmail
           
protected  CSRCloneEditManager mCloneEditManager
           
protected  java.lang.String mComment
           
protected  java.lang.String mCommitOrderUpdatesErrorURL
           
protected  java.lang.String mCommitOrderUpdatesSuccessURL
           
protected  java.lang.String mConcurrentUpdateErrorURL
           
protected  ConfirmationInfo mConfirmationInfo
           
protected  java.lang.String mConfirmationToAddress
           
protected  boolean mCreateTemplateFromSubmittedOrder
           
protected  CSRAgentTools mCSRAgentTools
           
protected  CSRScheduledOrderTools mCSRScheduledOrderTools
           
protected  java.util.Properties mDuplicateOrderForTemplateExcludedProperties
           
protected  java.util.Map mDuplicateOrderForTemplateExcludedPropertiesMap
           
protected  java.lang.String mProcessTemplateErrorURL
           
protected  java.lang.String mProcessTemplatePipelineId
           
protected  java.lang.String mProcessTemplateSuccessURL
           
protected  java.lang.String mReturnsDataHolderPath
           
static java.lang.String MSG_ERROR_CANNOT_SAVE_NOT_TRANSIENT_ORDER
           
static java.lang.String MSG_ERROR_COMMITTING_ORDER_CHANGES
           
static java.lang.String MSG_ERROR_CONCURRENT_UPDATE_DURING_RECONCILIATION
           
static java.lang.String MSG_ERROR_CREATING_ORDER_COMMENT
           
static java.lang.String MSG_ERROR_INITIALIZING_NEW_ORDER
           
static java.lang.String MSG_ERROR_PERSISTING_ORDER
           
static java.lang.String MSG_ERROR_SAVING_ORDER_TEMPLATE
           
static java.lang.String MSG_ERROR_SENDING_EMAIL_CONFIRM
           
static java.lang.String MSG_ERROR_SENDING_EXISTING_ORDER_EMAIL_CONFIRM
           
static java.lang.String MSG_ERROR_SENDING_NEW_ORDER_EMAIL_CONFIRM
           
static java.lang.String MSG_ERROR_SHOPPING_CART_NOT_IN_CLONE_EDIT_MODE
           
static java.lang.String MSG_ERROR_VERIFYING_ORDER_TEMPLATE
           
static java.lang.String MSG_ORDER_ALREADY_SAVED
           
protected  java.lang.String mTemplateToUse
           
static java.lang.String MY_RESOURCE_NAME
           
static java.lang.String NEW_ORDER_TEMPLATE_NAME
           
static java.lang.String ORDER_EXCHANGE_TEMPLATE_NAME
           
static java.lang.String ORDER_RETURN_TEMPLATE_NAME
           
static java.lang.String ORDER_UPDATE_TEMPLATE_NAME
           
static java.lang.String SCHEDULED_ORDER_UPDATE_TEMPLATE_NAME
           
 
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
CSRCommitOrderFormHandler()
          Creates a new CommitOrderFormHandler instance.
 
Method Summary
 void commitOrderUpdates()
          Reconciles the clone with the original order
protected  java.util.Map createDuplicateOrderForTemplatePropExceptionsMap()
          This method is a helper method which is used when duplicating an order as part of the submit process It creates a Map that will be used by the cloneItem method in RepositoryUtils class as a PropExceptions parameter.
protected  java.util.Map createRepriceParameterMap()
          Creates the extra parameter map that is used when the order is repriced after form handler modifications to the order.
protected  java.util.Map generateProcessTemplateExtraParams()
          Generated the extra parameters map that's passed to the process template pipeline.
 CSRAgentMessagingTools getAgentMessagingTools()
          Returns component for sending agent messages
 CSRCloneEditManager getCloneEditManager()
           
 java.lang.String getComment()
          Return the Comment property.
 java.lang.String getCommitOrderUpdatesErrorURL()
          Returns property CommitOrderUpdatesErrorURL
 java.lang.String getCommitOrderUpdatesSuccessURL()
          Returns property CommitOrderUpdatesSuccessURL
 java.lang.String getConcurrentUpdateErrorURL()
          returns the URL used when there's an concurrent update exception during the reconciliation process.
 ConfirmationInfo getConfirmationInfo()
          Returns the confirmation info object used for sending email confirmations.
 java.lang.String getConfirmationToAddress()
          Deprecated.  
 CSRAgentTools getCSRAgentTools()
           
 CSRScheduledOrderTools getCSRScheduledOrderTools()
          Returns a reference to the CSRScheduledOrderTools component
 java.util.Properties getDuplicateOrderForTemplateExcludedProperties()
          Returns the excluded order properties when duplicating an order
 java.util.Map getDuplicateOrderForTemplateExcludedPropertiesMap()
          Generates an the excluded property map based on the duplicateOrderExcludedProperties property.
 java.lang.String getProcessTemplateErrorURL()
          Returns property ProcessTemplateErrorURL
 java.lang.String getProcessTemplatePipelineId()
          Returns the id of the pipeline used to validate an order can be saved as a scheduled order template.
 java.lang.String getProcessTemplateSuccessURL()
          Returns property ProcessTemplateSuccessURL
 atg.commerce.csr.returns.ReturnsDataHolder getReturnsDataHolder()
          Resolves the requested dataholder
 java.lang.String getReturnsDataHolderPath()
          Gets the ReturnsDataHolderPath
 java.util.Locale getUserLocale(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method over-rides the core commerce method and calls CSRAgentTools.getActiveCustomerPricingLocale() to get the locale.
 boolean handleCommitOrderUpdates(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Reconciles a clone order with the original.
 boolean handlePersistOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Persists the current order in the cart.
 boolean handleProcessTemplate(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This handler processes a order that will be saved as a scheduled order template.
 boolean handleSendConfirmationMessage(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Sends a confirmation email message
protected  void initializeConfirmationInfoForNewOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Initializes the confirmation info object when a new order is submitted
protected  void initializeConfirmationInfoForUpdateOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Initializes the confirmation info object after order updates are reconciled/committed
 boolean isAutoEmailSent()
          Deprecated.  
 boolean isAutoSendEmail()
          Gets the AutoSendEmail
 boolean isCreateTemplateFromSubmittedOrder()
          This flag determines if a submitted order is duplicated into a scheduled order template and loaded into global context after submitting an order.
 void persistOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Called to persist the current order.
 void postCommitOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Called after any processing is done by the handleCommitOrder method.
 void postCommitOrderUpdates(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          If there are no errors, this method initializes a new order in the order holder.
 void postPersistOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Called after persisting the order
 void postProcessTemplate(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Executed after the template is processed.
 void postSendConfirmationMessage(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Called after a confirmation email is sent
 void preCommitOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Called before any processing is done by the handleCommitOrder method.
 void preCommitOrderUpdates(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Called prior to committing the order updates
 void prePersistOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Called prior to persisting the order
 void preProcessTemplate(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Executed prior to processing the template
 void preSendConfirmationMessage(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Called before a confirmation email is sent
protected  void processConcurrentUpdateException(java.lang.Exception pException)
          Adds a form error specific to concurrent update problem, puts new order is put into global context and sets the error url from property concurrentUpdateErrorURL
protected  void processTemplate(atg.commerce.order.Order pTemplateOrder, atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method verifies the order is ready to be used as a scheduled order template.
 void sendConfirmationMessage(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Send the confirmation message using the the CSRAgentTools component.
 void setAgentMessagingTools(CSRAgentMessagingTools pAgentMessagingTools)
          Sets the component for sending agent messages
 void setAutoEmailSent(boolean pAutoEmailSent)
          Deprecated.  
 void setAutoSendEmail(boolean pAutoSendEmail)
          Sets the AutoSendEmail
 void setCloneEditManager(CSRCloneEditManager pCloneEditManager)
           
 void setComment(java.lang.String pComment)
          Set the comment property.
 void setCommitOrderUpdatesErrorURL(java.lang.String pCommitOrderUpdatesErrorURL)
          Sets property CommitOrderUpdatesErrorURL
 void setCommitOrderUpdatesSuccessURL(java.lang.String pCommitOrderUpdatesSuccessURL)
          Sets property CommitOrderUpdatesSuccessURL
 void setConcurrentUpdateErrorURL(java.lang.String pConcurrentUpdateErrorURL)
           
 void setConfirmationInfo(ConfirmationInfo pConfirmationInfo)
           
 void setConfirmationToAddress(java.lang.String pConfirmationToAddress)
          Deprecated.  
 void setCreateTemplateFromSubmittedOrder(boolean pCreateTemplateFromSubmittedOrder)
           
 void setCSRAgentTools(CSRAgentTools pCSRAgentTools)
          Sets the property CSRAgentTools.
 void setCSRScheduledOrderTools(CSRScheduledOrderTools pCSRScheduledOrderTools)
           
 void setDuplicateOrderForTemplateExcludedProperties(java.util.Properties pDuplicateOrderForTemplateExcludedProperties)
          set the property DuplicateOrderForTemplateExcludedProperties
 void setProcessTemplateErrorURL(java.lang.String pProcessTemplateErrorURL)
          Sets property ProcessTemplateErrorURL
 void setProcessTemplatePipelineId(java.lang.String pProcessTemplatePipelineId)
           
 void setProcessTemplateSuccessURL(java.lang.String pProcessTemplateSuccessURL)
          Sets property ProcessTemplateSuccessURL
 void setReturnsDataHolderPath(java.lang.String pReturnsDataHolderPath)
          Sets the ReturnsDataHolderPath
 
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, 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, 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

MY_RESOURCE_NAME

public static final java.lang.String MY_RESOURCE_NAME
See Also:
Constant Field Values

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values

ERROR_WHILE_FETCHING_PRICE_LIST

public static final java.lang.String ERROR_WHILE_FETCHING_PRICE_LIST
See Also:
Constant Field Values

MSG_ORDER_ALREADY_SAVED

public static final java.lang.String MSG_ORDER_ALREADY_SAVED
See Also:
Constant Field Values

NEW_ORDER_TEMPLATE_NAME

public static final java.lang.String NEW_ORDER_TEMPLATE_NAME
See Also:
Constant Field Values

ORDER_UPDATE_TEMPLATE_NAME

public static final java.lang.String ORDER_UPDATE_TEMPLATE_NAME
See Also:
Constant Field Values

ORDER_EXCHANGE_TEMPLATE_NAME

public static final java.lang.String ORDER_EXCHANGE_TEMPLATE_NAME
See Also:
Constant Field Values

ORDER_RETURN_TEMPLATE_NAME

public static final java.lang.String ORDER_RETURN_TEMPLATE_NAME
See Also:
Constant Field Values

SCHEDULED_ORDER_UPDATE_TEMPLATE_NAME

public static final java.lang.String SCHEDULED_ORDER_UPDATE_TEMPLATE_NAME
See Also:
Constant Field Values

MSG_ERROR_CREATING_ORDER_COMMENT

public static final java.lang.String MSG_ERROR_CREATING_ORDER_COMMENT
See Also:
Constant Field Values

MSG_ERROR_SENDING_NEW_ORDER_EMAIL_CONFIRM

public static final java.lang.String MSG_ERROR_SENDING_NEW_ORDER_EMAIL_CONFIRM
See Also:
Constant Field Values

MSG_ERROR_SENDING_EXISTING_ORDER_EMAIL_CONFIRM

public static final java.lang.String MSG_ERROR_SENDING_EXISTING_ORDER_EMAIL_CONFIRM
See Also:
Constant Field Values

MSG_ERROR_INITIALIZING_NEW_ORDER

public static final java.lang.String MSG_ERROR_INITIALIZING_NEW_ORDER
See Also:
Constant Field Values

MSG_ERROR_SENDING_EMAIL_CONFIRM

public static final java.lang.String MSG_ERROR_SENDING_EMAIL_CONFIRM
See Also:
Constant Field Values

MSG_ERROR_SHOPPING_CART_NOT_IN_CLONE_EDIT_MODE

public static final java.lang.String MSG_ERROR_SHOPPING_CART_NOT_IN_CLONE_EDIT_MODE
See Also:
Constant Field Values

MSG_ERROR_CONCURRENT_UPDATE_DURING_RECONCILIATION

public static final java.lang.String MSG_ERROR_CONCURRENT_UPDATE_DURING_RECONCILIATION
See Also:
Constant Field Values

MSG_ERROR_CANNOT_SAVE_NOT_TRANSIENT_ORDER

public static final java.lang.String MSG_ERROR_CANNOT_SAVE_NOT_TRANSIENT_ORDER
See Also:
Constant Field Values

MSG_ERROR_PERSISTING_ORDER

public static final java.lang.String MSG_ERROR_PERSISTING_ORDER
See Also:
Constant Field Values

MSG_ERROR_COMMITTING_ORDER_CHANGES

public static final java.lang.String MSG_ERROR_COMMITTING_ORDER_CHANGES
See Also:
Constant Field Values

MSG_ERROR_SAVING_ORDER_TEMPLATE

public static final java.lang.String MSG_ERROR_SAVING_ORDER_TEMPLATE
See Also:
Constant Field Values

MSG_ERROR_VERIFYING_ORDER_TEMPLATE

public static final java.lang.String MSG_ERROR_VERIFYING_ORDER_TEMPLATE
See Also:
Constant Field Values

mConfirmationInfo

protected ConfirmationInfo mConfirmationInfo

mProcessTemplatePipelineId

protected java.lang.String mProcessTemplatePipelineId

mDuplicateOrderForTemplateExcludedProperties

protected java.util.Properties mDuplicateOrderForTemplateExcludedProperties

mDuplicateOrderForTemplateExcludedPropertiesMap

protected java.util.Map mDuplicateOrderForTemplateExcludedPropertiesMap

mConcurrentUpdateErrorURL

protected java.lang.String mConcurrentUpdateErrorURL

mCloneEditManager

protected CSRCloneEditManager mCloneEditManager

mCommitOrderUpdatesSuccessURL

protected java.lang.String mCommitOrderUpdatesSuccessURL

mCommitOrderUpdatesErrorURL

protected java.lang.String mCommitOrderUpdatesErrorURL

mProcessTemplateSuccessURL

protected java.lang.String mProcessTemplateSuccessURL

mProcessTemplateErrorURL

protected java.lang.String mProcessTemplateErrorURL

mAgentMessagingTools

protected CSRAgentMessagingTools mAgentMessagingTools

mCSRAgentTools

protected CSRAgentTools mCSRAgentTools

mCSRScheduledOrderTools

protected CSRScheduledOrderTools mCSRScheduledOrderTools

mComment

protected java.lang.String mComment

mCreateTemplateFromSubmittedOrder

protected boolean mCreateTemplateFromSubmittedOrder

mAutoSendEmail

protected boolean mAutoSendEmail

mAutoEmailSent

protected boolean mAutoEmailSent

mConfirmationToAddress

protected java.lang.String mConfirmationToAddress

mTemplateToUse

protected java.lang.String mTemplateToUse

mReturnsDataHolderPath

protected java.lang.String mReturnsDataHolderPath
Constructor Detail

CSRCommitOrderFormHandler

public CSRCommitOrderFormHandler()
Creates a new CommitOrderFormHandler instance.

Method Detail

getConfirmationInfo

public ConfirmationInfo getConfirmationInfo()
Returns the confirmation info object used for sending email confirmations.

Returns:
ConfirmationInfo

setConfirmationInfo

public void setConfirmationInfo(ConfirmationInfo pConfirmationInfo)

getProcessTemplatePipelineId

public java.lang.String getProcessTemplatePipelineId()
Returns the id of the pipeline used to validate an order can be saved as a scheduled order template.

Returns:
pipeline id

setProcessTemplatePipelineId

public void setProcessTemplatePipelineId(java.lang.String pProcessTemplatePipelineId)

setDuplicateOrderForTemplateExcludedProperties

public void setDuplicateOrderForTemplateExcludedProperties(java.util.Properties pDuplicateOrderForTemplateExcludedProperties)
set the property DuplicateOrderForTemplateExcludedProperties

Parameters:
pDuplicateOrderForTemplateExcludedProperties - the value to set for property DuplicateOrderForTemplateExcludedProperties

getDuplicateOrderForTemplateExcludedProperties

public java.util.Properties getDuplicateOrderForTemplateExcludedProperties()
Returns the excluded order properties when duplicating an order


createDuplicateOrderForTemplatePropExceptionsMap

protected java.util.Map createDuplicateOrderForTemplatePropExceptionsMap()
This method is a helper method which is used when duplicating an order as part of the submit process It creates a Map that will be used by the cloneItem method in RepositoryUtils class as a PropExceptions parameter. The user should override this method if the order item descriptor has changed or some properties which previously requires deep copy now requires shallow copy or vice versa.

This method returns null by default

Returns:
the Map

getDuplicateOrderForTemplateExcludedPropertiesMap

public java.util.Map getDuplicateOrderForTemplateExcludedPropertiesMap()
Generates an the excluded property map based on the duplicateOrderExcludedProperties property.

Returns:
returns property DuplicateOrderForTemplateExcludedPropertiesMap

getConcurrentUpdateErrorURL

public java.lang.String getConcurrentUpdateErrorURL()
returns the URL used when there's an concurrent update exception during the reconciliation process.


setConcurrentUpdateErrorURL

public void setConcurrentUpdateErrorURL(java.lang.String pConcurrentUpdateErrorURL)

getCloneEditManager

public CSRCloneEditManager getCloneEditManager()
Returns:
the clone edit manager component instance

setCloneEditManager

public void setCloneEditManager(CSRCloneEditManager pCloneEditManager)

setCommitOrderUpdatesSuccessURL

public void setCommitOrderUpdatesSuccessURL(java.lang.String pCommitOrderUpdatesSuccessURL)
Sets property CommitOrderUpdatesSuccessURL

Parameters:
pCommitOrderUpdatesSuccessURL - a String value

getCommitOrderUpdatesSuccessURL

public java.lang.String getCommitOrderUpdatesSuccessURL()
Returns property CommitOrderUpdatesSuccessURL

Returns:
a String value

setCommitOrderUpdatesErrorURL

public void setCommitOrderUpdatesErrorURL(java.lang.String pCommitOrderUpdatesErrorURL)
Sets property CommitOrderUpdatesErrorURL

Parameters:
pCommitOrderUpdatesErrorURL - a String value

getCommitOrderUpdatesErrorURL

public java.lang.String getCommitOrderUpdatesErrorURL()
Returns property CommitOrderUpdatesErrorURL

Returns:
a String value

setProcessTemplateSuccessURL

public void setProcessTemplateSuccessURL(java.lang.String pProcessTemplateSuccessURL)
Sets property ProcessTemplateSuccessURL

Parameters:
pProcessTemplateSuccessURL - a String value

getProcessTemplateSuccessURL

public java.lang.String getProcessTemplateSuccessURL()
Returns property ProcessTemplateSuccessURL

Returns:
a String value

setProcessTemplateErrorURL

public void setProcessTemplateErrorURL(java.lang.String pProcessTemplateErrorURL)
Sets property ProcessTemplateErrorURL

Parameters:
pProcessTemplateErrorURL - a String value

getProcessTemplateErrorURL

public java.lang.String getProcessTemplateErrorURL()
Returns property ProcessTemplateErrorURL

Returns:
a String value

setAgentMessagingTools

public void setAgentMessagingTools(CSRAgentMessagingTools pAgentMessagingTools)
Sets the component for sending agent messages

Parameters:
pAgentMessagingTools -

getAgentMessagingTools

public CSRAgentMessagingTools getAgentMessagingTools()
Returns component for sending agent messages

Returns:
AgentMessagingTools

setCSRAgentTools

public void setCSRAgentTools(CSRAgentTools pCSRAgentTools)
Sets the property CSRAgentTools.


getCSRAgentTools

public CSRAgentTools getCSRAgentTools()
Returns:
The CSRAgentTools component used to manipulate the profile

getCSRScheduledOrderTools

public CSRScheduledOrderTools getCSRScheduledOrderTools()
Returns a reference to the CSRScheduledOrderTools component


setCSRScheduledOrderTools

public void setCSRScheduledOrderTools(CSRScheduledOrderTools pCSRScheduledOrderTools)

setComment

public void setComment(java.lang.String pComment)
Set the comment property.

Parameters:
pComment - a String value

getComment

public java.lang.String getComment()
Return the Comment property.

Returns:
a String value

isCreateTemplateFromSubmittedOrder

public boolean isCreateTemplateFromSubmittedOrder()
This flag determines if a submitted order is duplicated into a scheduled order template and loaded into global context after submitting an order. default is false

Returns:
boolean

setCreateTemplateFromSubmittedOrder

public void setCreateTemplateFromSubmittedOrder(boolean pCreateTemplateFromSubmittedOrder)

isAutoSendEmail

public boolean isAutoSendEmail()
Gets the AutoSendEmail

Returns:
the AutoSendEmail

setAutoSendEmail

public void setAutoSendEmail(boolean pAutoSendEmail)
Sets the AutoSendEmail

Parameters:
pAutoSendEmail - The AutoSendEmail to set

isAutoEmailSent

public boolean isAutoEmailSent()
Deprecated. 

Gets the EmailSent

Returns:
the EmailSent
See Also:
ConfirmationInfo.isAutoConfirmationSent()

setAutoEmailSent

public void setAutoEmailSent(boolean pAutoEmailSent)
Deprecated. 

Sets the EmailSent

Parameters:
pAutoEmailSent - The IsEmailSent to set
See Also:
ConfirmationInfo.setAutoConfirmationSent(boolean)

getConfirmationToAddress

public java.lang.String getConfirmationToAddress()
Deprecated. 

Gets the ConfirmationToAddress

Returns:
the ConfirmationToAddress
See Also:
ConfirmationInfo.getToEmailAddress()

setConfirmationToAddress

public void setConfirmationToAddress(java.lang.String pConfirmationToAddress)
Deprecated. 

Sets the ConfirmationToAddress

Parameters:
pConfirmationToAddress - The ConfirmationToAddress to set

getReturnsDataHolderPath

public java.lang.String getReturnsDataHolderPath()
Gets the ReturnsDataHolderPath

Returns:
the ReturnsDataHolderPath

setReturnsDataHolderPath

public void setReturnsDataHolderPath(java.lang.String pReturnsDataHolderPath)
Sets the ReturnsDataHolderPath

Parameters:
pReturnsDataHolderPath - The ReturnsDataHolderPath to set

preCommitOrder

public void preCommitOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                           atg.servlet.DynamoHttpServletResponse pResponse)
                    throws javax.servlet.ServletException,
                           java.io.IOException
Called before any processing is done by the handleCommitOrder method. The default implementation does nothing. This method is called from within a synchronized block that synchronizes on the current order object.

Overrides:
preCommitOrder 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

postCommitOrder

public void postCommitOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                            atg.servlet.DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Called after any processing is done by the handleCommitOrder method. This logs the comment submitted by the CSR

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

initializeConfirmationInfoForNewOrder

protected void initializeConfirmationInfoForNewOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                                                     atg.servlet.DynamoHttpServletResponse pResponse)
Initializes the confirmation info object when a new order is submitted

Parameters:
pRequest -
pResponse -

initializeConfirmationInfoForUpdateOrder

protected void initializeConfirmationInfoForUpdateOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                                                        atg.servlet.DynamoHttpServletResponse pResponse)
Initializes the confirmation info object after order updates are reconciled/committed

Parameters:
pRequest -
pResponse -

preSendConfirmationMessage

public void preSendConfirmationMessage(atg.servlet.DynamoHttpServletRequest pRequest,
                                       atg.servlet.DynamoHttpServletResponse pResponse)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
Called before a confirmation email is sent

Parameters:
pRequest -
pResponse -
Throws:
javax.servlet.ServletException
java.io.IOException

postSendConfirmationMessage

public void postSendConfirmationMessage(atg.servlet.DynamoHttpServletRequest pRequest,
                                        atg.servlet.DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
Called after a confirmation email is sent

Parameters:
pRequest -
pResponse -
Throws:
javax.servlet.ServletException
java.io.IOException

preCommitOrderUpdates

public void preCommitOrderUpdates(atg.servlet.DynamoHttpServletRequest pRequest,
                                  atg.servlet.DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
Called prior to committing the order updates

Parameters:
pRequest -
pResponse -
Throws:
javax.servlet.ServletException
java.io.IOException

postCommitOrderUpdates

public void postCommitOrderUpdates(atg.servlet.DynamoHttpServletRequest pRequest,
                                   atg.servlet.DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
If there are no errors, this method initializes a new order in the order holder.

Parameters:
pRequest -
pResponse -
Throws:
javax.servlet.ServletException
java.io.IOException

commitOrderUpdates

public void commitOrderUpdates()
                        throws atg.commerce.CommerceException
Reconciles the clone with the original order

Throws:
atg.commerce.CommerceException
See Also:
CloneEditManager.reconcileOrder(CloneEditState, Map)

sendConfirmationMessage

public void sendConfirmationMessage(atg.servlet.DynamoHttpServletRequest pRequest,
                                    atg.servlet.DynamoHttpServletResponse pResponse)
Send the confirmation message using the the CSRAgentTools component.

Throws:
atg.userprofiling.email.TemplateEmailException - - If an error occured sending the message.

handleCommitOrderUpdates

public boolean handleCommitOrderUpdates(atg.servlet.DynamoHttpServletRequest pRequest,
                                        atg.servlet.DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
Reconciles a clone order with the original.

Parameters:
pRequest -
pResponse -
Returns:
boolean
Throws:
javax.servlet.ServletException
java.io.IOException

processConcurrentUpdateException

protected void processConcurrentUpdateException(java.lang.Exception pException)
Adds a form error specific to concurrent update problem, puts new order is put into global context and sets the error url from property concurrentUpdateErrorURL

Parameters:
pException -

handleSendConfirmationMessage

public boolean handleSendConfirmationMessage(atg.servlet.DynamoHttpServletRequest pRequest,
                                             atg.servlet.DynamoHttpServletResponse pResponse)
                                      throws javax.servlet.ServletException,
                                             java.io.IOException
Sends a confirmation email message

Parameters:
pRequest -
pResponse -
Returns:
boolean
Throws:
javax.servlet.ServletException
java.io.IOException

prePersistOrder

public void prePersistOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                            atg.servlet.DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Called prior to persisting the order

Parameters:
pRequest -
pResponse -
Throws:
javax.servlet.ServletException
java.io.IOException

postPersistOrder

public void postPersistOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                             atg.servlet.DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Called after persisting the order

Parameters:
pRequest -
pResponse -
Throws:
javax.servlet.ServletException
java.io.IOException

persistOrder

public void persistOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                         atg.servlet.DynamoHttpServletResponse pResponse)
                  throws javax.servlet.ServletException,
                         java.io.IOException
Called to persist the current order.

Throws:
javax.servlet.ServletException
java.io.IOException
See Also:
CSRAgentTools.persistCurrentOrder()

handlePersistOrder

public boolean handlePersistOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                                  atg.servlet.DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
Persists the current order in the cart.

Parameters:
pRequest -
pResponse -
Returns:
boolean
Throws:
javax.servlet.ServletException
java.io.IOException

createRepriceParameterMap

protected java.util.Map createRepriceParameterMap()
Creates the extra parameter map that is used when the order is repriced after form handler modifications to the order.

This extension adds the current price list and sale price list to the map

Overrides:
createRepriceParameterMap in class atg.commerce.order.purchase.PurchaseProcessFormHandler
Returns:
Map of parameters or null

getReturnsDataHolder

public atg.commerce.csr.returns.ReturnsDataHolder getReturnsDataHolder()
Resolves the requested dataholder

Returns:
ProgressBarItem

getUserLocale

public java.util.Locale getUserLocale(atg.servlet.DynamoHttpServletRequest pRequest,
                                      atg.servlet.DynamoHttpServletResponse pResponse)
                               throws javax.servlet.ServletException,
                                      java.io.IOException
This method over-rides the core commerce method and calls CSRAgentTools.getActiveCustomerPricingLocale() to get the locale. The CSC agents are working on a customer's orders. Because of the above reason, the application has to load customer's default locale.

Overrides:
getUserLocale in class atg.commerce.order.purchase.PurchaseProcessFormHandler
Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
a Locale value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
See Also:
CSRAgentTools.getActiveCustomerPricingLocale()

preProcessTemplate

public void preProcessTemplate(atg.servlet.DynamoHttpServletRequest pRequest,
                               atg.servlet.DynamoHttpServletResponse pResponse)
                        throws javax.servlet.ServletException,
                               java.io.IOException
Executed prior to processing the template

Parameters:
pRequest -
pResponse -
Throws:
javax.servlet.ServletException
java.io.IOException

handleProcessTemplate

public boolean handleProcessTemplate(atg.servlet.DynamoHttpServletRequest pRequest,
                                     atg.servlet.DynamoHttpServletResponse pResponse)
                              throws javax.servlet.ServletException,
                                     java.io.IOException
This handler processes a order that will be saved as a scheduled order template.

Called when the schedule option is selected at the end of new order checkout.

Parameters:
pRequest -
pResponse -
Returns:
boolean
Throws:
javax.servlet.ServletException
java.io.IOException

processTemplate

protected void processTemplate(atg.commerce.order.Order pTemplateOrder,
                               atg.servlet.DynamoHttpServletRequest pRequest,
                               atg.servlet.DynamoHttpServletResponse pResponse)
This method verifies the order is ready to be used as a scheduled order template.

Errors from this process are added as form exceptions.

Parameters:
pTemplateOrder - the template order
pRequest -
pResponse -
See Also:
CSRScheduledOrderTools.processTemplate(Order, java.util.Locale, String, Map)

postProcessTemplate

public void postProcessTemplate(atg.servlet.DynamoHttpServletRequest pRequest,
                                atg.servlet.DynamoHttpServletResponse pResponse)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Executed after the template is processed.

Parameters:
pRequest -
pResponse -
Throws:
javax.servlet.ServletException
java.io.IOException

generateProcessTemplateExtraParams

protected java.util.Map generateProcessTemplateExtraParams()
Generated the extra parameters map that's passed to the process template pipeline.

Returns:
Map