public class DefaultRuleEngineSystemSetup extends AbstractEventListener<AfterInitializationEndEvent> implements RuleEngineSystemSetup
| Constructor and Description |
|---|
DefaultRuleEngineSystemSetup() |
| Modifier and Type | Method and Description |
|---|---|
protected <T extends ItemModel> |
convert(java.util.Set<PK> pks)
converts the given set of PKs to source rule model objects.
|
protected void |
doRuleDeployment(java.lang.String moduleName,
java.util.List<SourceRuleModel> rules) |
protected boolean |
failOnError()
whether to fail on any error or ignore them (set via
ruleengineservices.system.setup.failOnError
system property, defaults to true. |
protected ConfigurationService |
getConfigurationService() |
protected java.lang.String |
getInitializationEventType(AfterInitializationEndEvent event) |
protected java.util.Map<java.lang.String,java.util.Set<PK>> |
getInitializationMap() |
protected ModelService |
getModelService() |
protected RuleEngineService |
getRuleEngineService() |
protected RuleMaintenanceService |
getRuleMaintenanceService() |
protected java.util.function.Predicate<SourceRuleModel> |
getSourceRuleModelValidator() |
<T extends AbstractRulesModule> |
initializeModule(T module)
Performs initialization of the provided (jalo) rules module.
|
protected void |
onEvent(AfterInitializationEndEvent event)
This method is called by
AbstractEventListener#onApplicationEvent(ApplicationEvent) and processes the given
event. |
void |
registerSourceRuleForDeployment(SourceRule sourceRule,
java.lang.String... moduleNames)
registers a (jalo) SourceRule to be compiled and deployed for the given moduleNames after the next initialization.
|
void |
registerSourceRulesForDeployment(java.util.Collection<SourceRuleModel> sourceRules,
java.util.Collection<java.lang.String> moduleNames)
registers a collection of SourceRules to be compiled and deployed for the given moduleNames after the next
initialization.
|
void |
setConfigurationService(ConfigurationService configurationService) |
void |
setModelService(ModelService modelService) |
void |
setRuleEngineService(RuleEngineService ruleEngineService) |
void |
setRuleMaintenanceService(RuleMaintenanceService ruleMaintenanceService) |
void |
setSourceRuleModelValidator(java.util.function.Predicate<SourceRuleModel> sourceRuleModelValidator) |
protected <T extends AbstractRulesModuleModel> |
validateAndConvertFromJalo(AbstractRulesModule rulesModule) |
protected <T extends ItemModel> |
validateAndConvertFromJalo(PK pk) |
protected <T extends SourceRuleModel> |
validateAndConvertFromJalo(SourceRule sourceRule) |
afterPropertiesSet, onApplicationEvent, setApplicationContext, setClusterService, setTenantServicepublic <T extends AbstractRulesModule> void initializeModule(T module)
RuleEngineSystemSetupinitializeModule in interface RuleEngineSystemSetupmodule - Jalo representation of rules module to be initializedpublic void registerSourceRuleForDeployment(SourceRule sourceRule, java.lang.String... moduleNames)
RuleEngineSystemSetupregisterSourceRuleForDeployment in interface RuleEngineSystemSetupsourceRule - the source rule to be registered for deploymentmoduleNames - the target module(s) by namepublic void registerSourceRulesForDeployment(java.util.Collection<SourceRuleModel> sourceRules, java.util.Collection<java.lang.String> moduleNames)
RuleEngineSystemSetupregisterSourceRulesForDeployment in interface RuleEngineSystemSetupsourceRules - the source rules to be registered for deploymentmoduleNames - the target modules by nameprotected void onEvent(AfterInitializationEndEvent event)
AbstractEventListenerAbstractEventListener#onApplicationEvent(ApplicationEvent) and processes the given
event.onEvent in class AbstractEventListener<AfterInitializationEndEvent>event - the event to be processed#onApplicationEvent(ApplicationEvent)protected void doRuleDeployment(java.lang.String moduleName,
java.util.List<SourceRuleModel> rules)
protected java.lang.String getInitializationEventType(AfterInitializationEndEvent event)
protected <T extends SourceRuleModel> java.util.Optional<T> validateAndConvertFromJalo(SourceRule sourceRule)
protected <T extends AbstractRulesModuleModel> java.util.Optional<T> validateAndConvertFromJalo(AbstractRulesModule rulesModule)
protected <T extends ItemModel> java.util.Optional<T> validateAndConvertFromJalo(PK pk)
protected boolean failOnError()
ruleengineservices.system.setup.failOnError
system property, defaults to true.protected <T extends ItemModel> java.util.List<T> convert(java.util.Set<PK> pks)
pks - the set of pksprotected java.util.Map<java.lang.String,java.util.Set<PK>> getInitializationMap()
protected RuleMaintenanceService getRuleMaintenanceService()
public void setRuleMaintenanceService(RuleMaintenanceService ruleMaintenanceService)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
protected ConfigurationService getConfigurationService()
public void setConfigurationService(ConfigurationService configurationService)
protected java.util.function.Predicate<SourceRuleModel> getSourceRuleModelValidator()
public void setSourceRuleModelValidator(java.util.function.Predicate<SourceRuleModel> sourceRuleModelValidator)
protected RuleEngineService getRuleEngineService()
public void setRuleEngineService(RuleEngineService ruleEngineService)
Copyright © 2018 SAP SE. All Rights Reserved.