Class 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
    • Constructor Detail

      • DefaultTmaCommercePriceService

        public DefaultTmaCommercePriceService()
    • Method Detail

      • getMinimumPriceValue

        public java.lang.Double getMinimumPriceValue​(TmaPriceContext priceContext)
        Description copied from interface: TmaCommercePriceService
        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. 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:
        getMinimumPriceValue in interface TmaCommercePriceService
        Parameters:
        priceContext - price context to retrieve the price value from
        Returns:
        price value considering the priorities mentioned above
      • getRequiredProductsFromCart

        @Deprecated(since="2007")
        protected java.util.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, as TmaPriceContext.product.
        affectedProduct - product for which the price will be modified
        Returns:
        required products necessary for the new price to apply to the {@param affectedProduct}
      • getStandAlonePriceForSpo

        @Deprecated(since="1903",
                    forRemoval=true)
        public PriceRowModel getStandAlonePriceForSpo​(ProductModel productOfferingModel,
                                                      TmaPriceContext priceContext)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 1903
        Retrieves the applicable price of a simple {@param productOfferingModel} considering the configuration provided in the {@param priceContext} given or null if no such price is found.
        Specified by:
        getStandAlonePriceForSpo in interface TmaCommercePriceService
        Parameters:
        productOfferingModel - product offering for which to retrieve the price
        priceContext - price context for which the configuration needs to be valid
        Returns:
        price of the provided {@param productOffering} and {@param priceContext}
      • getSubscriptionPricePlanForProduct

        @Nullable
        @Deprecated(since="1903",
                    forRemoval=true)
        public SubscriptionPricePlanModel getSubscriptionPricePlanForProduct​(@Nonnull
                                                                             ProductModel subscriptionProduct)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Throws UnsupportedOperationException due to missing TmaPriceContext required for filtering prices.
        Specified by:
        getSubscriptionPricePlanForProduct in interface de.hybris.platform.subscriptionservices.price.SubscriptionCommercePriceService
        Overrides:
        getSubscriptionPricePlanForProduct in class de.hybris.platform.subscriptionservices.price.impl.DefaultSubscriptionCommercePriceService
        Parameters:
        subscriptionProduct - the SubscriptionProductModel
      • getPriceRowComparator

        @Deprecated(since="2007")
        protected PriceRowModelComparator getPriceRowComparator()
        Deprecated.
        since 2007
      • setPriceRowComparator

        @Deprecated(since="2007")
        public void setPriceRowComparator​(PriceRowModelComparator priceRowComparator)
        Deprecated.
        since 2007
      • setTmaPriceContextService

        public void setTmaPriceContextService​(TmaPriceContextService tmaPriceContextService)
      • setTmaPriceSelector

        public void setTmaPriceSelector​(TmaPriceSelector tmaPriceSelector)
      • setMinimumPriceSelector

        @Deprecated(since="2007")
        public void setMinimumPriceSelector​(DefaultTmaMinimumPriceSelector minimumPriceSelector)
        Deprecated.
        since 2007