|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.nucleus.TimedOperationService atg.nucleus.servlet.ServletService atg.nucleus.servlet.HttpServletService atg.servlet.DynamoServlet atg.projects.store.droplet.AddItemsToOrder
public class AddItemsToOrder
This droplet is placed on the page that follows login during checkout (currently the shipping page). It is required for the case when a user is recognized by auto-login, but when he/she gets to the login page during checkout, indicates that this is a case of mistaken identity, and wants to check out anonymously. We need to copy the contents of the recognized user's cart to a new cart. In this case, the login during checkout process will save the user's items in a globally-scoped map, and pass the "key" for this map as a query parameter. We also need to set the new user's email address here after the user has been logged out. All this is caused by the fact that we send the "DPSLogout=true" in the query string, which causes the servlet pipeline to log the user out. Finally, we remove the entries from the globally-scoped Map so that it doesn't just keep growing.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string. |
static java.lang.String |
NEW_EMAIL_ADDRESS
New email address parameter name. |
static atg.nucleus.naming.ParameterName |
ORDER
Input parameter name order. |
static atg.nucleus.naming.ParameterName |
PROFILE
Input parameter name profile. |
Fields inherited from class atg.servlet.DynamoServlet |
---|
mAllowCleanupRequest, mParameters |
Fields inherited from class atg.nucleus.servlet.ServletService |
---|
SERVLET_INFO_KEY |
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 | |
---|---|
AddItemsToOrder()
|
Method Summary | |
---|---|
void |
copyItemsToOrder(java.util.List pItemsToAdd,
atg.commerce.order.Order pOrder,
atg.repository.RepositoryItem pProfile,
atg.commerce.pricing.PricingModelHolder pUserPricingModels,
java.lang.String pCatalogKey,
java.util.Locale pLocale)
This method is used when a user enters the checkout process as a recognized user, but decides to proceed anonymously. |
protected java.lang.String |
getCatalogKey(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Get a string that will be used to identify the catalog to use when obtaining a catalogRef and productRef for the creation of a commerce item. |
atg.commerce.order.OrderManager |
getOrderManager()
|
atg.repository.RepositoryItem |
getProfile()
Return the Profile property. |
atg.commerce.order.purchase.PurchaseProcessHelper |
getPurchaseProcessHelper()
Returns property purchaseProcessHelper. |
StorePropertyManager |
getStorePropertyManager()
|
UserItems |
getUserItems()
|
java.util.Locale |
getUserLocale(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Returns the locale associated with the request. |
atg.commerce.pricing.PricingModelHolder |
getUserPricingModels()
Returns property UserPricingModels. |
void |
service(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Adds items to the user's cart after being logged out during the checkout process. |
void |
setOrderManager(atg.commerce.order.OrderManager pOrderManager)
Sets property OrderManager. |
void |
setProfile(atg.repository.RepositoryItem pProfile)
Set the Profile property. |
void |
setPurchaseProcessHelper(atg.commerce.order.purchase.PurchaseProcessHelper pPurchaseProcessHelper)
Sets property purchaseProcessHelper. |
void |
setStorePropertyManager(StorePropertyManager pStorePropertyManager)
|
void |
setUserItems(UserItems pUserItems)
|
void |
setUserPricingModels(atg.commerce.pricing.PricingModelHolder pUserPricingModels)
Sets property UserPricingModels. |
Methods inherited from class atg.servlet.DynamoServlet |
---|
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter |
Methods inherited from class atg.nucleus.servlet.ServletService |
---|
destroy, getServletConfig, getServletInfo, init, setServletInfo |
Methods inherited from class atg.nucleus.TimedOperationService |
---|
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics |
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, reResolveThis, 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 |
---|
public static java.lang.String CLASS_VERSION
public static final atg.nucleus.naming.ParameterName ORDER
public static final atg.nucleus.naming.ParameterName PROFILE
public static final java.lang.String NEW_EMAIL_ADDRESS
Constructor Detail |
---|
public AddItemsToOrder()
Method Detail |
---|
public void setPurchaseProcessHelper(atg.commerce.order.purchase.PurchaseProcessHelper pPurchaseProcessHelper)
pPurchaseProcessHelper
- a PurchaseProcessHelper
valuepublic atg.commerce.order.purchase.PurchaseProcessHelper getPurchaseProcessHelper()
PurchaseProcessHelper
valuepublic UserItems getUserItems()
public void setUserItems(UserItems pUserItems)
pUserItems
- - user items.public void setOrderManager(atg.commerce.order.OrderManager pOrderManager)
pOrderManager
- - order managerpublic atg.commerce.order.OrderManager getOrderManager()
public StorePropertyManager getStorePropertyManager()
public void setStorePropertyManager(StorePropertyManager pStorePropertyManager)
pStorePropertyManager
- - the mStorePropertyManager to set.public java.util.Locale getUserLocale(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
locale
. This value can be
either a java.util.Locale object or a String which represents the locale.
Next if the useRequestLocale
property is true, then the locale
of the request will be returned. Finally, if the locale cannot be determined,
the the defaultLocale
property is used.
pRequest
- a DynamoHttpServletRequest
valuepResponse
- a DynamoHttpServletResponse
value
Locale
value
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occursprotected java.lang.String getCatalogKey(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- servlet request objectpResponse
- servlet response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occursCatalogTools
public void setUserPricingModels(atg.commerce.pricing.PricingModelHolder pUserPricingModels)
pUserPricingModels
- a PricingModelHolder
valuepublic atg.commerce.pricing.PricingModelHolder getUserPricingModels()
PricingModelHolder
valuepublic void setProfile(atg.repository.RepositoryItem pProfile)
pProfile
- a RepositoryItem
valuepublic atg.repository.RepositoryItem getProfile()
RepositoryItem
valuepublic void service(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
Adds items to the user's cart after being logged out during the checkout process.
service
in class atg.servlet.DynamoServlet
pRequest
- a DynamoHttpServletRequest
valuepResponse
- a DynamoHttpServletResponse
value
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void copyItemsToOrder(java.util.List pItemsToAdd, atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile, atg.commerce.pricing.PricingModelHolder pUserPricingModels, java.lang.String pCatalogKey, java.util.Locale pLocale)
pItemsToAdd
- The list of AddCommerceItemInfo objects to addpOrder
- the customer orderpProfile
- - profilepUserPricingModels
- - user pricing modelspCatalogKey
- - catalog keypLocale
- - localeAddCommerceItemInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |