Class ProductConfigurationRuleAwareServiceImpl

    • Constructor Detail

      • ProductConfigurationRuleAwareServiceImpl

        public ProductConfigurationRuleAwareServiceImpl()
    • Method Detail

      • removeMessagesRecomputedOnNextStep

        protected void removeMessagesRecomputedOnNextStep​(java.util.Set<ProductConfigMessage> oldMessages,
                                                          ProcessStep nextStep)
      • retrieveConfigurationModelAfterUpdate

        protected ConfigModel retrieveConfigurationModelAfterUpdate​(java.lang.String configId,
                                                                    java.lang.String productCode)
      • provideConfigurationModel

        protected ConfigModel provideConfigurationModel​(java.lang.String configId,
                                                        boolean useRuleEngine,
                                                        java.lang.String productCode)
      • adjustVariantConditionsUsingOptions

        protected void adjustVariantConditionsUsingOptions​(ConfigModel config)
      • transferVariantConditions

        protected void transferVariantConditions​(InstanceModel sourceInstance,
                                                 InstanceModel targetInstance)
      • provideRAOs

        protected java.util.Set<java.lang.Object> provideRAOs​(FactContext factContext)
      • setFactContextFactory

        public void setFactContextFactory​(FactContextFactory factContextFactory)
        Parameters:
        factContextFactory - injects the rule engine fact context factory, which is required to trigger the rule engine
      • getCartService

        protected CartService getCartService()
      • setCartService

        public void setCartService​(CartService cartService)
        Parameters:
        cartService - the cart service to access the session cart contents, which may influence the rule engine result
      • getDefaultRuleEngineContextName

        protected java.lang.String getDefaultRuleEngineContextName()
      • setDefaultRuleEngineContextName

        public void setDefaultRuleEngineContextName​(java.lang.String defaultRuleEngineContextName)
        Parameters:
        defaultRuleEngineContextName - injects the rule engine context, which is required to trigger the rule engine
      • setRuleEngineContextDao

        public void setRuleEngineContextDao​(RuleEngineContextDao ruleEngineContextDao)
        Parameters:
        ruleEngineContextDao - injects the rule engine context DAO, which is required to trigger the rule engine
      • getCommerceRuleEngineService

        protected RuleEngineService getCommerceRuleEngineService()
      • setCommerceRuleEngineService

        public void setCommerceRuleEngineService​(RuleEngineService ruleEngineService)
        Parameters:
        ruleEngineService - injects the rule engine service, which is required to trigger the rule engine
      • isRuleBasedDiscountExist

        protected boolean isRuleBasedDiscountExist​(ConfigModel config)
      • setActionStrategiesMapping

        public void setActionStrategiesMapping​(java.util.Map<java.lang.String,​ProductConfigRuleActionStrategy> actionStrategiesMapping)
        Parameters:
        actionStrategiesMapping - injects the mapping between actionStrategyKey, which is defined by the rule action and a concreate actionStrategy class, which will apply the defined action
      • getRuleActionStrategy

        protected ProductConfigRuleActionStrategy getRuleActionStrategy​(java.lang.String strategyKey)
        returns the ProductConfigRuleActionStrategy defined in the actionStrategiesMapping attribute of this service by looking up it's hey.
        Parameters:
        strategyKey - the key of the RuleActionStrategy to look up
        Returns:
        the found bean id
        Throws:
        java.lang.IllegalArgumentException - if the requested strategy cannot be found
        java.lang.IllegalStateException - if this method is called but no strategies are configured
      • getTimeService

        protected TimeService getTimeService()
      • setTimeService

        public void setTimeService​(TimeService timeService)
        Parameters:
        timeService - time service
      • getRuleEngineContextFinderStrategy

        protected RuleEngineContextFinderStrategy getRuleEngineContextFinderStrategy()
        Returns:
        the ruleEngineContextFinderStrategy
      • setRuleEngineContextFinderStrategy

        public void setRuleEngineContextFinderStrategy​(RuleEngineContextFinderStrategy ruleEngineContextFinderStrategy)
        Parameters:
        ruleEngineContextFinderStrategy - the ruleEngineContextFinderStrategy to set