atg.commerce.csr.order
Class ViewOrderFormHandler

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.csr.order.ViewOrderFormHandler
All Implemented Interfaces:
atg.droplet.DropletFormHandler, atg.naming.AbsoluteNameable, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameContextParentable, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.Configured, 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 ViewOrderFormHandler
extends atg.droplet.GenericFormHandler

This form handler is used for perform actions against the view order.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  CSREnvironmentTools mCSREnvironmentTools
           
protected  CSRScheduledOrderTools mCSRScheduledOrderTools
           
protected  atg.web.messaging.MessageTools mMessageTools
           
protected  atg.commerce.order.OrderManager mOrderManager
           
protected  javax.transaction.TransactionManager mTransactionManager
           
protected  java.lang.String mViewOrderId
           
 
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
ViewOrderFormHandler()
           
 
Method Summary
protected  atg.commerce.order.Order changeViewOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Sets the current order on the view order holder to the order specified by the property viewOrderId
 CSREnvironmentTools getCSREnvironmentTools()
           
 CSRScheduledOrderTools getCSRScheduledOrderTools()
          Returns a reference to the CSRScheduledOrderTools component
 java.lang.String getErrorURL()
          Returns property ErrorURL
 atg.web.messaging.MessageTools getMessageTools()
          Returns the MessageTools component
 atg.commerce.order.OrderManager getOrderManager()
           
 atg.svc.agent.ui.OriginatingPage getOriginatingPage()
          Returns a reference to the OriginatingPage component
 java.lang.String getSuccessScheduledURL()
          Returns property SuccessScheduledURL
 java.lang.String getSuccessURL()
          Returns property SuccessURL
 javax.transaction.TransactionManager getTransactionManager()
          Returns the transaction manager
protected  java.util.Locale getUserLocale()
          This method gets the current Locale
 java.lang.String getViewOrderId()
          Returns the id of the order that will be loaded into the view order holder by handleChangeViewOrder
 boolean handleChangeViewOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This handler is used to change the current order loaded in the view order holder.
 boolean handleFindOrderId(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This handler is used to find existing order by Id
protected  void postChangeViewOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Called after changing the current view order.
protected  void preChangeViewOrder(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Called prior to changing the current view order.
 void setCSREnvironmentTools(CSREnvironmentTools pCSREnvironmentTools)
           
 void setCSRScheduledOrderTools(CSRScheduledOrderTools pCSRScheduledOrderTools)
           
 void setErrorURL(java.lang.String pErrorURL)
          Sets property ErrorURL.
 void setMessageTools(atg.web.messaging.MessageTools pMessageTools)
           
 void setOrderManager(atg.commerce.order.OrderManager pOrderManager)
           
 void setOriginatingPage(atg.svc.agent.ui.OriginatingPage pOriginatingPage)
           
 void setSuccessScheduledURL(java.lang.String pSuccessScheduledURL)
          Sets property SuccessScheduledURL
 void setSuccessURL(java.lang.String pSuccessURL)
          Sets property SuccessURL
 void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
          Sets the Transaction Manager
 void setViewOrderId(java.lang.String pViewOrderId)
           
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, afterSet, beforeSet, checkFormRedirect, 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, doStartService, 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 java.lang.String CLASS_VERSION
Class version string


mMessageTools

protected atg.web.messaging.MessageTools mMessageTools

mCSREnvironmentTools

protected CSREnvironmentTools mCSREnvironmentTools

mViewOrderId

protected java.lang.String mViewOrderId

mOrderManager

protected atg.commerce.order.OrderManager mOrderManager

mCSRScheduledOrderTools

protected CSRScheduledOrderTools mCSRScheduledOrderTools

mTransactionManager

protected javax.transaction.TransactionManager mTransactionManager
Constructor Detail

ViewOrderFormHandler

public ViewOrderFormHandler()
Method Detail

getMessageTools

public atg.web.messaging.MessageTools getMessageTools()
Returns the MessageTools component

Returns:
MessageTools

setMessageTools

public void setMessageTools(atg.web.messaging.MessageTools pMessageTools)

getCSREnvironmentTools

public CSREnvironmentTools getCSREnvironmentTools()

setCSREnvironmentTools

public void setCSREnvironmentTools(CSREnvironmentTools pCSREnvironmentTools)

getViewOrderId

public java.lang.String getViewOrderId()
Returns the id of the order that will be loaded into the view order holder by handleChangeViewOrder


setViewOrderId

public void setViewOrderId(java.lang.String pViewOrderId)

getOrderManager

public atg.commerce.order.OrderManager getOrderManager()

setOrderManager

public void setOrderManager(atg.commerce.order.OrderManager pOrderManager)

getCSRScheduledOrderTools

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


setCSRScheduledOrderTools

public void setCSRScheduledOrderTools(CSRScheduledOrderTools pCSRScheduledOrderTools)

setOriginatingPage

public void setOriginatingPage(atg.svc.agent.ui.OriginatingPage pOriginatingPage)

getOriginatingPage

public atg.svc.agent.ui.OriginatingPage getOriginatingPage()
Returns a reference to the OriginatingPage component


setErrorURL

public void setErrorURL(java.lang.String pErrorURL)
Sets property ErrorURL.

This property can be set by request parameter using the name defined by ERROR_URL.This makes it possible to pass the parameter using an anchor tag.

Parameters:
pErrorURL - a String value

getErrorURL

public java.lang.String getErrorURL()
Returns property ErrorURL

Returns:
a String value

setSuccessURL

public void setSuccessURL(java.lang.String pSuccessURL)
Sets property SuccessURL

This property can be set by request parameter using the name defined by SUCCESS_URL. This makes it possible to pass the parameter using an anchor tag.

Parameters:
pSuccessURL - a String value

getSuccessURL

public java.lang.String getSuccessURL()
Returns property SuccessURL

Returns:
a String value

getSuccessScheduledURL

public java.lang.String getSuccessScheduledURL()
Returns property SuccessScheduledURL

Returns:
a String value

setSuccessScheduledURL

public void setSuccessScheduledURL(java.lang.String pSuccessScheduledURL)
Sets property SuccessScheduledURL

Parameters:
pSuccessScheduledURL - a String value

setTransactionManager

public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets the Transaction Manager

Parameters:
pTransactionManager -

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
Returns the transaction manager


preChangeViewOrder

protected void preChangeViewOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                                  atg.servlet.DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
Called prior to changing the current view order.

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

handleChangeViewOrder

public boolean handleChangeViewOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                                     atg.servlet.DynamoHttpServletResponse pResponse)
                              throws javax.servlet.ServletException,
                                     java.io.IOException
This handler is used to change the current order loaded in the view order holder.

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

postChangeViewOrder

protected void postChangeViewOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                                   atg.servlet.DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
Called after changing the current view order.

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

handleFindOrderId

public boolean handleFindOrderId(atg.servlet.DynamoHttpServletRequest pRequest,
                                 atg.servlet.DynamoHttpServletResponse pResponse)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
This handler is used to find existing order by Id

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

changeViewOrder

protected atg.commerce.order.Order changeViewOrder(atg.servlet.DynamoHttpServletRequest pRequest,
                                                   atg.servlet.DynamoHttpServletResponse pResponse)
                                            throws javax.servlet.ServletException,
                                                   java.io.IOException
Sets the current order on the view order holder to the order specified by the property viewOrderId

If the order is a scheduled order template, the order will be re-priced (but not saved to the repository) so the view will show current day pricing.

This method calls CSRScheduledOrderTools.shouldRepriceScheduledOrder(Order) to find out whether to re-price the scheduled order or not . If the above method returns false, then the scheduled order is not re-priced.

Parameters:
pRequest -
pResponse -
Throws:
javax.servlet.ServletException
java.io.IOException
See Also:
CSRScheduledOrderTools.repriceScheduledOrderForView(Order)

getUserLocale

protected java.util.Locale getUserLocale()
This method gets the current Locale

Returns:
the current Locale