Class OnTenantStartupProcessor
- java.lang.Object
-
- de.hybris.platform.ruleengine.event.OnTenantStartupProcessor
-
public class OnTenantStartupProcessor extends java.lang.ObjectThe 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 (seegetExcludedTenants().
-
-
Constructor Summary
Constructors Constructor Description OnTenantStartupProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanactivateRulesModules()protected ConfigurationServicegetConfigurationService()protected java.util.Set<java.lang.String>getExcludedTenants()returns a set of tenant IDs for which rules modules will not be activated.protected RuleEngineBootstrapgetRuleEngineBootstrap()protected org.springframework.retry.support.RetryTemplategetRuleEngineInitRetryTemplate()protected RuleEngineServicegetRuleEngineService()protected RulesModuleDaogetRulesModuleDao()protected booleanignoreTenant()checks if the current tenantID is part of the ignored tenants as configured viagetExcludedTenants().protected voidinit()protected booleanisSystemInitialized()protected voidprocessOnTenantStartup()The method is called on Tenant startup.protected voidrefreshCurrentSessionWithRetry(java.util.function.Supplier<java.lang.Void> failingMethodSupplier)voidsetConfigurationService(ConfigurationService configurationService)voidsetExcludedTenants(java.util.Set<java.lang.String> excludedTenants)voidsetRuleEngineBootstrap(RuleEngineBootstrap ruleEngineBootstrap)voidsetRuleEngineInitRetryTemplate(org.springframework.retry.support.RetryTemplate ruleEngineInitRetryTemplate)voidsetRuleEngineService(RuleEngineService ruleEngineService)voidsetRulesModuleDao(RulesModuleDao rulesModuleDao)
-
-
-
Method Detail
-
processOnTenantStartup
protected void processOnTenantStartup()
The method is called on Tenant startup.
-
activateRulesModules
protected boolean activateRulesModules()
-
refreshCurrentSessionWithRetry
protected void refreshCurrentSessionWithRetry(java.util.function.Supplier<java.lang.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 viagetExcludedTenants().- Returns:
- true if the tenant should be ignored, otherwise false
-
getConfigurationService
protected ConfigurationService getConfigurationService()
-
setConfigurationService
public void setConfigurationService(ConfigurationService configurationService)
-
getExcludedTenants
protected java.util.Set<java.lang.String> getExcludedTenants()
returns a set of tenant IDs for which rules modules will not be activated.
-
setExcludedTenants
public void setExcludedTenants(java.util.Set<java.lang.String> excludedTenants)
-
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)
-
-