public class DisplaySkuProperties extends DynamoServlet
displayElement
parameter. This droplet can take the following
parameters.
The following output parameters can be set:
Alternatively, the list of properties to extract from a sku can be obtained by setting the propertyList parameter to a comma separated list. The list should be in the form of size,color etc. If this parameter is set, then there is no need to set the product property.
If an error is encountered while obtaining either a property from the sku object, or a necessary parameter is not supplied (sku object etc.) then the output parameter will be set to null and the output parameter will be renedered
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
static java.lang.String |
DISPLAY_ELEMENT |
static java.lang.String |
SPACE_CHARACTER |
static java.lang.String |
TOKENIZER_CHARACTER |
mAllowCleanupRequest, mParameters
SERVLET_INFO_KEY
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
DisplaySkuProperties() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDisplayableSkuAttributesProperty()
Return the name of the property in the product from which Sku properties for display
are obtained.
|
RepositoryItem |
getProduct(DynamoHttpServletRequest pRequest)
This method obtains the Product object from the DynamoHttpServletResponse
object.
|
RepositoryItem |
getSku(DynamoHttpServletRequest pRequest)
This method obtains the Sku object from the DynamoHttpServletRequest
object.
|
protected java.lang.String |
getSkuPropertyValues(RepositoryItem pSku,
java.util.List pProperties,
java.lang.String pDelimiter)
This method is actually responsible for obtaining the values and concatenating
the string together that will be rendered on output.
|
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is responsible for determining the concatenation of a group
of strings from a particular Sku object.
|
void |
setDisplayableSkuAttributesProperty(java.lang.String pDisplayableSkuAttributesProperty)
Set the property in the product that contains a list of properties to extract from the sku.
|
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 java.lang.String CLASS_VERSION
public static final java.lang.String DISPLAY_ELEMENT
public static final java.lang.String SPACE_CHARACTER
public static final java.lang.String TOKENIZER_CHARACTER
public void setDisplayableSkuAttributesProperty(java.lang.String pDisplayableSkuAttributesProperty)
pDisplayableSkuAttributesProperty
- the property namepublic java.lang.String getDisplayableSkuAttributesProperty()
public RepositoryItem getSku(DynamoHttpServletRequest pRequest)
pRequest
- a value of type 'DynamoHttpServletRequest'public RepositoryItem getProduct(DynamoHttpServletRequest pRequest)
pRequest
- a value of type 'DynamoHttpServletRequest'protected java.lang.String getSkuPropertyValues(RepositoryItem pSku, java.util.List pProperties, java.lang.String pDelimiter)
pProduct
- the product object which contains the properties to obtain from the skupDelimiter
- token to separate the values from the skupublic void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
The order that the properties are displayed in equates to the order of the properties that are obtained from the displayableSkuAttributes property in the product.
service
in class DynamoServlet
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'javax.servlet.ServletException
- if an error occursjava.io.IOException
- if an error occurs