Class OnTenantStartupProcessor
java.lang.Object
de.hybris.platform.ruleengine.event.OnTenantStartupProcessor
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected ConfigurationServicereturns a set of properties that will be set as system properties before drools is started up.returns a set of tenant IDs for which rules modules will not be activated.protected RuleEngineBootstrapprotected org.springframework.retry.support.RetryTemplateprotected RuleEngineServiceprotected RulesModuleDaoprotected booleanchecks if the current tenantID is part of the ignored tenants as configured viagetExcludedTenants().protected voidinit()protected booleanprotected voidThe method is called on Tenant startup.protected voidrefreshCurrentSessionWithRetry(Supplier<Void> failingMethodSupplier) voidsetConfigurationService(ConfigurationService configurationService) voidsetDroolsProperties(Set<String> droolsProperties) protected voidall of the properties defined in this class' droolsProperties attribute will be set as system property before drools is initialized.voidsetExcludedTenants(Set<String> excludedTenants) voidsetRuleEngineBootstrap(RuleEngineBootstrap ruleEngineBootstrap) voidsetRuleEngineInitRetryTemplate(org.springframework.retry.support.RetryTemplate ruleEngineInitRetryTemplate) voidsetRuleEngineService(RuleEngineService ruleEngineService) voidsetRulesModuleDao(RulesModuleDao rulesModuleDao)
-
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
-
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
-
setConfigurationService
-
getExcludedTenants
returns a set of tenant IDs for which rules modules will not be activated. -
setExcludedTenants
-
getDroolsProperties
returns a set of properties that will be set as system properties before drools is started up. -
setDroolsProperties
-
getRulesModuleDao
-
setRulesModuleDao
-
getRuleEngineBootstrap
-
setRuleEngineBootstrap
-
getRuleEngineService
-
setRuleEngineService
-
getRuleEngineInitRetryTemplate
protected org.springframework.retry.support.RetryTemplate getRuleEngineInitRetryTemplate() -
setRuleEngineInitRetryTemplate
public void setRuleEngineInitRetryTemplate(org.springframework.retry.support.RetryTemplate ruleEngineInitRetryTemplate)
-