Class DefaultDealBundleRuleService
java.lang.Object
de.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleCommerceRuleService
de.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleRuleService
de.hybris.platform.travelservices.bundle.impl.DefaultTravelBundleRuleService
de.hybris.platform.travelservices.bundle.impl.DefaultDealBundleRuleService
- All Implemented Interfaces:
de.hybris.platform.configurablebundleservices.bundle.BundleRuleService
The Travel Deal extension of
DefaultTravelBundleRuleService class. This class has been created in order to retrieve
the changeProductPriceBundleRules from the DealbundleTemplate of the orderEntry instead of entryGroup#ExternalReferenceId,
since the latter returns the bundle in which the entry belongs.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns aChangeProductPriceBundleRuleModelvalid for the given entry.protected DealBundleTemplateServiceGets deal bundle template service.voidsetDealBundleTemplateService(DealBundleTemplateService dealBundleTemplateService) Sets deal bundle template service.Methods inherited from class de.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleRuleService
createMessageForDisableRuleMethods inherited from class de.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleCommerceRuleService
checkBundleRuleForConditionalProduct, checkBundleRuleForTargetProduct, checkRuleIsFulfilled, evaluateBundleRules, getBundleTemplateService, getCartProductsInSameBundle, getChangePriceBundleRule, getChangePriceBundleRuleWithLowestPrice, getChangeProductPriceBundleRuleDao, getDisableProductBundleRuleDao, getDisableProductBundleRules, getDisableRuleForBundleProduct, getDisableRuleForBundleProduct, getEntryGroupService, getL10NService, getLowestPriceForTargetProductAndTemplate, getModelService, getSearchRestrictionService, getSessionService, setBundleTemplateService, setChangeProductPriceBundleRuleDao, setDisableProductBundleRuleDao, setEntryGroupService, setL10NService, setModelService, setSearchRestrictionService, setSessionService, unrestricted
-
Constructor Details
-
DefaultDealBundleRuleService
public DefaultDealBundleRuleService()
-
-
Method Details
-
getChangePriceBundleRuleForOrderEntry
@Nullable public ChangeProductPriceBundleRuleModel getChangePriceBundleRuleForOrderEntry(@Nonnull AbstractOrderEntryModel entry) Description copied from class:DefaultTravelBundleRuleServiceReturns aChangeProductPriceBundleRuleModelvalid for the given entry. The method calculates the lowest product price for the product in the given entry which is added to a bundle. The calculation is based on the entry's bundle template and the other products in the same bundle (conditional products). Since the entryGroup#ExternalReferenceId retrieves the parent bundle and not the bundle of the entry, this method has been overridden in order to take first the masterBundle and from it the child bundle template containing the targetProduct.- Specified by:
getChangePriceBundleRuleForOrderEntryin interfacede.hybris.platform.configurablebundleservices.bundle.BundleRuleService- Overrides:
getChangePriceBundleRuleForOrderEntryin classDefaultTravelBundleRuleService- Parameters:
entry- entry that is added to the cart as part of a bundle- Returns:
- a
ChangeProductPriceBundleRuleModelif existing or null
-
getDealBundleTemplateService
Gets deal bundle template service.- Returns:
- the deal bundle template service
-
setDealBundleTemplateService
Sets deal bundle template service.- Parameters:
dealBundleTemplateService- the deal bundle template service
-