Class ProductConfigurationPricingStrategyImpl

    • Constructor Detail

      • ProductConfigurationPricingStrategyImpl

        public ProductConfigurationPricingStrategyImpl()
    • Method Detail

      • updateCartEntryBasePrice

        public boolean updateCartEntryBasePrice​(AbstractOrderEntryModel entry)
        Description copied from interface: ProductConfigurationPricingStrategy
        Updates cart entry's base price from configuration model if a price is available in configuration model. ConfigId has to be present in current session for given cart entry to retrieve configuration model. The caller has to take care for triggering recalculate of cart afterwards.
        Specified by:
        updateCartEntryBasePrice in interface ProductConfigurationPricingStrategy
        Parameters:
        entry - cart entry
        Returns:
        true if cart entry has been updated
      • hasBasePriceChanged

        protected boolean hasBasePriceChanged​(AbstractOrderEntryModel entry,
                                              java.lang.Double newPrice)
      • updateCartEntryPrices

        public boolean updateCartEntryPrices​(AbstractOrderEntryModel entry,
                                             boolean calculateCart,
                                             CommerceCartParameter passedParameter)
        Description copied from interface: ProductConfigurationPricingStrategy
        Updates cart entry's base price (in case it deviates from the current configuration price) from configuration model/pricing service. ConfigId has to be present in current session for given cart entry to retrieve configuration model. This includes recalculation and saving of the cart if entry prices were updated.
        Specified by:
        updateCartEntryPrices in interface ProductConfigurationPricingStrategy
        Parameters:
        entry - cart entry
        calculateCart - specifies whether cart is calculated on successful update
        passedParameter - parameters for recalculation of the cart
        Returns:
        true if cart entry has been updated
      • retrieveCurrentTotalPrice

        protected PriceModel retrieveCurrentTotalPrice​(java.lang.String configId)
      • setConfigurationService

        public void setConfigurationService​(ProductConfigurationService configurationService)
        Parameters:
        configurationService - the configurationService to set
      • setPricingService

        public void setPricingService​(PricingService pricingService)
        Parameters:
        pricingService - the pricingService to set
      • setCommerceCartService

        public void setCommerceCartService​(CommerceCartService commerceCartService)
        Parameters:
        commerceCartService - the commerceCartService to set
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)
        Parameters:
        modelService - the modelService to set