Class DefaultModuleVersioningService
- java.lang.Object
-
- de.hybris.platform.ruleengine.versioning.impl.DefaultModuleVersioningService
-
- All Implemented Interfaces:
ModuleVersioningService
public class DefaultModuleVersioningService extends java.lang.Object implements ModuleVersioningService
Default (unsupported) implementation of module versioning service
-
-
Constructor Summary
Constructors Constructor Description DefaultModuleVersioningService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertRuleModuleVersion(AbstractRuleEngineRuleModel ruleModel, AbstractRulesModuleModel rulesModule)assert (and change if necessary) the version of the module of the rulevoidassertRuleModuleVersion(AbstractRulesModuleModel moduleModel, java.util.Set<AbstractRuleEngineRuleModel> rules)Given the module, assert it's version in accordance with the provided rulesjava.util.Optional<java.lang.Long>getDeployedModuleVersionForRule(java.lang.String ruleCode, java.lang.String moduleName)get the currently deployed (in the rule engine) version of theAbstractRulesModuleModeljava.util.Optional<java.lang.Long>getModuleVersion(AbstractRuleEngineRuleModel ruleModel)Returns the current version of the rule moduleprotected java.lang.StringgetUnsupportedMessage()
-
-
-
Method Detail
-
getModuleVersion
public java.util.Optional<java.lang.Long> getModuleVersion(AbstractRuleEngineRuleModel ruleModel)
Description copied from interface:ModuleVersioningServiceReturns the current version of the rule module- Specified by:
getModuleVersionin interfaceModuleVersioningService- Parameters:
ruleModel- ruleModel - the AbstractRuleEngineRuleModel instance- Returns:
- Long the module version if applicable, empty optional otherwise
-
assertRuleModuleVersion
public void assertRuleModuleVersion(AbstractRuleEngineRuleModel ruleModel, AbstractRulesModuleModel rulesModule)
Description copied from interface:ModuleVersioningServiceassert (and change if necessary) the version of the module of the rule- Specified by:
assertRuleModuleVersionin interfaceModuleVersioningService- Parameters:
ruleModel- - rule modelrulesModule- instance ofAbstractRulesModuleModelto be assigned as a module for this rule
-
assertRuleModuleVersion
public void assertRuleModuleVersion(AbstractRulesModuleModel moduleModel, java.util.Set<AbstractRuleEngineRuleModel> rules)
Description copied from interface:ModuleVersioningServiceGiven the module, assert it's version in accordance with the provided rules- Specified by:
assertRuleModuleVersionin interfaceModuleVersioningService- Parameters:
moduleModel- - rules module instancerules- - set of rules to assert the module version with
-
getDeployedModuleVersionForRule
public java.util.Optional<java.lang.Long> getDeployedModuleVersionForRule(java.lang.String ruleCode, java.lang.String moduleName)Description copied from interface:ModuleVersioningServiceget the currently deployed (in the rule engine) version of theAbstractRulesModuleModel- Specified by:
getDeployedModuleVersionForRulein interfaceModuleVersioningService- Parameters:
ruleCode- the rule code of the rule associated to the modulemoduleName- the rules module name- Returns:
- the version as
Optional
-
getUnsupportedMessage
protected java.lang.String getUnsupportedMessage()
-
-