|
|||||||||
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.commerce.pricing.AvailableShippingMethodsDroplet
public class AvailableShippingMethodsDroplet
This Dynamo Servlet Bean is used to display avalable shipping methods for
a particular shipping group. The class's service method calls into the
ShippingPricingEngine getAvailableMethods
method to return
the list of shipping method codes. These codes correspond to the
shippingMethod
property of the order HardgoodShippingGroup
class.
The only required input parameter is:
The following parameters are optional:
userPricingModelsPath
property.
profilePath
property.
The following output parameters are defined when the service method is invoked:
shippingMethod
value in a HardgoodShippingGroup
This is an example of using this droplet to provide a select box of
available shipping methods which are bound to the
shippingMethod
property of the first shipping group.
<droplet bean="/atg/commerce/pricing/AvailableShippingMethods"> <param name="shippingGroup" value="bean:ShoppingCartModifier.shippingGroup"> <oparam name="output"> <select bean="ShoppingCartModifier.shippingGroup.shippingMethod"> <droplet bean="ForEach"> <param name="array" value="param:availableShippingMethods"> <param name="elementName" value="method"> <oparam name="output"> <option value="param:method"><valueof param="method"></valueof> </oparam> </droplet> </select> </oparam> </droplet>
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected ComponentName |
mProfilePath
the path to the user's profile in the nucleus namespace |
protected ComponentName |
mUserPricingModelsPath
the path to the PricingModelHolder in Nucleus which holds the user's pricing models |
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 | |
---|---|
AvailableShippingMethodsDroplet()
Constructs an instanceof AvailableShippingMethodsDroplet |
Method Summary | |
---|---|
java.util.Locale |
getDefaultLocale()
the default locale for which available shipping methods should be retrieved |
protected java.util.Collection |
getPricingModels(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Get the collection of pricing models to use for determing what shipping methods are availble. |
protected RepositoryItem |
getProfile(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
get the profile of the user requesting the shipping information |
java.lang.String |
getProfilePath()
the path to the user's profile in the nucleus namespace |
protected ShippingGroup |
getShippingGroup(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Get the shipping group from which we should determine the available shipping methods |
ShippingPricingEngine |
getShippingPricingEngine()
the shipping pricing engine to consult for available shipping methods |
boolean |
getUseRequestLocale()
flag to determine whether to ask for available shipping methods using the locale in the Request object before falling back on the default locale |
protected java.util.Locale |
getUserLocale(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Returns the locale associated with the request. |
java.lang.String |
getUserPricingModelsPath()
the path to the PricingModelHolder in Nucleus which holds the user's pricing models |
boolean |
isUseRequestLocale()
Test property UseRequestLocale |
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Performs the getting of available shipping methods within a Request scope. |
void |
setDefaultLocale(java.util.Locale pDefaultLocale)
the default locale for which available shipping methods should be retrieved |
void |
setProfilePath(java.lang.String pProfilePath)
the path to the user's profile in the nucleus namespace |
void |
setShippingPricingEngine(ShippingPricingEngine pShippingPricingEngine)
the shipping pricing engine to consult for available shipping methods |
void |
setUseRequestLocale(boolean pUseRequestLocale)
flag to determine whether to ask for available shipping methods using the locale in the Request object before falling back on the default locale |
void |
setUserPricingModelsPath(java.lang.String pUserPricingModelsPath)
the path to the PricingModelHolder in Nucleus which holds the user's pricing models |
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.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 |
---|
public static java.lang.String CLASS_VERSION
protected ComponentName mProfilePath
protected ComponentName mUserPricingModelsPath
Constructor Detail |
---|
public AvailableShippingMethodsDroplet()
Method Detail |
---|
public void setShippingPricingEngine(ShippingPricingEngine pShippingPricingEngine)
pShippingPricingEngine
- new value to setpublic ShippingPricingEngine getShippingPricingEngine()
public void setProfilePath(java.lang.String pProfilePath)
pProfilePath
- new value to setpublic java.lang.String getProfilePath()
public void setUserPricingModelsPath(java.lang.String pUserPricingModelsPath)
pUserPricingModelsPath
- new value to setpublic java.lang.String getUserPricingModelsPath()
public void setDefaultLocale(java.util.Locale pDefaultLocale)
pDefaultLocale
- new value to setpublic java.util.Locale getDefaultLocale()
public void setUseRequestLocale(boolean pUseRequestLocale)
pUseRequestLocale
- new value to setpublic boolean getUseRequestLocale()
public boolean isUseRequestLocale()
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
service
in class DynamoServlet
pRequest
- the request to be processedpResponse
- 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 ShippingGroup getShippingGroup(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request to be processedpResponse
- 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 RepositoryItem getProfile(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request to be processedpResponse
- 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 java.util.Collection getPricingModels(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request to be processedpResponse
- 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 java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest, 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
- the request to be processedpResponse
- 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |