Class DefaultTmaCommercePriceService
java.lang.Object
de.hybris.platform.commerceservices.price.impl.DefaultCommercePriceService
de.hybris.platform.subscriptionservices.price.impl.DefaultSubscriptionCommercePriceService
de.hybris.platform.b2ctelcoservices.pricing.services.impl.DefaultTmaCommercePriceService
- All Implemented Interfaces:
TmaCommercePriceService,de.hybris.platform.commerceservices.price.CommercePriceService,de.hybris.platform.subscriptionservices.price.SubscriptionCommercePriceService
public class DefaultTmaCommercePriceService
extends de.hybris.platform.subscriptionservices.price.impl.DefaultSubscriptionCommercePriceService
implements TmaCommercePriceService
Default implementation of the
TmaCommercePriceService.- Since:
- 6.7
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.commerceservices.price.impl.DefaultCommercePriceService
de.hybris.platform.commerceservices.price.impl.DefaultCommercePriceService.PriceInformationComparator -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTmaCommercePriceService(TmaAbstractOrderEntryService abstractOrderEntryService) -
Method Summary
Modifier and TypeMethodDescriptionprotected TmaPriceContextDeprecated.since 2007.filterPricesbyPriceContext(TmaPriceContext priceContext) Retrieves all instances ofPriceRowModels andSubscriptionPricePlanModels for the and provided.protected TmaAbstractOrderEntryServicegetBestApplicablePrice(TmaPriceContext priceContext) Retrieves the bestPriceRowModelapplicable for the given context, be it either the standalone price of the offering or a price override.getBestApplicablePrice(AbstractOrderEntryModel orderEntryModel) Retrieves the bestPriceRowModelapplicable for the given , considering the context in which the offering has been bought (either standalone or as part of a bundle).getMinimumPrice(TmaPriceContext priceContext) Retrieves the minimumPriceRowModelwhich may be applicable for the given context, be it either the standalone price of the offering or a price override.getMinimumPrice(AbstractOrderEntryModel orderEntryModel) Retrieves the minimumPriceRowModelwhich may be applicable for the given , considering the context in which the offering has been bought (either standalone or as part of a bundle).protected DefaultTmaMinimumPriceSelectorDeprecated.since 2007getMinimumPriceValue(TmaPriceContext priceContext) Retrieves the value of the minimum price which may be applicable for the given context, be it either the standalone price of the offering or a price override.protected Set<SubscriptionPricePlanModel>getPriceOverrides(TmaPriceContext priceContext) Deprecated.since 2007.protected PriceRowModelComparatorDeprecated.since 2007protected ProductModelgetProduct(TmaPriceContext priceContext) Returns the product for which to calculate the price.protected Set<TmaProductOfferingModel>getRequiredProductsFromCart(AbstractOrderEntryModel entry, ProductModel affectedProduct) Deprecated.since 2007.protected Set<PriceRowModel>getStandalonePrices(TmaPriceContext priceContext) Deprecated.since 2105.protected TmaSubscriptionPricePlanDaoprotected TmaPriceContextServiceprotected TmaPriceSelectorvoidsetMinimumPriceSelector(DefaultTmaMinimumPriceSelector minimumPriceSelector) Deprecated.since 2007voidsetPriceRowComparator(PriceRowModelComparator priceRowComparator) Deprecated.since 2007voidsetSubscriptionPricePlanDao(TmaSubscriptionPricePlanDao subscriptionPricePlanDao) voidsetTmaPriceContextService(TmaPriceContextService tmaPriceContextService) voidsetTmaPriceSelector(TmaPriceSelector tmaPriceSelector) Methods inherited from class de.hybris.platform.subscriptionservices.price.impl.DefaultSubscriptionCommercePriceService
getCurrentPriceFactory, getFirstRecurringPriceFromPlan, getLastRecurringPriceFromPlan, getModelService, getOneTimeChargeEntryPlan, getSubscriptionPricePlanForEntry, getSubscriptionPricePlanForProduct, setModelServiceMethods inherited from class de.hybris.platform.commerceservices.price.impl.DefaultCommercePriceService
fillAllVariantPrices, getAllVariantPrices, getFromPriceForProduct, getLowestVariantPrice, getPriceService, getWebPriceForProduct, setPriceServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.commerceservices.price.CommercePriceService
getFromPriceForProduct, getWebPriceForProductMethods inherited from interface de.hybris.platform.subscriptionservices.price.SubscriptionCommercePriceService
getFirstRecurringPriceFromPlan, getLastRecurringPriceFromPlan, getOneTimeChargeEntryPlan, getSubscriptionPricePlanForEntry, getSubscriptionPricePlanForProduct
-
Constructor Details
-
DefaultTmaCommercePriceService
-
-
Method Details
-
getMinimumPrice
Description copied from interface:TmaCommercePriceServiceRetrieves the minimumPriceRowModelwhich may be applicable for the given context, be it either the standalone price of the offering or a price override.- Specified by:
getMinimumPricein interfaceTmaCommercePriceService- Parameters:
priceContext- priceContext to retrieve the configuration from- Returns:
- minimum
PriceRowModelapplicable for the given context
-
getBestApplicablePrice
Description copied from interface:TmaCommercePriceServiceRetrieves the bestPriceRowModelapplicable for the given context, be it either the standalone price of the offering or a price override.- Specified by:
getBestApplicablePricein interfaceTmaCommercePriceService- Parameters:
priceContext- priceContext to retrieve the configuration from- Returns:
- best
PriceRowModelapplicable for the given context
-
getMinimumPriceValue
Description copied from interface:TmaCommercePriceServiceRetrieves the value of the minimum price which may be applicable for the given context, be it either the standalone price of the offering or a price override. The priorities for retrieving the value are the following:- if the price has recurring charges, return the first recurring charge
- if the price has a value, return the value
- if the price has one time charges, return the first one time charge
- Specified by:
getMinimumPriceValuein interfaceTmaCommercePriceService- Parameters:
priceContext- price context to retrieve the price value from- Returns:
- price value considering the priorities mentioned above
-
getMinimumPrice
Description copied from interface:TmaCommercePriceServiceRetrieves the minimumPriceRowModelwhich may be applicable for the given , considering the context in which the offering has been bought (either standalone or as part of a bundle).- Specified by:
getMinimumPricein interfaceTmaCommercePriceService- Parameters:
orderEntryModel- the order entry for which the price will be computed- Returns:
- minimum
PriceRowModelapplicable for the given order entry
-
getBestApplicablePrice
Description copied from interface:TmaCommercePriceServiceRetrieves the bestPriceRowModelapplicable for the given , considering the context in which the offering has been bought (either standalone or as part of a bundle).- Specified by:
getBestApplicablePricein interfaceTmaCommercePriceService- Parameters:
orderEntryModel- the order entry for which the price will be computed- Returns:
- best
PriceRowModelapplicable for the given order entry
-
filterPricesbyPriceContext
Description copied from interface:TmaCommercePriceServiceRetrieves all instances ofPriceRowModels andSubscriptionPricePlanModels for the and provided.- Specified by:
filterPricesbyPriceContextin interfaceTmaCommercePriceService- Parameters:
priceContext- priceContext to retrieve the configuration from- Returns:
PriceRowModels retrieved from the configuration provided by the
-
createPriceContext
@Deprecated(since="2007") protected TmaPriceContext createPriceContext(AbstractOrderEntryModel entry) Deprecated.since 2007. Use insteadTmaPriceContextService.createPriceContext(AbstractOrderEntryModel)Creates aTmaPriceContextbased on the attributes values set on the order entry. If a bundle product offering exists on the order entry then a bundle product offering context is created, otherwise a simple price context is created- Parameters:
entry- order entry for which the context is created- Returns:
- newly created
TmaPriceContextwith the configured parameters
-
getRequiredProductsFromCart
@Deprecated(since="2007") protected Set<TmaProductOfferingModel> getRequiredProductsFromCart(AbstractOrderEntryModel entry, ProductModel affectedProduct) Deprecated.since 2007.Retrieves all required product offerings found on the current order entry, in order for a price to apply .- Parameters:
entry- order entry to retrieve the product for which the price should be configured, asTmaPriceContext.getProduct().affectedProduct- product for which the price will be modified- Returns:
- required products necessary for the new price to apply to the
-
getPriceOverrides
@Deprecated(since="2007") protected Set<SubscriptionPricePlanModel> getPriceOverrides(TmaPriceContext priceContext) Deprecated.since 2007. Use insteadTmaSubscriptionPricePlanDao.findAllApplicablePricesForContext(TmaPriceContext)Retrieves all overrideSubscriptionPricePlanModels for theTmaPriceContextprovided.- Parameters:
priceContext- priceContext to retrieve the configuration from- Returns:
- all
SubscriptionPricePlanModels having the configuration as on the provided or empty set in case no price overrides are found.
-
getProduct
Returns the product for which to calculate the price. If theTmaPriceContext.getProduct()is a BPO, the price will be computed for theTmaPriceContext.getAffectedProduct().- Parameters:
priceContext- price context to retrieve the product from- Returns:
- product for which the price should be computed
-
getStandalonePrices
@Deprecated(since="2105") protected Set<PriceRowModel> getStandalonePrices(TmaPriceContext priceContext) Deprecated.since 2105. Use insteadTmaSubscriptionPricePlanDao.findAllApplicablePricesForContext(TmaPriceContext)Retrieves standalone prices for given context.- Parameters:
priceContext- the context based on which prices are retrieved- Returns:
PriceRowModels having the configuration as on the provided or empty set in case no price overrides are found.
-
getSubscriptionPricePlanDao
-
setSubscriptionPricePlanDao
-
getPriceRowComparator
Deprecated.since 2007 -
setPriceRowComparator
@Deprecated(since="2007") public void setPriceRowComparator(PriceRowModelComparator priceRowComparator) Deprecated.since 2007 -
getTmaPriceContextService
-
setTmaPriceContextService
-
getTmaPriceSelector
-
setTmaPriceSelector
-
setMinimumPriceSelector
@Deprecated(since="2007") public void setMinimumPriceSelector(DefaultTmaMinimumPriceSelector minimumPriceSelector) Deprecated.since 2007 -
getMinimumPriceSelector
Deprecated.since 2007 -
getAbstractOrderEntryService
-