Class DefaultRuleEngineCronJobLauncher
- java.lang.Object
-
- de.hybris.platform.ruleengineservices.jobs.impl.DefaultRuleEngineCronJobLauncher
-
- All Implemented Interfaces:
RuleEngineCronJobLauncher
public class DefaultRuleEngineCronJobLauncher extends java.lang.Object implements RuleEngineCronJobLauncher
Default implementation of the rule engine cron job launcher
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringALL_MODULES_INIT_JOB_CODEprotected static java.lang.StringALL_MODULES_INIT_PERFORMABLE_BEAN_NAMEprotected static java.lang.StringCOMPILE_PUBLISH_JOB_CODE_TEMPLATEprotected static java.lang.StringCOMPILE_PUBLISH_PERFORMABLE_BEAN_NAMEprotected static java.lang.StringMODULE_INIT_JOB_CODE_TEMPLATEprotected static java.lang.StringMODULE_INIT_PERFORMABLE_BEAN_NAMEprotected static java.lang.StringMODULES_SYNCH_JOB_CODE_TEMPLATEprotected static java.lang.StringMODULES_SYNCH_PERFORMABLE_BEAN_NAMEprotected static java.lang.StringUNDEPLOY_JOB_CODE_TEMPLATEprotected static java.lang.StringUNDEPLOY_PERFORMABLE_BEAN_NAME
-
Constructor Summary
Constructors Constructor Description DefaultRuleEngineCronJobLauncher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<java.lang.String>getAllRuleModuleNames()protected L10NServicegetL10nService()protected intgetMaximumNumberOfParallelCronJobs()protected java.util.List<java.lang.String>getPossibleJobCodes(java.lang.String template)protected java.util.List<java.lang.String>getPossibleModuleSyncJobCodes()protected java.util.List<java.lang.String>getPossibleModuleSyncJobCodes(java.lang.String moduleName)protected RuleEngineCronJobSupplierFactorygetRuleEngineCronJobSupplierFactory()protected RuleEngineJobServicegetRuleEngineJobService()protected RulesModuleDaogetRulesModuleDao()voidsetL10nService(L10NService l10nService)voidsetMaximumNumberOfParallelCronJobs(int maximumNumberOfParallelCronJobs)voidsetRuleEngineCronJobSupplierFactory(RuleEngineCronJobSupplierFactory ruleEngineCronJobSupplierFactory)voidsetRuleEngineJobService(RuleEngineJobService ruleEngineJobService)voidsetRulesModuleDao(RulesModuleDao rulesModuleDao)RuleEngineCronJobModeltriggerAllModulesInitialization()Trigger the whole rule engine (for all modules) initializationRuleEngineCronJobModeltriggerCompileAndPublish(java.util.List<SourceRuleModel> rules, java.lang.String moduleName, boolean enableIncrementalUpdate)Trigger the compilation and publishing of specified rules for a moduleRuleEngineCronJobModeltriggerModuleInitialization(java.lang.String moduleName)Trigger the specified module initialization taskRuleEngineCronJobModeltriggerSynchronizeModules(java.lang.String srcModuleName, java.lang.String targetModuleName)Trigger the modules synchronization taskRuleEngineCronJobModeltriggerUndeployRules(java.util.List<SourceRuleModel> rules, java.lang.String moduleName)Trigger the specified rules undeployment processprotected voidverifyIfJobsAreNotRunning(java.lang.String... jobCodes)
-
-
-
Field Detail
-
COMPILE_PUBLISH_PERFORMABLE_BEAN_NAME
protected static final java.lang.String COMPILE_PUBLISH_PERFORMABLE_BEAN_NAME
- See Also:
- Constant Field Values
-
COMPILE_PUBLISH_JOB_CODE_TEMPLATE
protected static final java.lang.String COMPILE_PUBLISH_JOB_CODE_TEMPLATE
- See Also:
- Constant Field Values
-
UNDEPLOY_PERFORMABLE_BEAN_NAME
protected static final java.lang.String UNDEPLOY_PERFORMABLE_BEAN_NAME
- See Also:
- Constant Field Values
-
UNDEPLOY_JOB_CODE_TEMPLATE
protected static final java.lang.String UNDEPLOY_JOB_CODE_TEMPLATE
- See Also:
- Constant Field Values
-
MODULES_SYNCH_PERFORMABLE_BEAN_NAME
protected static final java.lang.String MODULES_SYNCH_PERFORMABLE_BEAN_NAME
- See Also:
- Constant Field Values
-
MODULES_SYNCH_JOB_CODE_TEMPLATE
protected static final java.lang.String MODULES_SYNCH_JOB_CODE_TEMPLATE
- See Also:
- Constant Field Values
-
MODULE_INIT_PERFORMABLE_BEAN_NAME
protected static final java.lang.String MODULE_INIT_PERFORMABLE_BEAN_NAME
- See Also:
- Constant Field Values
-
MODULE_INIT_JOB_CODE_TEMPLATE
protected static final java.lang.String MODULE_INIT_JOB_CODE_TEMPLATE
- See Also:
- Constant Field Values
-
ALL_MODULES_INIT_PERFORMABLE_BEAN_NAME
protected static final java.lang.String ALL_MODULES_INIT_PERFORMABLE_BEAN_NAME
- See Also:
- Constant Field Values
-
ALL_MODULES_INIT_JOB_CODE
protected static final java.lang.String ALL_MODULES_INIT_JOB_CODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
triggerCompileAndPublish
public RuleEngineCronJobModel triggerCompileAndPublish(java.util.List<SourceRuleModel> rules, java.lang.String moduleName, boolean enableIncrementalUpdate)
Description copied from interface:RuleEngineCronJobLauncherTrigger the compilation and publishing of specified rules for a module- Specified by:
triggerCompileAndPublishin interfaceRuleEngineCronJobLauncher- Parameters:
rules- a list ofSourceRuleModelto compile and publishmoduleName- a kie module nameenableIncrementalUpdate- boolean indicating whether the incremental update of rule engine must be employed- Returns:
- the instance of triggered
RuleEngineCronJobModel
-
triggerUndeployRules
public RuleEngineCronJobModel triggerUndeployRules(java.util.List<SourceRuleModel> rules, java.lang.String moduleName)
Description copied from interface:RuleEngineCronJobLauncherTrigger the specified rules undeployment process- Specified by:
triggerUndeployRulesin interfaceRuleEngineCronJobLauncher- Parameters:
rules- a list ofSourceRuleModelto undeploymoduleName- a kie module name to undeploy the rules for- Returns:
- the instance of triggered
RuleEngineCronJobModel
-
triggerSynchronizeModules
public RuleEngineCronJobModel triggerSynchronizeModules(java.lang.String srcModuleName, java.lang.String targetModuleName)
Description copied from interface:RuleEngineCronJobLauncherTrigger the modules synchronization task- Specified by:
triggerSynchronizeModulesin interfaceRuleEngineCronJobLauncher- Parameters:
srcModuleName- a name of the kie module to synchronise the rules fromtargetModuleName- a name of the kie module to synchronise the rules to- Returns:
- the instance of triggered
RuleEngineCronJobModel
-
triggerModuleInitialization
public RuleEngineCronJobModel triggerModuleInitialization(java.lang.String moduleName)
Description copied from interface:RuleEngineCronJobLauncherTrigger the specified module initialization task- Specified by:
triggerModuleInitializationin interfaceRuleEngineCronJobLauncher- Parameters:
moduleName- a name of the kie module to initialize- Returns:
- the instance of triggered
RuleEngineCronJobModel
-
triggerAllModulesInitialization
public RuleEngineCronJobModel triggerAllModulesInitialization()
Description copied from interface:RuleEngineCronJobLauncherTrigger the whole rule engine (for all modules) initialization- Specified by:
triggerAllModulesInitializationin interfaceRuleEngineCronJobLauncher- Returns:
- the instance of triggered
RuleEngineCronJobModel
-
getPossibleModuleSyncJobCodes
protected java.util.List<java.lang.String> getPossibleModuleSyncJobCodes()
-
getPossibleModuleSyncJobCodes
protected java.util.List<java.lang.String> getPossibleModuleSyncJobCodes(java.lang.String moduleName)
-
getPossibleJobCodes
protected java.util.List<java.lang.String> getPossibleJobCodes(java.lang.String template)
-
getAllRuleModuleNames
protected java.util.List<java.lang.String> getAllRuleModuleNames()
-
verifyIfJobsAreNotRunning
protected void verifyIfJobsAreNotRunning(java.lang.String... jobCodes)
-
getRuleEngineJobService
protected RuleEngineJobService getRuleEngineJobService()
-
setRuleEngineJobService
public void setRuleEngineJobService(RuleEngineJobService ruleEngineJobService)
-
getRulesModuleDao
protected RulesModuleDao getRulesModuleDao()
-
setRulesModuleDao
public void setRulesModuleDao(RulesModuleDao rulesModuleDao)
-
getRuleEngineCronJobSupplierFactory
protected RuleEngineCronJobSupplierFactory getRuleEngineCronJobSupplierFactory()
-
setRuleEngineCronJobSupplierFactory
public void setRuleEngineCronJobSupplierFactory(RuleEngineCronJobSupplierFactory ruleEngineCronJobSupplierFactory)
-
getMaximumNumberOfParallelCronJobs
protected int getMaximumNumberOfParallelCronJobs()
-
setMaximumNumberOfParallelCronJobs
public void setMaximumNumberOfParallelCronJobs(int maximumNumberOfParallelCronJobs)
-
getL10nService
protected L10NService getL10nService()
-
setL10nService
public void setL10nService(L10NService l10nService)
-
-