public class GiftWithPurchaseSelectionChoicesDroplet extends DynamoServlet
| Modifier and Type | Field and Description |
|---|---|
protected static ParameterName |
ALWAYS_RETURN_SKUS |
protected static java.lang.String |
CHOICES |
static java.lang.String |
CLASS_VERSION |
protected static ParameterName |
EMPTY |
protected static ParameterName |
ERROR |
protected static java.lang.String |
ERROR_MESSAGE |
protected static ParameterName |
GIFT_DETAIL |
protected static ParameterName |
GIFT_TYPE |
protected GWPManager |
mGwpManager
Manager component for gift with purchase promotions
|
protected static ParameterName |
OUTPUT |
protected static ParameterName |
PROMOTION_ID |
protected static ParameterName |
SELECTION |
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 |
|---|
GiftWithPurchaseSelectionChoicesDroplet() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getGiftDetail(DynamoHttpServletRequest pRequest,
GiftWithPurchaseSelection pSelection)
Gets the gift detail to use either from the GiftWithPurchaseSelection bean or as a separate request parameter.
|
protected java.lang.String |
getGiftType(DynamoHttpServletRequest pRequest,
GiftWithPurchaseSelection pSelection)
Gets the gift type to use either from the GiftWithPurchaseSelection bean or as a separate request parameter.
|
GWPManager |
getGwpManager()
Getter for the gift with purchase manager property.
|
protected GiftWithPurchaseSelection |
getSelection(DynamoHttpServletRequest pRequest)
Gets the GiftWithPurchaseSelection bean from the request if available
|
protected java.util.Collection<GiftWithPurchaseSelectionChoice> |
getSelectionChoices(java.lang.String pGiftType,
java.lang.String pGiftDetail,
boolean pReturnSkus)
Gets the GiftWithPurchaseSelectionChoice beans for a gift selection
|
protected java.util.Collection<GiftWithPurchaseSelectionChoice> |
getSelectionChoices(java.lang.String pPromotionId,
java.lang.String pGiftType,
java.lang.String pGiftDetail,
boolean pReturnSkus)
Gets the GiftWithPurchaseSelectionChoice beans for a gift selection
|
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Outputs the gift selection choices for a given free gift.
|
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.
|
protected boolean |
shouldAlwaysReturnSkus(DynamoHttpServletRequest pRequest)
Gets the alwaysReturnSkus boolean from the request if available
|
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
protected static final ParameterName SELECTION
protected static final ParameterName GIFT_TYPE
protected static final ParameterName GIFT_DETAIL
protected static final ParameterName PROMOTION_ID
protected static final ParameterName ALWAYS_RETURN_SKUS
protected static final java.lang.String CHOICES
protected static final java.lang.String ERROR_MESSAGE
protected static final ParameterName OUTPUT
protected static final ParameterName ERROR
protected static final ParameterName EMPTY
protected GWPManager mGwpManager
public GiftWithPurchaseSelectionChoicesDroplet()
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<GiftWithPurchaseSelectionChoice> getSelectionChoices(java.lang.String pGiftType, java.lang.String pGiftDetail, boolean pReturnSkus) throws CommerceException
pGiftType - String gift typepGiftDetail - String gift detailpReturnSkus - boolean, true to return the skus for all choicesMarkerExceptionCommerceExceptionprotected java.util.Collection<GiftWithPurchaseSelectionChoice> getSelectionChoices(java.lang.String pPromotionId, java.lang.String pGiftType, java.lang.String pGiftDetail, boolean pReturnSkus) throws CommerceException
pPromotionId - String id of the GWP promotion, can be null if filtering of choices not promotion specificpGiftType - String gift typepGiftDetail - String gift detailpReturnSkus - boolean, true to return the skus for all choicesMarkerExceptionCommerceExceptionprotected GiftWithPurchaseSelection getSelection(DynamoHttpServletRequest pRequest)
pRequest - DynamoHttpServletRequestprotected java.lang.String getGiftType(DynamoHttpServletRequest pRequest, GiftWithPurchaseSelection pSelection)
pRequest - DynamoHttpServletRequestpSelection - GiftWithPurchaseSelection beanprotected java.lang.String getGiftDetail(DynamoHttpServletRequest pRequest, GiftWithPurchaseSelection pSelection)
pRequest - DynamoHttpServletRequestpSelection - GiftWithPurchaseSelection beanprotected boolean shouldAlwaysReturnSkus(DynamoHttpServletRequest pRequest)
pRequest - DynamoHttpServletRequest