|
||||||||||
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.SkuAvailabilityLookup
public class SkuAvailabilityLookup
This droplet looks at a single sku and the product referencing it and determines if it is available, preorderable, backorderable or unavailable.
The inventoryManager
property must be configured for this droplet.
This droplet takes the following input parameters:
This droplet renders the following open parameters:
This droplet sets the following output parameters when rendering the available and backorderable open parameters.
Example:
<dsp:droplet name="/atg/store/droplet/SkuAvailabilityLookup"> <dsp:param name="product" param="product"/> <dsp:param name="skuId" param="product.childSKUs[0].repositoryId"/> <dsp:oparam name="available"> Is available </dsp:oparam> <dsp:oparam name="preorderable"> Can be preordered <dsp:droplet name="/atg/dynamo/droplet/IsEmpty"> <dsp:param name="value" param="availabilityDate"/> <dsp:oparam name="false"> <br> Will be available <dsp:valueof param="availabilityDate" converter="date" format="M/d/yy"/> </dsp:oparam> </dsp:droplet> </dsp:oparam> <dsp:oparam name="backorderable"> Can be backordered </dsp:oparam> <dsp:oparam name="unavailable"> Is unavailable </dsp:oparam> </dsp:droplet>
Field Summary | |
---|---|
static java.lang.String |
AVAILABILITY_DATE
The output parameter name for the availabilityDate to set. |
static java.lang.String |
CLASS_VERSION
Class version string. |
protected StoreInventoryManager |
mInventoryManager
Inventory manager. |
static java.lang.String |
OPARAM_OUTPUT_AVAILABLE
The oparam name rendered once if the item is not preorderable and is in stock. |
static java.lang.String |
OPARAM_OUTPUT_BACKORDERABLE
The oparam name rendered once if the item is not preorderable, is not in stock and is backorderable. |
static java.lang.String |
OPARAM_OUTPUT_DEFAULT
The oparam name rendered once if none of the above open parameters exists. |
static java.lang.String |
OPARAM_OUTPUT_ERROR
The oparam name rendered once if the provided skuId can not be looked up in the inventory repository. |
static java.lang.String |
OPARAM_OUTPUT_PREORDERABLE
The oparam name rendered once if the item is a preorderable item. |
static java.lang.String |
OPARAM_OUTPUT_UNAVAILABLE
The oparam name rendered once if the item is none of the above. |
static atg.nucleus.naming.ParameterName |
PRODUCT
The input parameter name for the product and skuId to check. |
static atg.nucleus.naming.ParameterName |
SKU_ID
Sku id parameter name. |
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 | |
---|---|
SkuAvailabilityLookup()
|
Method Summary | |
---|---|
StoreInventoryManager |
getInventoryManager()
|
void |
service(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Determines if the item is preorderable. |
void |
setInventoryManager(StoreInventoryManager pInventoryManager)
|
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 final java.lang.String CLASS_VERSION
public static final atg.nucleus.naming.ParameterName PRODUCT
public static final atg.nucleus.naming.ParameterName SKU_ID
public static final java.lang.String AVAILABILITY_DATE
public static final java.lang.String OPARAM_OUTPUT_PREORDERABLE
public static final java.lang.String OPARAM_OUTPUT_AVAILABLE
public static final java.lang.String OPARAM_OUTPUT_BACKORDERABLE
public static final java.lang.String OPARAM_OUTPUT_UNAVAILABLE
public static final java.lang.String OPARAM_OUTPUT_ERROR
public static final java.lang.String OPARAM_OUTPUT_DEFAULT
protected StoreInventoryManager mInventoryManager
Constructor Detail |
---|
public SkuAvailabilityLookup()
Method Detail |
---|
public StoreInventoryManager getInventoryManager()
public void setInventoryManager(StoreInventoryManager pInventoryManager)
pInventoryManager
- - the inventoryManager to set.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
- - http requestpResponse
- - http response
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |