|
|||||||||
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.ItemPricingDroplet
public abstract class ItemPricingDroplet
An abstract class which is used as the foundation for pricing items and displaying
the results to the user. People who extend this class must override the
performPricing
method to return the CommerceItem(s) that have been priced.
These items are then bound into the output oparam with the default name element.
One can change this parameter name by setting the elementName parameter.
This droplet can handle the following optional input parameters:
userPricingModelsPath
property.
profilePath
.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected ComponentName |
mProfilePath
|
protected ComponentName |
mUserPricingModelsPath
|
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 | |
---|---|
ItemPricingDroplet()
Constructs an instanceof ItemPricingDroplet |
Method Summary | |
---|---|
protected CommerceItem |
createCommerceItem(java.lang.String pCatalogRefId,
java.lang.Object pCatalogRef,
java.lang.String pProductId,
java.lang.Object pProductRef,
long pQuantity)
With the given parameters create a new CommerceItem that will be used for pricing |
protected java.lang.String |
getCatalogRefId(java.lang.Object pCatalogRef)
Return the id of the supplied catalogRef (aka sku) object |
java.util.Locale |
getDefaultLocale()
Returns property DefaultLocale. |
OrderTools |
getOrderTools()
Returns property OrderTools |
protected java.util.Collection |
getPricingModels(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Return the collection of pricing models to use for pricing. |
PricingTools |
getPricingTools()
Returns property PricingTools |
protected java.lang.Object |
getProduct(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Return the product which encompasses the items to be priced. |
protected java.lang.String |
getProductId(java.lang.Object pProduct)
Return the product id of the supplied product object |
protected RepositoryItem |
getProfile(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Return the profile of the user requesting the price information |
java.lang.String |
getProfilePath()
Returns property ProfilePath |
protected java.util.Locale |
getUserLocale(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Returns the locale associated with the request. |
java.lang.String |
getUserPricingModelsPath()
Returns property UserPricingModelsPath |
boolean |
isUseRequestLocale()
Returns property UseRequestLocale |
protected abstract java.lang.Object |
performPricing(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Return the object (CommerceItem or List of CommerceItems) that has been priced |
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Fetch the objects returned from performPricing and bind them to the
set element name and render the output oparam. |
void |
setDefaultLocale(java.util.Locale pDefaultLocale)
Sets property DefaultLocale |
void |
setOrderTools(OrderTools pOrderTools)
Sets property OrderTools |
void |
setPricingTools(PricingTools pPricingTools)
Sets property PricingTools |
void |
setProfilePath(java.lang.String pProfilePath)
Sets property ProfilePath |
void |
setUseRequestLocale(boolean pUseRequestLocale)
Sets property UseRequestLocale |
void |
setUserPricingModelsPath(java.lang.String pUserPricingModelsPath)
Sets property UserPricingModelsPath |
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 ItemPricingDroplet()
Method Detail |
---|
public void setPricingTools(PricingTools pPricingTools)
public PricingTools getPricingTools()
public void setOrderTools(OrderTools pOrderTools)
public OrderTools getOrderTools()
public void setDefaultLocale(java.util.Locale pDefaultLocale)
public java.util.Locale getDefaultLocale()
public void setUseRequestLocale(boolean pUseRequestLocale)
public boolean isUseRequestLocale()
public void setProfilePath(java.lang.String pProfilePath)
public java.lang.String getProfilePath()
public void setUserPricingModelsPath(java.lang.String pUserPricingModelsPath)
public java.lang.String getUserPricingModelsPath()
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
performPricing
and bind them to the
set element name and render the output oparam.
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 abstract java.lang.Object performPricing(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected java.util.Collection getPricingModels(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected RepositoryItem getProfile(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected java.lang.Object getProduct(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected java.lang.String getProductId(java.lang.Object pProduct)
protected java.lang.String getCatalogRefId(java.lang.Object pCatalogRef)
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.
javax.servlet.ServletException
java.io.IOException
protected CommerceItem createCommerceItem(java.lang.String pCatalogRefId, java.lang.Object pCatalogRef, java.lang.String pProductId, java.lang.Object pProductRef, long pQuantity) throws CommerceException
CommerceException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |