atg.projects.store.fulfillment
Class SettleElectronicGoodsFormHandler

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.projects.store.fulfillment.SettleElectronicGoodsFormHandler
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 SettleElectronicGoodsFormHandler
extends atg.droplet.GenericFormHandler

This form handler is used to send a SettleElectronicGoods message to the fulfillment system. When the handleSettleElectronicGoods method is called, it builds a SettleElectronicGoods message with the order ID in the orderId property and sends it over the configured portName.

See Also:
SettleElectronicGoods

Field Summary
static java.lang.String CLASS_VERSION
          Class version string.
protected  java.lang.String mErrorMessage
          Error message.
protected  atg.commerce.messaging.MessageSender mMessageSender
          Message sender.
protected  java.lang.String mOrderId
          Order id.
protected  atg.commerce.order.OrderManager mOrderManager
          Order manager.
 
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
SettleElectronicGoodsFormHandler()
           
 
Method Summary
 java.lang.String getErrorMessage()
          If there is an error, it will be reported here.
 atg.commerce.messaging.MessageSender getMessageSender()
          Returns the component that has been configured through patchbay to send messages.
 java.lang.String getOrderId()
          The id of the order containing the updated shipping groups.
 atg.commerce.order.OrderManager getOrderManager()
          OrderManager is used to verify the orders existence before sending the message.
 boolean handleSettleElectronicGoods(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Create a SettleElectronicGoods message.
 void setErrorMessage(java.lang.String pErrorMessage)
          Set message that will be reported if error occurs.
 void setMessageSender(atg.commerce.messaging.MessageSender pMessageSender)
          Sets the component that has been configured through patchbay to send messages.
 void setOrderId(java.lang.String pOrderId)
          Sets id of the order containing the updated shipping groups.
 void setOrderManager(atg.commerce.order.OrderManager pOrderManager)
           
 
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, 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.


mOrderManager

protected atg.commerce.order.OrderManager mOrderManager
Order manager.


mOrderId

protected java.lang.String mOrderId
Order id.


mMessageSender

protected atg.commerce.messaging.MessageSender mMessageSender
Message sender.


mErrorMessage

protected java.lang.String mErrorMessage
Error message.

Constructor Detail

SettleElectronicGoodsFormHandler

public SettleElectronicGoodsFormHandler()
Method Detail

setOrderManager

public void setOrderManager(atg.commerce.order.OrderManager pOrderManager)
Parameters:
pOrderManager - - order manager to set.

getOrderManager

public atg.commerce.order.OrderManager getOrderManager()
OrderManager is used to verify the orders existence before sending the message. If null, the message will be sent with not verification.

Returns:
order manager that is used

setOrderId

public void setOrderId(java.lang.String pOrderId)
Sets id of the order containing the updated shipping groups.

Parameters:
pOrderId - - order id

getOrderId

public java.lang.String getOrderId()
The id of the order containing the updated shipping groups.

Returns:
order id

setMessageSender

public void setMessageSender(atg.commerce.messaging.MessageSender pMessageSender)
Sets the component that has been configured through patchbay to send messages.

Parameters:
pMessageSender - - component that send messages

getMessageSender

public atg.commerce.messaging.MessageSender getMessageSender()
Returns the component that has been configured through patchbay to send messages.

Returns:
message sender component

setErrorMessage

public void setErrorMessage(java.lang.String pErrorMessage)
Set message that will be reported if error occurs.

Parameters:
pErrorMessage - - error message text

getErrorMessage

public java.lang.String getErrorMessage()
If there is an error, it will be reported here.

Returns:
message for error

handleSettleElectronicGoods

public boolean handleSettleElectronicGoods(atg.servlet.DynamoHttpServletRequest pRequest,
                                           atg.servlet.DynamoHttpServletResponse pResponse)
                                    throws javax.servlet.ServletException,
                                           java.io.IOException
Create a SettleElectronicGoods message. Use messageSender to send it to the rest of DCS.

Parameters:
pRequest - - Dynamo servlet request
pResponse - - Dynamo servlet response
Returns:
true if success, false - otherwise
Throws:
java.io.IOException - - This exception indicates that a severe error occurs while performing i/o operations
javax.servlet.ServletException - - This exception indicates that a servlet error occurs.