public class PriceShippingMethodDroplet
extends atg.servlet.DynamoServlet
This DynamoServlet Bean is used to determine shipping costs for the shipping
group with specified shipping method. The class's service method calls into
the ShippingPricingEngine priceShippingGroup
method to get the
ShippingPriceInfo for the specified shipping group and the shipping method.
The determined shipping cost is put into the output parameter.
The following parameters are required:
The following output parameter is defined when the service method is invoked:
This is an example of using this droplet to provide a price for the shipping with the specified shipping method.
<dsp:droplet name="/atg/store/pricing/PriceShippingMethod""> <dsp:param name="shippingGroup" param="shippingGroup"/"> <dsp:param name="shippingMethod" param="shippingMethod"/"> <dsp:oparam name="output""> <dsp:getvalueof var="shippingPrice" param="shippingPrice" /"> <fmt:formatNumber value="${shippingPrice}" type="currency" /"> </dsp:oparam"> </dsp:droplet">
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
Constructor and Description |
---|
PriceShippingMethodDroplet() |
Modifier and Type | Method and Description |
---|---|
java.util.Locale |
getDefaultLocale() |
atg.commerce.order.Order |
getOrder() |
atg.commerce.pricing.PricingTools |
getPricingTools() |
atg.userprofiling.Profile |
getProfile() |
protected atg.commerce.order.ShippingGroup |
getShippingGroup(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Get the shipping group from that we should price with the specified shipping method.
|
protected java.util.Locale |
getUserLocale(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Returns the locale associated with the request.
|
atg.commerce.pricing.PricingModelHolder |
getUserPricingModels() |
void |
service(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Performs the pricing of specified shipping method.
|
void |
setDefaultLocale(java.util.Locale pDefaultLocale) |
void |
setOrder(atg.commerce.order.Order pOrder)
Set the Order property.
|
void |
setPricingTools(atg.commerce.pricing.PricingTools pPricingTools) |
void |
setProfile(atg.userprofiling.Profile pProfile) |
void |
setUserPricingModels(atg.commerce.pricing.PricingModelHolder pUserPricingModels) |
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameter
destroy, getServletConfig, getServletInfo, setServletInfo
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
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, toString
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
public atg.commerce.pricing.PricingTools getPricingTools()
public void setPricingTools(atg.commerce.pricing.PricingTools pPricingTools)
pPricingTools
- sets new pricing tools component.public void setDefaultLocale(java.util.Locale pDefaultLocale)
pDefaultLocale
- - the default locale for which shipping method should be priced.public java.util.Locale getDefaultLocale()
public void setOrder(atg.commerce.order.Order pOrder)
pOrder
- - an Order
value.public atg.commerce.order.Order getOrder()
Order
value.public void setProfile(atg.userprofiling.Profile pProfile)
pProfile
- - a Profile
value.public atg.userprofiling.Profile getProfile()
Profile
value.public void setUserPricingModels(atg.commerce.pricing.PricingModelHolder pUserPricingModels)
pUserPricingModels
- - a PricingModelHolder
value.public atg.commerce.pricing.PricingModelHolder getUserPricingModels()
PricingModelHolder
value.public void service(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
service
in class atg.servlet.DynamoServlet
pRequest
- - the request to be processed.pResponse
- - the response object for this request.javax.servlet.ServletException
- an application specific error occurred processing this request.java.io.IOException
- an error occurred reading data from the request or writing data to the response.protected atg.commerce.order.ShippingGroup getShippingGroup(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- - the request to be processed.pResponse
- - the response object for this request.javax.servlet.ServletException
- an application specific error occurred processing this requestjava.io.IOException
- an error occurred reading data from the request or writing data to the response.protected java.util.Locale getUserLocale(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
defaultLocale
property is used.pRequest
- - the request to be processed.pResponse
- - the response object for this request.javax.servlet.ServletException
- an application specific error occurred processing this request.java.io.IOException
- an error occurred reading data from the request or writing data to the response.