Class DefaultTravelBundleRuleService

java.lang.Object
de.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleCommerceRuleService
de.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleRuleService
de.hybris.platform.travelservices.bundle.impl.DefaultTravelBundleRuleService
All Implemented Interfaces:
de.hybris.platform.configurablebundleservices.bundle.BundleRuleService
Direct Known Subclasses:
DefaultDealBundleRuleService

public class DefaultTravelBundleRuleService extends de.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleRuleService
The Travel extension of DefaultBundleRuleService class. This class has been created in order to retrieve the changeProductPriceBundleRules from the bundleTemplate 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.

    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

    • DefaultTravelBundleRuleService

      public DefaultTravelBundleRuleService()
  • Method Details

    • getChangePriceBundleRuleForOrderEntry

      @Nullable public ChangeProductPriceBundleRuleModel getChangePriceBundleRuleForOrderEntry(@Nonnull AbstractOrderEntryModel entry)
      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 de.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleRuleService
      Parameters:
      entry - entry that is added to the cart as part of a bundle
      Returns:
      a ChangeProductPriceBundleRuleModel if existing or null