public class ExchangeOrderAdjustmentCalculator
extends atg.commerce.pricing.OrderAdjustmentCalculator
It applies the manual adjustments that have been applied the promotion evaluation order to the exchange order. The value of each manual adjustment is pre-calculated based on the manual adjustment share calculated against the replacement items in the promotion evaluation order. This calculator extends adjustOrderSubtotalAmount to adjust the order subtotal by the pre-calculated adjustment value.
This calculator extends getManualAdjustments to return the manual adjustments applied to the
promotion evaluation order.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION |
protected ReturnManager |
mReturnManager |
AMOUNT_INCREASE_TYPE, AMOUNT_OFF_TYPE, FIXED_PRICE_TYPE, ILLEGAL_TYPE, mPromotionTools, PERCENT_OFF_TYPESERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
ExchangeOrderAdjustmentCalculator() |
| Modifier and Type | Method and Description |
|---|---|
protected double |
adjustOrderSubtotalAmount(RepositoryItem pOrderFixedAmountAdjustment,
OrderPriceInfo pPriceQuote,
Order pOrder,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Adjusts the order subtotal based on the manual adjustment value stored in the
ReturnRequest's
exchangeItemManualAdjustmentValue property. |
protected java.util.Collection |
getManualAdjustments(OrderPriceInfo pPriceQuote,
Order pOrder,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Overrides the base behavior to return the manual adjustments applied to the Promotion Evaluation Order in
the
ReturnRequest provided in the extra parameter map. |
ReturnManager |
getReturnManager() |
void |
priceOrder(OrderPriceInfo pPriceQuote,
Order pOrder,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
When pricing the replacement order for the
ReturnRequest in the extra parameter
map, it will calculate the appropriate value of each manual adjustment based on the
share applied to the replacement items in the promotion evaluation order. |
void |
setReturnManager(ReturnManager pReturnManager)
Sets the ReturnManager
|
applyAdjustmentToNonTaxablePriceInfo, applyAdjustmentToSubtotalPriceInfo, applyAdjustmentToTaxablePriceInfo, calculateManualAdjustment, calculateOrderFixedAmountAdjustment, getManualAdjustmentAdjuster, getTotalAdjustmentShareForShippingGroup, updateItemsManualAdjustmentShare, updateShippingGroupSubTotalMapsadjustOrderSubTotal, adjustShippingGroupSubtotalPriceInfos, computeGroupSubtotal, computeGroupSubtotal, computeGroupSubtotal, createCurrentShareMap, doStartService, findMatchingObject, getAmountToDiscount, getAmountToDiscount, getDetailsToReceiveDiscountShare, getItemsToReceiveDiscountShare, getNonDiscountableTotal, getNonTaxableShippingGroupTotal, getPricingTools, getTaxableShippingGroupTotal, getTotalForShippingGroups, getTotalShareValueForShippingGroup, isSaveDetailsOrderDiscountShare, isSaveItemsOrderDiscountShare, setPricingTools, setSaveDetailsOrderDiscountShare, setSaveItemsOrderDiscountShare, updateItemsDiscountShare, updateItemsDiscountShare, updateShippingItemsSubtotalMapsadjust, adjustAmount, adjustAmount, getAdjuster, getDiscountType, getDiscountType, getPricingModelProperties, getPromotionTools, getQualifierService, getQualifierService, isNegativeAmountException, setNegativeAmountException, setPricingModelProperties, setPromotionTools, setQualifierServiceaddLogListener, createAdminServlet, 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 final java.lang.String CLASS_VERSION
protected ReturnManager mReturnManager
public void setReturnManager(ReturnManager pReturnManager)
pReturnTools - the ReturnManagerspublic ReturnManager getReturnManager()
public void priceOrder(OrderPriceInfo pPriceQuote, Order pOrder, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws PricingException
ReturnRequest in the extra parameter
map, it will calculate the appropriate value of each manual adjustment based on the
share applied to the replacement items in the promotion evaluation order.
priceOrder in interface OrderPricingCalculatorpriceOrder in class atg.commerce.pricing.OrderAdjustmentCalculatorpPriceQuote - OrderPriceInfo representing the current price quote for the orderpOrder - The order to pricepPricingModel - A RepositoryItems representing a PricingModelpProfile - The user's profilepExtraParameters - A Map of extra parameters to be used in the pricing, may be nullPricingExceptionOrderDiscountCalculator.updateItemsDiscountShare(Order, double, double, double, String, long),
OrderDiscountCalculator.adjustShippingGroupSubtotalPriceInfos(String, OrderPriceInfo, Order, Locale, RepositoryItem, Map, Map, Map)protected java.util.Collection getManualAdjustments(OrderPriceInfo pPriceQuote, Order pOrder, RepositoryItem pProfile, java.util.Map pExtraParameters) throws PricingException
ReturnRequest provided in the extra parameter map.getManualAdjustments in class atg.commerce.pricing.OrderAdjustmentCalculatorPricingExceptionprotected double adjustOrderSubtotalAmount(RepositoryItem pOrderFixedAmountAdjustment, OrderPriceInfo pPriceQuote, Order pOrder, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws PricingException
exchangeItemManualAdjustmentValue property. The values
are precalculated based on the manual adjustment share applied to the replacement items
in the promotion evaluation order.adjustOrderSubtotalAmount in class atg.commerce.pricing.OrderAdjustmentCalculatorPricingException