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 -
Method Summary
Modifier and TypeMethodDescriptionReturns aChangeProductPriceBundleRuleModelvalid for the given entry.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
-
DefaultTravelBundleRuleService
public DefaultTravelBundleRuleService()
-
-
Method Details
-
getChangePriceBundleRuleForOrderEntry
@Nullable public ChangeProductPriceBundleRuleModel getChangePriceBundleRuleForOrderEntry(@Nonnull AbstractOrderEntryModel entry) Returns 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 classde.hybris.platform.configurablebundleservices.bundle.impl.DefaultBundleRuleService- Parameters:
entry- entry that is added to the cart as part of a bundle- Returns:
- a
ChangeProductPriceBundleRuleModelif existing or null
-