public class GiftWithPurchaseSelectionsDroplet extends DynamoServlet
true then only selections
where quantityAvaiableForSelection is > 0 will be output. Defaults to false.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION |
static ParameterName |
EMPTY |
static ParameterName |
ERROR |
static java.lang.String |
ERROR_MESSAGE |
static ParameterName |
ITEM |
protected GWPManager |
mGwpManager
Manager component for gift with purchase promotions
|
static ParameterName |
ONLY_AVAILABLE |
static ParameterName |
ORDER |
static ParameterName |
OUTPUT |
static java.lang.String |
SELECTIONS |
mAllowCleanupRequest, mParametersSERVLET_INFO_KEYSERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
GiftWithPurchaseSelectionsDroplet() |
| Modifier and Type | Method and Description |
|---|---|
GWPManager |
getGwpManager()
Getter for the gift with purchase manager property.
|
protected CommerceItem |
getItem(DynamoHttpServletRequest pRequest)
Gets the commerce item from the request if available
|
protected Order |
getOrder(DynamoHttpServletRequest pRequest)
Gets the Order from the request if available
|
protected java.util.Collection<GiftWithPurchaseSelection> |
getSelections(Order pOrder,
boolean pOnlyOutputAvailableSelections)
Gets the GiftWithPurchaseSelection beans for an order.
|
protected java.util.Collection<GiftWithPurchaseSelection> |
getSelections(Order pOrder,
CommerceItem pItem)
Gets the GiftWithPurchaseSelection beans for a commerce item
|
protected boolean |
isOnlyOutputAvailableSelections(DynamoHttpServletRequest pRequest)
Gets the onlyOutputAvailableSelections input parameter if available.
|
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Outputs the gift selections for a given order or item.
|
protected void |
serviceError(java.lang.String pErrorMsg,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Handles an error by servicing the error parameter.
|
void |
setGwpManager(GWPManager pGwpManager)
Setter for the gift with purchase manager property.
|
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameterdestroy, getServletConfig, getServletInfo, setServletInfogetAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatisticsaddLogListener, 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, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static java.lang.String CLASS_VERSION
public static final ParameterName ORDER
public static final ParameterName ITEM
public static final ParameterName ONLY_AVAILABLE
public static final java.lang.String SELECTIONS
public static final java.lang.String ERROR_MESSAGE
public static final ParameterName OUTPUT
public static final ParameterName ERROR
public static final ParameterName EMPTY
protected GWPManager mGwpManager
public void setGwpManager(GWPManager pGwpManager)
pGwpManager - GWPManagerpublic GWPManager getGwpManager()
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
service in class DynamoServletpRequest - the current requestpResponse - the current responsejavax.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 void serviceError(java.lang.String pErrorMsg,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
pErrorMsg - String error messagepRequest - DynamoHttpServletRequestpResponse - DynamoHttpServletResponsejavax.servlet.ServletExceptionjava.io.IOExceptionprotected java.util.Collection<GiftWithPurchaseSelection> getSelections(Order pOrder, boolean pOnlyOutputAvailableSelections) throws CommerceException
true then only selections where
quantityAvaiableForSelection is > 0 will be returned.pOrder - Order to inspectpOnlyOutputAvailableSelections - boolean true to only return available selectionsCommerceExceptionprotected java.util.Collection<GiftWithPurchaseSelection> getSelections(Order pOrder, CommerceItem pItem) throws CommerceException
pOrder - Order to inspectpItem - CommerceItem to inspectCommerceExceptionprotected Order getOrder(DynamoHttpServletRequest pRequest)
pRequest - DynamoHttpServletRequestprotected CommerceItem getItem(DynamoHttpServletRequest pRequest)
pRequest - DynamoHttpServletRequestprotected boolean isOnlyOutputAvailableSelections(DynamoHttpServletRequest pRequest)
pRequest - DynamoHttpServletRequest