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, txManager

    Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService

    tenant
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    calculateTotals(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.CommonI18NService
    Gets the travelCommonI18NService
    protected de.hybris.platform.order.strategies.calculation.OrderRequiresCalculationStrategy
    Gets the travelOrderRequiresCalculationStrategy
    protected Map
    Resets taxes, extra costs and discounts in the order.
    void
    setTravelCommonI18NService(de.hybris.platform.servicelayer.i18n.CommonI18NService travelCommonI18NService)
    Sets the travelCommonI18NService
    void
    setTravelOrderRequiresCalculationStrategy(de.hybris.platform.order.strategies.calculation.OrderRequiresCalculationStrategy travelOrderRequiresCalculationStrategy)
    Sets the travelOrderRequiresCalculationStrategy

    Methods 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, 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      resetAllValues in class de.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>,Double>> taxValueMap) throws de.hybris.platform.order.exceptions.CalculationException
      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:
      calculateTotals in class de.hybris.platform.order.impl.DefaultCalculationService
      Parameters:
      recalculate - if false calculation is done only if the calculated flag is not set
      taxValueMap - the map { tax value -> Double( sum of all entry totals for this tax ) } obtainable via DefaultCalculationService.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