Class SapCartCalculationService
- 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.sap.sappricing.services.impl.SapCartCalculationService
-
- All Implemented Interfaces:
CalculationService,java.io.Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
public class SapCartCalculationService extends DefaultCalculationService
SapCartCalculationService- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
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 SapCartCalculationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcalculate(AbstractOrderModel order)Calculates the given order and all its entries unless they're already calculated and the order has not been modified.voidcalculateTotals(AbstractOrderModel order, boolean recalculate)(re)calculates all totals for the given order.protected java.util.List<DiscountValue>findDiscountValues(AbstractOrderEntryModel entry)ModuleConfigurationAccessgetModuleConfigurationAccess()SapPricingCartServicegetSapPricingCartService()SapPricingEnablementServicegetSapPricingEnablementService()protected booleanisSyncOrdermgmtEnabled()voidrecalculate(AbstractOrderModel order)recalculates the whole order and all its entries.protected voidresetAdditionalCosts(AbstractOrderModel order, java.util.Collection<TaxValue> relativeTaxValues)protected voidresetAllValues(AbstractOrderEntryModel entry)protected java.util.MapresetAllValues(AbstractOrderModel order)voidsetModuleConfigurationAccess(ModuleConfigurationAccess moduleConfigurationAccess)voidsetSapPricingCartService(SapPricingCartService sapPricingCartService)voidsetSapPricingEnablementService(SapPricingEnablementService sapPricingEnablementService)-
Methods inherited from class de.hybris.platform.order.impl.DefaultCalculationService
addAbsoluteEntryTaxValue, addRelativeEntryTaxValue, applyGrossMixedRate, applyNetMixedRate, calculate, calculateAbsoluteTotalTaxValue, calculateDiscountValues, calculateEntries, calculateSubtotal, calculateTotals, calculateTotals, calculateTotalTaxValues, calculateTotalTaxValues, convertDiscountValues, convertPriceIfNecessary, findBasePrice, findGlobalDiscounts, findTaxValues, getTaxCorrectionFactor, getTaxFreeEntrySupport, getTaxFreeSubTotal, getUnappliedRelativeTaxValues, hasJaloStrategies, isAllEntriesTaxed, isTaxFreeEntrySupport, mustHandleTaxFreeEntries, recalculate, recalculate, recalculateOrderEntryIfNeeded, refreshOrder, requiresCalculation, 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
-
getSapPricingCartService
public SapPricingCartService getSapPricingCartService()
-
setSapPricingCartService
public void setSapPricingCartService(SapPricingCartService sapPricingCartService)
-
getSapPricingEnablementService
public SapPricingEnablementService getSapPricingEnablementService()
-
setSapPricingEnablementService
public void setSapPricingEnablementService(SapPricingEnablementService sapPricingEnablementService)
-
calculate
public void calculate(AbstractOrderModel order) throws CalculationException
Description copied from interface:CalculationServiceCalculates the given order and all its entries unless they're already calculated and the order has not been modified.So this method will fetch prices, taxes and discounts (using spring configurable strategies) for uncalculated or modified entries only - all other will remain unchanged. If at least one entry has been calculated or the order itself has been modified the totals will be calculated as well.
if you merely like to adjust totals while keeping prices, taxes and discounts you should call
CalculationService.calculateTotals(AbstractOrderModel, boolean)instead (e.g. if just a quantity has changed or prices have been imported and cannot be found via price factory ).- Specified by:
calculatein interfaceCalculationService- Overrides:
calculatein classDefaultCalculationService- Parameters:
order- targetAbstractOrderModel- Throws:
CalculationException- if a pricefactory error occurred.
-
recalculate
public void recalculate(AbstractOrderModel order) throws CalculationException
Description copied from interface:CalculationServicerecalculates the whole order and all its entries. this includes finding prices, taxes, discounts, payment and delivery costs by calling the currently installed price factory.if you merely like to adjust totals while keeping prices, taxes and discounts you should call
CalculationService.calculateTotals(AbstractOrderModel, boolean)instead (e.g. if just a quantity has changed or prices have been imported and cannot be found via price factory ).- Specified by:
recalculatein interfaceCalculationService- Overrides:
recalculatein classDefaultCalculationService- Parameters:
order- targetAbstractOrderModel- Throws:
CalculationException- if a pricefactory error occurred.
-
calculateTotals
public void calculateTotals(AbstractOrderModel order, boolean recalculate) throws CalculationException
Description copied from interface:CalculationService(re)calculates all totals for the given order. This does not trigger price, tax and discount calculation but takes all currently set price, tax and discount values as base.- Specified by:
calculateTotalsin interfaceCalculationService- Overrides:
calculateTotalsin classDefaultCalculationService- Parameters:
order- targetAbstractOrderModelrecalculate- forces setting total even if order is marked as calculated- Throws:
CalculationException
-
resetAllValues
protected void resetAllValues(AbstractOrderEntryModel entry) throws CalculationException
- Overrides:
resetAllValuesin classDefaultCalculationService- Throws:
CalculationException
-
resetAllValues
protected java.util.Map resetAllValues(AbstractOrderModel order) throws CalculationException
- Overrides:
resetAllValuesin classDefaultCalculationService- Throws:
CalculationException
-
resetAdditionalCosts
protected void resetAdditionalCosts(AbstractOrderModel order, java.util.Collection<TaxValue> relativeTaxValues)
- Overrides:
resetAdditionalCostsin classDefaultCalculationService
-
findDiscountValues
protected java.util.List<DiscountValue> findDiscountValues(AbstractOrderEntryModel entry) throws CalculationException
- Overrides:
findDiscountValuesin classDefaultCalculationService- Throws:
CalculationException
-
isSyncOrdermgmtEnabled
protected boolean isSyncOrdermgmtEnabled()
-
getModuleConfigurationAccess
public ModuleConfigurationAccess getModuleConfigurationAccess()
-
setModuleConfigurationAccess
public void setModuleConfigurationAccess(ModuleConfigurationAccess moduleConfigurationAccess)
-
-