atg.commerce.csr.pricing.calculators
Class ExchangeOrderAdjustmentCalculator
java.lang.Object
atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.commerce.pricing.DiscountCalculatorService
atg.commerce.pricing.OrderDiscountCalculator
atg.commerce.pricing.OrderAdjustmentCalculator
atg.commerce.csr.pricing.calculators.ExchangeOrderAdjustmentCalculator
- All Implemented Interfaces:
- OrderPricingCalculator, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener
public class ExchangeOrderAdjustmentCalculator
- extends atg.commerce.pricing.OrderAdjustmentCalculator
This calculator is used when pricing the exchange replacement order to apply manual adjustments
to the exchange order.
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.
- See Also:
getManualAdjustments(OrderPriceInfo, Order, RepositoryItem, Map)
,
adjustOrderSubtotalAmount(RepositoryItem, OrderPriceInfo, Order, Locale, RepositoryItem, Map)
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
DEFAULT_LOG_TRACE_STATUS |
Method Summary |
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 |
Methods inherited from class atg.commerce.pricing.OrderAdjustmentCalculator |
applyAdjustmentToNonTaxablePriceInfo, applyAdjustmentToSubtotalPriceInfo, applyAdjustmentToTaxablePriceInfo, calculateManualAdjustment, calculateOrderFixedAmountAdjustment, getManualAdjustmentAdjuster, getTotalAdjustmentShareForShippingGroup, updateItemsManualAdjustmentShare, updateShippingGroupSubTotalMaps |
Methods inherited from class atg.commerce.pricing.OrderDiscountCalculator |
adjustOrderSubTotal, adjustShippingGroupSubtotalPriceInfos, computeGroupSubtotal, computeGroupSubtotal, computeGroupSubtotal, createCurrentShareMap, doStartService, findMatchingObject, getAmountToDiscount, getAmountToDiscount, getDetailsToReceiveDiscountShare, getItemsToReceiveDiscountShare, getNonDiscountableTotal, getNonTaxableShippingGroupTotal, getPricingTools, getTaxableShippingGroupTotal, getTotalForShippingGroups, getTotalShareValueForShippingGroup, isSaveDetailsOrderDiscountShare, isSaveItemsOrderDiscountShare, setPricingTools, setSaveDetailsOrderDiscountShare, setSaveItemsOrderDiscountShare, updateItemsDiscountShare, updateItemsDiscountShare, updateShippingItemsSubtotalMaps |
Methods inherited from class atg.commerce.pricing.DiscountCalculatorService |
adjust, adjustAmount, getAdjuster, getDiscountType, getDiscountType, getPricingModelProperties, getPromotionTools, getQualifierService, getQualifierService, isNegativeAmountException, setNegativeAmountException, setPricingModelProperties, setPromotionTools, setQualifierService |
Methods inherited from class atg.nucleus.GenericService |
addLogListener, 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, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASS_VERSION
public static final java.lang.String CLASS_VERSION
- See Also:
- Constant Field Values
mReturnManager
protected ReturnManager mReturnManager
ExchangeOrderAdjustmentCalculator
public ExchangeOrderAdjustmentCalculator()
setReturnManager
public void setReturnManager(ReturnManager pReturnManager)
- Sets the ReturnManager
- Parameters:
pReturnTools
- the ReturnManagers
getReturnManager
public ReturnManager getReturnManager()
- Returns:
- the ReturnManager
priceOrder
public void priceOrder(OrderPriceInfo pPriceQuote,
Order pOrder,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
throws PricingException
- 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.
- Specified by:
priceOrder
in interface OrderPricingCalculator
- Overrides:
priceOrder
in class atg.commerce.pricing.OrderAdjustmentCalculator
- Parameters:
pPriceQuote
- 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 null
- Throws:
PricingException
- See Also:
OrderDiscountCalculator.updateItemsDiscountShare(Order, double, double, double, String, long)
,
OrderDiscountCalculator.adjustShippingGroupSubtotalPriceInfos(String, OrderPriceInfo, Order, Locale, RepositoryItem, Map, Map, Map)
getManualAdjustments
protected java.util.Collection getManualAdjustments(OrderPriceInfo pPriceQuote,
Order pOrder,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
throws PricingException
- Overrides the base behavior to return the manual adjustments applied to the Promotion Evaluation Order in
the
ReturnRequest
provided in the extra parameter map.
- Overrides:
getManualAdjustments
in class atg.commerce.pricing.OrderAdjustmentCalculator
- Throws:
PricingException
adjustOrderSubtotalAmount
protected double adjustOrderSubtotalAmount(RepositoryItem pOrderFixedAmountAdjustment,
OrderPriceInfo pPriceQuote,
Order pOrder,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
throws PricingException
- Adjusts the order subtotal based on the manual adjustment value stored in the
ReturnRequest's
exchangeItemManualAdjustmentValue
property. The values
are precalculated based on the manual adjustment share applied to the replacement items
in the promotion evaluation order.
- Overrides:
adjustOrderSubtotalAmount
in class atg.commerce.pricing.OrderAdjustmentCalculator
- Throws:
PricingException