Class OnTenantStartupProcessor

java.lang.Object
de.hybris.platform.ruleengine.event.OnTenantStartupProcessor

public class OnTenantStartupProcessor extends Object
The OnTenantStartupProcessor is responsible for handling tenant activation of rules modules after the current tenant has been (re)started. It is possible to disable this mechanism for specific tenants by providing a set of tenant ids to be excluded (see getExcludedTenants(). This class essentially activates the drools engine. It will also set drools specific properties that can be configured via the local.properties approach as system properties.
  • Constructor Details

    • OnTenantStartupProcessor

      public OnTenantStartupProcessor()
  • Method Details

    • processOnTenantStartup

      protected void processOnTenantStartup()
      The method is called on Tenant startup.
    • setDroolsSystemProperties

      protected void setDroolsSystemProperties()
      all of the properties defined in this class' droolsProperties attribute will be set as system property before drools is initialized.
    • activateRulesModules

      protected boolean activateRulesModules()
    • refreshCurrentSessionWithRetry

      protected void refreshCurrentSessionWithRetry(Supplier<Void> failingMethodSupplier)
    • init

      @PostConstruct protected void init()
    • isSystemInitialized

      protected boolean isSystemInitialized()
    • ignoreTenant

      protected boolean ignoreTenant()
      checks if the current tenantID is part of the ignored tenants as configured via getExcludedTenants().
      Returns:
      true if the tenant should be ignored, otherwise false
    • getConfigurationService

      protected ConfigurationService getConfigurationService()
    • setConfigurationService

      public void setConfigurationService(ConfigurationService configurationService)
    • getExcludedTenants

      protected Set<String> getExcludedTenants()
      returns a set of tenant IDs for which rules modules will not be activated.
    • setExcludedTenants

      public void setExcludedTenants(Set<String> excludedTenants)
    • getDroolsProperties

      protected Set<String> getDroolsProperties()
      returns a set of properties that will be set as system properties before drools is started up.
    • setDroolsProperties

      public void setDroolsProperties(Set<String> droolsProperties)
    • getRulesModuleDao

      protected RulesModuleDao getRulesModuleDao()
    • setRulesModuleDao

      public void setRulesModuleDao(RulesModuleDao rulesModuleDao)
    • getRuleEngineBootstrap

      protected RuleEngineBootstrap getRuleEngineBootstrap()
    • setRuleEngineBootstrap

      public void setRuleEngineBootstrap(RuleEngineBootstrap ruleEngineBootstrap)
    • getRuleEngineService

      protected RuleEngineService getRuleEngineService()
    • setRuleEngineService

      public void setRuleEngineService(RuleEngineService ruleEngineService)
    • getRuleEngineInitRetryTemplate

      protected org.springframework.retry.support.RetryTemplate getRuleEngineInitRetryTemplate()
    • setRuleEngineInitRetryTemplate

      public void setRuleEngineInitRetryTemplate(org.springframework.retry.support.RetryTemplate ruleEngineInitRetryTemplate)