public class NonReturnItemDetailsDroplet extends DynamoServlet
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
static java.lang.String |
COMMERCEITEM
The following are the parameters available in returnDetail oparam
|
static java.lang.String |
ITEM_COST_ADJUSTMENTS |
protected ReturnTools |
mReturnTools |
static ParameterName |
OUTPUT_EMPTY
oparam rendered if there are no non return items
|
static ParameterName |
OUTPUT_END
oparam rendered once after rendering all of the non return items
|
static ParameterName |
OUTPUT_START
oparam rendered once before rendering all of the non return items
|
static java.lang.String |
QUANTITY_ADJUSTED |
static ParameterName |
RETURN_DETAIL
oparam rendered once for each non return item
|
static ParameterName |
RETURN_REQUEST |
static java.lang.String |
SHIPPINGGROUP
The following are the parameters available in returnDetail oparam
|
static java.lang.String |
TOTAL_ADJUSTMENT |
static java.lang.String |
TOTAL_AMOUNT_ADJUSTMENT |
static java.lang.String |
TOTAL_MANUALADJUSTMENT_ADJUSTMENT |
static java.lang.String |
TOTAL_ORDERDISCOUNT_ADJUSTMENT |
static java.lang.String |
TOTAL_SHIPPING_ADJUSTMENT |
static java.lang.String |
TOTAL_TAX_ADJUSTMENT |
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 |
---|
NonReturnItemDetailsDroplet() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getInputParameter(DynamoHttpServletRequest pReq,
ParameterName pInputParamter)
Gets the input parameter values.
|
ReturnTools |
getReturnTools()
Returns the returnTools.
|
protected double |
getTotalLineItemAdjustments(java.util.Collection pItemCostAdjustments)
returns the total adjustments on amount, order discount share and manual adjustment share.
|
protected boolean |
isRenderLineItemAdjustments(java.util.Collection pItemCostAdjustments)
determines if the collection of adjustments are rendered as a non-return item.
|
protected void |
renderNonReturnItemParams(ReturnRequest pReturnRequest,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Loop over the non return item cost adjustments
|
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Determine if the current order contains a return request or
returnRequestId
contains a valid return request. |
protected void |
setOutputParamsForNonReturnItem(CommerceItem pCommerceItem,
ShippingGroup pShippingGroup,
java.util.Collection pItemCostAdjustments,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Sets all the output parameters for the given "non-return item"
|
void |
setReturnTools(ReturnTools pReturnTools)
Sets the returnTools.
|
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 RETURN_REQUEST
public static final ParameterName RETURN_DETAIL
public static final ParameterName OUTPUT_START
public static final ParameterName OUTPUT_END
public static final ParameterName OUTPUT_EMPTY
public static final java.lang.String COMMERCEITEM
public static final java.lang.String SHIPPINGGROUP
public static final java.lang.String QUANTITY_ADJUSTED
public static final java.lang.String ITEM_COST_ADJUSTMENTS
public static final java.lang.String TOTAL_ADJUSTMENT
public static final java.lang.String TOTAL_AMOUNT_ADJUSTMENT
public static final java.lang.String TOTAL_ORDERDISCOUNT_ADJUSTMENT
public static final java.lang.String TOTAL_MANUALADJUSTMENT_ADJUSTMENT
public static final java.lang.String TOTAL_TAX_ADJUSTMENT
public static final java.lang.String TOTAL_SHIPPING_ADJUSTMENT
protected ReturnTools mReturnTools
public ReturnTools getReturnTools()
public void setReturnTools(ReturnTools pReturnTools)
pReturnTools
- public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
returnRequestId
contains a valid return request. If there is a return request, this method sets the true output parameter
otherwise serves the false parameter.service
in class DynamoServlet
pRequest
- the HTTP requestpResponse
- the HTTP 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.public java.lang.Object getInputParameter(DynamoHttpServletRequest pReq, ParameterName pInputParamter)
DynamoHttpServletRequest
- String
- protected void renderNonReturnItemParams(ReturnRequest pReturnRequest, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
pReturnRequest
- pRequest
- pResponse
- java.io.IOException
javax.servlet.ServletException
protected void setOutputParamsForNonReturnItem(CommerceItem pCommerceItem, ShippingGroup pShippingGroup, java.util.Collection pItemCostAdjustments, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
pCommerceItem
- the commerce itempShippingGroup
- the shipping group to which the item has a relationshippItemCostAdjustments
- the collection of adjustments that reference the given item/shipping group relationshippRequest
- pResponse
- protected double getTotalLineItemAdjustments(java.util.Collection pItemCostAdjustments)
If the item doesn't have these types of adjustments then it is not itemized in the non-return item details.
pItemCostAdjustments
- protected boolean isRenderLineItemAdjustments(java.util.Collection pItemCostAdjustments)
returns true if the total line item adjustments don't total 0.
pItemCostAdjustments
-