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, 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 |
---|
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, 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
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 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 DynamoServlet
pRequest
- 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.ServletException
java.io.IOException
protected 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 selectionsCommerceException
protected java.util.Collection<GiftWithPurchaseSelection> getSelections(Order pOrder, CommerceItem pItem) throws CommerceException
pOrder
- Order to inspectpItem
- CommerceItem to inspectCommerceException
protected Order getOrder(DynamoHttpServletRequest pRequest)
pRequest
- DynamoHttpServletRequestprotected CommerceItem getItem(DynamoHttpServletRequest pRequest)
pRequest
- DynamoHttpServletRequestprotected boolean isOnlyOutputAvailableSelections(DynamoHttpServletRequest pRequest)
pRequest
- DynamoHttpServletRequest