atg.commerce.csr.approvals.order
Class UpdateOrderApprovalCustomerEmailFormHandler

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.approvals.order.UpdateOrderApprovalCustomerEmailFormHandler
All Implemented Interfaces:
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 UpdateOrderApprovalCustomerEmailFormHandler
extends atg.droplet.GenericFormHandler

Form Handler used to update the customer email address on an Order Approval object


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  java.lang.String mApprovalId
           
protected  java.lang.String mCustomerEmail
           
protected  atg.web.messaging.MessageTools mMessageTools
           
protected  OrderApprovalTools mOrderApprovalTools
           
protected  javax.transaction.TransactionManager mTransactionManager
           
 
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
UpdateOrderApprovalCustomerEmailFormHandler()
           
 
Method Summary
 java.lang.String getApprovalId()
          Returns the approval id.
 java.lang.String getCustomerEmail()
          Returns the customer email value
 atg.web.messaging.MessageTools getMessageTools()
          Returns the MessageTools component
 OrderApprovalTools getOrderApprovalTools()
          Returns the Order Approval Tools component.
 javax.transaction.TransactionManager getTransactionManager()
          Returns the transaction manager
protected  java.util.Locale getUserLocale()
          This method gets the current Locale
 boolean handleUpdateCustomerEmail(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Updates the confirmation email address associated with the order approval record
protected  boolean postUpdateCustomerEmail(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          If there are no errors, adds an 'update successful' message to the message bar
protected  boolean preUpdateCustomerEmail(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Executed before the customer's email is updated
 void setApprovalId(java.lang.String pApprovalId)
          Sets the approval id.
 void setCustomerEmail(java.lang.String pCustomerEmail)
          Sets the customer email value
 void setMessageTools(atg.web.messaging.MessageTools pMessageTools)
          Sets the Message Tools component.
 void setOrderApprovalTools(OrderApprovalTools pOrderApprovalTools)
          Sets the Order Approval Tools component.
 void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
          Sets the Transaction Manager
protected  boolean updateCustomerEmail(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Executes the customer email update for the approval
 
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


mApprovalId

protected java.lang.String mApprovalId

mCustomerEmail

protected java.lang.String mCustomerEmail

mTransactionManager

protected javax.transaction.TransactionManager mTransactionManager

mOrderApprovalTools

protected OrderApprovalTools mOrderApprovalTools

mMessageTools

protected atg.web.messaging.MessageTools mMessageTools
Constructor Detail

UpdateOrderApprovalCustomerEmailFormHandler

public UpdateOrderApprovalCustomerEmailFormHandler()
Method Detail

setApprovalId

public void setApprovalId(java.lang.String pApprovalId)
Sets the approval id. Used to find the approval repository item to update the email property

Parameters:
pApprovalId - the ApprovalId to set

getApprovalId

public java.lang.String getApprovalId()
Returns the approval id.

Returns:
the mApprovalId

setCustomerEmail

public void setCustomerEmail(java.lang.String pCustomerEmail)
Sets the customer email value

Parameters:
pCustomerEmail - the CustomerEmail to set

getCustomerEmail

public java.lang.String getCustomerEmail()
Returns the customer email value

Returns:
the mCustomerEmail

setTransactionManager

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

Parameters:
pTransactionManager -

getTransactionManager

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


setOrderApprovalTools

public void setOrderApprovalTools(OrderApprovalTools pOrderApprovalTools)
Sets the Order Approval Tools component.

Parameters:
pOrderApprovalTools - the OrderApprovalTools to set

getOrderApprovalTools

public OrderApprovalTools getOrderApprovalTools()
Returns the Order Approval Tools component.

Returns:
the OrderApprovalTools

getMessageTools

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

Returns:
MessageTools

setMessageTools

public void setMessageTools(atg.web.messaging.MessageTools pMessageTools)
Sets the Message Tools component.

Parameters:
pMessageTools - the MessageTools to set

getUserLocale

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

Returns:
the current Locale

preUpdateCustomerEmail

protected boolean preUpdateCustomerEmail(atg.servlet.DynamoHttpServletRequest pRequest,
                                         atg.servlet.DynamoHttpServletResponse pResponse)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException
Executed before the customer's email is updated

Parameters:
pRequest -
pResponse -
Returns:
false if a redirect occurred
Throws:
javax.servlet.ServletException
java.io.IOException

updateCustomerEmail

protected boolean updateCustomerEmail(atg.servlet.DynamoHttpServletRequest pRequest,
                                      atg.servlet.DynamoHttpServletResponse pResponse)
                               throws javax.servlet.ServletException,
                                      java.io.IOException,
                                      ApprovalsException
Executes the customer email update for the approval

Parameters:
pRequest -
pResponse -
Returns:
false if a redirect occurred
Throws:
javax.servlet.ServletException
java.io.IOException
ApprovalsException

postUpdateCustomerEmail

protected boolean postUpdateCustomerEmail(atg.servlet.DynamoHttpServletRequest pRequest,
                                          atg.servlet.DynamoHttpServletResponse pResponse)
                                   throws javax.servlet.ServletException,
                                          java.io.IOException
If there are no errors, adds an 'update successful' message to the message bar

Parameters:
pRequest -
pResponse -
Returns:
false if a redirect occurred
Throws:
javax.servlet.ServletException
java.io.IOException

handleUpdateCustomerEmail

public boolean handleUpdateCustomerEmail(atg.servlet.DynamoHttpServletRequest pRequest,
                                         atg.servlet.DynamoHttpServletResponse pResponse)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException
Updates the confirmation email address associated with the order approval record

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