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

public class DefaultDealBundleRuleService extends DefaultTravelBundleRuleService
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a ChangeProductPriceBundleRuleModel valid for the given entry.
    Gets deal bundle template service.
    void
    Sets deal bundle template service.

    Methods inherited from class de.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleRuleService

    createMessageForDisableRule

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultDealBundleRuleService

      public DefaultDealBundleRuleService()
  • Method Details

    • getChangePriceBundleRuleForOrderEntry

      @Nullable public ChangeProductPriceBundleRuleModel getChangePriceBundleRuleForOrderEntry(@Nonnull AbstractOrderEntryModel entry)
      Description copied from class: DefaultTravelBundleRuleService
      Returns a ChangeProductPriceBundleRuleModel valid 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:
      getChangePriceBundleRuleForOrderEntry in interface de.hybris.platform.configurablebundleservices.bundle.BundleRuleService
      Overrides:
      getChangePriceBundleRuleForOrderEntry in class DefaultTravelBundleRuleService
      Parameters:
      entry - entry that is added to the cart as part of a bundle
      Returns:
      a ChangeProductPriceBundleRuleModel if existing or null
    • getDealBundleTemplateService

      protected DealBundleTemplateService getDealBundleTemplateService()
      Gets deal bundle template service.
      Returns:
      the deal bundle template service
    • setDealBundleTemplateService

      public void setDealBundleTemplateService(DealBundleTemplateService dealBundleTemplateService)
      Sets deal bundle template service.
      Parameters:
      dealBundleTemplateService - the deal bundle template service