Class DefaultTravelCalculationService
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.travelservices.order.impl.DefaultTravelCalculationService
- All Implemented Interfaces:
de.hybris.platform.order.CalculationService,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
public class DefaultTravelCalculationService
extends de.hybris.platform.order.impl.DefaultCalculationService
Travel extension of
DefaultCalculationService class.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractService.SerializableDTO -
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManagerFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcalculateTotals(AbstractOrderModel order, boolean recalculate, Map<de.hybris.platform.util.TaxValue, Map<Set<de.hybris.platform.util.TaxValue>, Double>> taxValueMap) calculates all totals.protected de.hybris.platform.servicelayer.i18n.CommonI18NServiceGets the travelCommonI18NServiceprotected de.hybris.platform.order.strategies.calculation.OrderRequiresCalculationStrategyGets the travelOrderRequiresCalculationStrategyprotected MapresetAllValues(AbstractOrderModel order) Resets taxes, extra costs and discounts in the order.voidsetTravelCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService travelCommonI18NService) Sets the travelCommonI18NServicevoidsetTravelOrderRequiresCalculationStrategy(de.hybris.platform.order.strategies.calculation.OrderRequiresCalculationStrategy travelOrderRequiresCalculationStrategy) Sets the travelOrderRequiresCalculationStrategyMethods inherited from class de.hybris.platform.order.impl.DefaultCalculationService
addAbsoluteEntryTaxValue, addRelativeEntryTaxValue, applyGrossMixedRate, applyNetMixedRate, calculate, calculate, calculateAbsoluteTotalTaxValue, calculateDiscountValues, calculateEntries, calculateSubtotal, calculateTotals, calculateTotals, calculateTotalTaxValues, calculateTotalTaxValues, convertDiscountValues, convertPriceIfNecessary, findBasePrice, findDiscountValues, findGlobalDiscounts, findTaxValues, getTaxCorrectionFactor, getTaxFreeEntrySupport, getTaxFreeSubTotal, getUnappliedRelativeTaxValues, hasJaloStrategies, isAllEntriesTaxed, isTaxFreeEntrySupport, mustHandleTaxFreeEntries, recalculate, recalculate, recalculate, recalculateOrderEntryIfNeeded, refreshOrder, requiresCalculation, resetAdditionalCosts, resetAllValues, saveOrder, setCalculatedStatus, setCalculatedStatus, setCommonI18NService, setFindDeliveryCostStrategy, setFindDiscountsStrategies, setFindPaymentCostStrategy, setFindPriceStrategy, setFindTaxesStrategies, setOrderRequiresCalculationStrategy, setTaxFreeEntrySupportMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Constructor Details
-
DefaultTravelCalculationService
public DefaultTravelCalculationService()
-
-
Method Details
-
resetAllValues
protected Map resetAllValues(AbstractOrderModel order) throws de.hybris.platform.order.exceptions.CalculationException Resets taxes, extra costs and discounts in the order. If the original order exists, it doesn't remove discounts from the order.- Overrides:
resetAllValuesin classde.hybris.platform.order.impl.DefaultCalculationService- Parameters:
order- the order- Returns:
- the taxValueMap
- Throws:
de.hybris.platform.order.exceptions.CalculationException
-
calculateTotals
protected void calculateTotals(AbstractOrderModel order, boolean recalculate, Map<de.hybris.platform.util.TaxValue, Map<Set<de.hybris.platform.util.TaxValue>, throws de.hybris.platform.order.exceptions.CalculationExceptionDouble>> taxValueMap) calculates all totals. this does not trigger price, tax and discount calculation but takes all currently set price, tax and discount values as base. this method requires the correct subtotal to be set before and the correct tax value map.- Overrides:
calculateTotalsin classde.hybris.platform.order.impl.DefaultCalculationService- Parameters:
recalculate- if false calculation is done only if the calculated flag is not settaxValueMap- the map { tax value -> Double( sum of all entry totals for this tax ) } obtainable viaDefaultCalculationService.calculateSubtotal(AbstractOrderModel, boolean)- Throws:
de.hybris.platform.order.exceptions.CalculationException
-
getTravelOrderRequiresCalculationStrategy
protected de.hybris.platform.order.strategies.calculation.OrderRequiresCalculationStrategy getTravelOrderRequiresCalculationStrategy()Gets the travelOrderRequiresCalculationStrategy- Returns:
- the travelOrderRequiresCalculationStrategy
-
setTravelOrderRequiresCalculationStrategy
public void setTravelOrderRequiresCalculationStrategy(de.hybris.platform.order.strategies.calculation.OrderRequiresCalculationStrategy travelOrderRequiresCalculationStrategy) Sets the travelOrderRequiresCalculationStrategy- Parameters:
travelOrderRequiresCalculationStrategy- the travelOrderRequiresCalculationStrategy
-
getTravelCommonI18NService
protected de.hybris.platform.servicelayer.i18n.CommonI18NService getTravelCommonI18NService()Gets the travelCommonI18NService- Returns:
- the travelCommonI18NService
-
setTravelCommonI18NService
public void setTravelCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService travelCommonI18NService) Sets the travelCommonI18NService- Parameters:
travelCommonI18NService- the travelCommonI18NService
-