Class DefaultTmaCalculationService
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.service.AbstractService
-
- de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
-
- de.hybris.platform.order.impl.DefaultCalculationService
-
- de.hybris.platform.b2ctelcoservices.pricing.services.impl.DefaultTmaCalculationService
-
- All Implemented Interfaces:
TmaCalculationService,de.hybris.platform.order.CalculationService,java.io.Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
public class DefaultTmaCalculationService extends de.hybris.platform.order.impl.DefaultCalculationService implements TmaCalculationService
Custom implementation of theDefaultCalculationServiceproviding enhancements for Telco specific operations.- Since:
- 6.7
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultTmaCalculationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcalculateTotals(AbstractOrderEntryModel entry, boolean recalculate)voidcalculateTotals(AbstractOrderModel order, boolean recalculate)protected doubleconvertFromNetToGrossPriceIfNeeded(de.hybris.platform.util.PriceValue priceValue, boolean toNet, CurrencyModel orderCurrency)TmaAbstractOrderPriceModelcreateCartPrice()Creates a composite cart price for storing prices.protected TmaAbstractOrderChargePriceModelcreateCartPriceForDiscountValue(AbstractOrderEntryModel entry, de.hybris.platform.util.DiscountValue discountValue)protected TmaAbstractOrderChargePriceModelcreateCartPriceForDiscountValue(AbstractOrderModel order, de.hybris.platform.util.DiscountValue discountValue)protected de.hybris.platform.servicelayer.i18n.CommonI18NServicegetDefaultCommonI18NService()protected de.hybris.platform.order.strategies.calculation.FindDeliveryCostStrategygetDeliveryCostStrategy()protected TmaAbstractOrderPriceModelgetDeliveryPrice(AbstractOrderModel order, java.util.Collection<de.hybris.platform.util.TaxValue> relativeTaxValues)protected TmaFindAbstractOrderEntryPriceStrategygetFindAbstractOrderEntryPriceStrategy()protected de.hybris.platform.servicelayer.keygenerator.KeyGeneratorgetKeyGenerator()protected TmaAbstractOrderPriceBuildergetOrderPriceBuilder()protected de.hybris.platform.order.strategies.calculation.FindPaymentCostStrategygetPaymentCostStrategy()protected TmaAbstractOrderPriceModelgetPaymentPrice(AbstractOrderModel order, java.util.Collection<de.hybris.platform.util.TaxValue> relativeTaxValues)protected voidresetAdditionalCosts(AbstractOrderModel order, java.util.Collection<de.hybris.platform.util.TaxValue> relativeTaxValues)protected voidresetAllValues(AbstractOrderEntryModel entry)voidsetDefaultCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService defaultCommonI18NService)voidsetDeliveryCostStrategy(de.hybris.platform.order.strategies.calculation.FindDeliveryCostStrategy deliveryCostStrategy)voidsetFindAbstractOrderEntryPriceStrategy(TmaFindAbstractOrderEntryPriceStrategy findAbstractOrderEntryPriceStrategy)voidsetKeyGenerator(de.hybris.platform.servicelayer.keygenerator.KeyGenerator keyGenerator)voidsetOrderPriceBuilder(TmaAbstractOrderPriceBuilder orderPriceBuilder)voidsetPaymentCostStrategy(de.hybris.platform.order.strategies.calculation.FindPaymentCostStrategy paymentCostStrategy)-
Methods inherited from class de.hybris.platform.order.impl.DefaultCalculationService
addAbsoluteEntryTaxValue, addRelativeEntryTaxValue, applyGrossMixedRate, applyNetMixedRate, calculate, calculate, calculateAbsoluteTotalTaxValue, calculateDiscountValues, calculateEntries, calculateSubtotal, calculateTotals, calculateTotalTaxValues, calculateTotalTaxValues, convertDiscountValues, convertPriceIfNecessary, findBasePrice, findDiscountValues, findGlobalDiscounts, findTaxValues, getTaxCorrectionFactor, getTaxFreeEntrySupport, getTaxFreeSubTotal, getUnappliedRelativeTaxValues, hasJaloStrategies, isAllEntriesTaxed, isTaxFreeEntrySupport, mustHandleTaxFreeEntries, recalculate, recalculate, recalculate, recalculateOrderEntryIfNeeded, refreshOrder, requiresCalculation, resetAllValues, saveOrder, setCalculatedStatus, setCalculatedStatus, setCommonI18NService, setFindDeliveryCostStrategy, setFindDiscountsStrategies, setFindPaymentCostStrategy, setFindPriceStrategy, setFindTaxesStrategies, setOrderRequiresCalculationStrategy, setTaxFreeEntrySupport
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManager
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
-
-
-
Method Detail
-
calculateTotals
public void calculateTotals(AbstractOrderEntryModel entry, boolean recalculate)
- Specified by:
calculateTotalsin interfacede.hybris.platform.order.CalculationService- Overrides:
calculateTotalsin classde.hybris.platform.order.impl.DefaultCalculationService
-
calculateTotals
public void calculateTotals(AbstractOrderModel order, boolean recalculate) throws de.hybris.platform.order.exceptions.CalculationException
- Specified by:
calculateTotalsin interfacede.hybris.platform.order.CalculationService- Overrides:
calculateTotalsin classde.hybris.platform.order.impl.DefaultCalculationService- Throws:
de.hybris.platform.order.exceptions.CalculationException
-
createCartPriceForDiscountValue
protected TmaAbstractOrderChargePriceModel createCartPriceForDiscountValue(AbstractOrderEntryModel entry, de.hybris.platform.util.DiscountValue discountValue)
-
createCartPriceForDiscountValue
protected TmaAbstractOrderChargePriceModel createCartPriceForDiscountValue(AbstractOrderModel order, de.hybris.platform.util.DiscountValue discountValue)
-
createCartPrice
public TmaAbstractOrderPriceModel createCartPrice()
Description copied from interface:TmaCalculationServiceCreates a composite cart price for storing prices.- Specified by:
createCartPricein interfaceTmaCalculationService- Returns:
- The composite price created
-
resetAllValues
protected void resetAllValues(AbstractOrderEntryModel entry) throws de.hybris.platform.order.exceptions.CalculationException
- Overrides:
resetAllValuesin classde.hybris.platform.order.impl.DefaultCalculationService- Throws:
de.hybris.platform.order.exceptions.CalculationException
-
resetAdditionalCosts
protected void resetAdditionalCosts(AbstractOrderModel order, java.util.Collection<de.hybris.platform.util.TaxValue> relativeTaxValues)
- Overrides:
resetAdditionalCostsin classde.hybris.platform.order.impl.DefaultCalculationService
-
getPaymentPrice
protected TmaAbstractOrderPriceModel getPaymentPrice(AbstractOrderModel order, java.util.Collection<de.hybris.platform.util.TaxValue> relativeTaxValues)
-
getDeliveryPrice
protected TmaAbstractOrderPriceModel getDeliveryPrice(AbstractOrderModel order, java.util.Collection<de.hybris.platform.util.TaxValue> relativeTaxValues)
-
convertFromNetToGrossPriceIfNeeded
protected double convertFromNetToGrossPriceIfNeeded(de.hybris.platform.util.PriceValue priceValue, boolean toNet, CurrencyModel orderCurrency)
-
getFindAbstractOrderEntryPriceStrategy
protected TmaFindAbstractOrderEntryPriceStrategy getFindAbstractOrderEntryPriceStrategy()
-
setFindAbstractOrderEntryPriceStrategy
public void setFindAbstractOrderEntryPriceStrategy(TmaFindAbstractOrderEntryPriceStrategy findAbstractOrderEntryPriceStrategy)
-
getDeliveryCostStrategy
protected de.hybris.platform.order.strategies.calculation.FindDeliveryCostStrategy getDeliveryCostStrategy()
-
setDeliveryCostStrategy
public void setDeliveryCostStrategy(de.hybris.platform.order.strategies.calculation.FindDeliveryCostStrategy deliveryCostStrategy)
-
getPaymentCostStrategy
protected de.hybris.platform.order.strategies.calculation.FindPaymentCostStrategy getPaymentCostStrategy()
-
setPaymentCostStrategy
public void setPaymentCostStrategy(de.hybris.platform.order.strategies.calculation.FindPaymentCostStrategy paymentCostStrategy)
-
getKeyGenerator
protected de.hybris.platform.servicelayer.keygenerator.KeyGenerator getKeyGenerator()
-
setKeyGenerator
public void setKeyGenerator(de.hybris.platform.servicelayer.keygenerator.KeyGenerator keyGenerator)
-
getOrderPriceBuilder
protected TmaAbstractOrderPriceBuilder getOrderPriceBuilder()
-
setOrderPriceBuilder
public void setOrderPriceBuilder(TmaAbstractOrderPriceBuilder orderPriceBuilder)
-
getDefaultCommonI18NService
protected de.hybris.platform.servicelayer.i18n.CommonI18NService getDefaultCommonI18NService()
-
setDefaultCommonI18NService
public void setDefaultCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService defaultCommonI18NService)
-
-