Interface ProductConfigRuleActionStrategyChecker
- All Known Implementing Classes:
ProductConfigRuleActionStrategyCheckerImpl
public interface ProductConfigRuleActionStrategyChecker
helper class for rule based action strategies. provides common used functionality
-
Method Summary
Modifier and TypeMethodDescriptionbooleancheckCsticPartOfModel(ConfigModel model, AbstractRuleActionRAO action, String actionDescription, Map<String, CsticModel> csticMap) checks whether the provided cstic is valid in context of the given modelbooleancheckValueAssignable(ConfigModel model, AbstractRuleActionRAO action, String value, String actionDescription, Map<String, CsticModel> csticMap) checks whether the given value can be assignedbooleancheckValueForamtable(ConfigModel model, AbstractRuleActionRAO action, String valueToSet, ProductConfigRuleFormatTranslator rulesFormator, String actionDescription, Map<String, CsticModel> csticMap) checks whether the value can be parsed/formattedbooleancheckValueUnassigned(ConfigModel model, AbstractRuleActionRAO action, String value, String actionDescription, Map<String, CsticModel> csticMap) checks whether the given value is already assignedgetCstic(ConfigModel model, AbstractRuleActionRAO action, Map<String, CsticModel> csticMap) extracts the cstic from action raos
-
Method Details
-
getCstic
CsticModel getCstic(ConfigModel model, AbstractRuleActionRAO action, Map<String, CsticModel> csticMap) extracts the cstic from action raos- Parameters:
model- config modelaction- rao actioncsticMap- cached cstics- Returns:
- cstic model referenced by the rao action
-
checkCsticPartOfModel
boolean checkCsticPartOfModel(ConfigModel model, AbstractRuleActionRAO action, String actionDescription, Map<String, CsticModel> csticMap) checks whether the provided cstic is valid in context of the given model- Parameters:
model- config modelaction- rao actionactionDescription- text describing the action, used for loggingcsticMap- cached cstics- Returns:
true, only if the cstic the action refers to is still part of the config model
-
checkValueUnassigned
boolean checkValueUnassigned(ConfigModel model, AbstractRuleActionRAO action, String value, String actionDescription, Map<String, CsticModel> csticMap) checks whether the given value is already assigned- Parameters:
model- config modelaction- rao actiovalue- cstic value nameactionDescription- text describing the action, used for loggingcsticMap- cached cstics- Returns:
true, only if the given cstic value is already assigned to the cstic referenced by the action
-
checkValueAssignable
boolean checkValueAssignable(ConfigModel model, AbstractRuleActionRAO action, String value, String actionDescription, Map<String, CsticModel> csticMap) checks whether the given value can be assigned- Parameters:
model- config modelaction- rao actionvalue- cstic value nameactionDescription- text describing the action, used for loggingcsticMap- cached cstics- Returns:
true, only if the given cstic value can be assigned to the cstic referenced by the action
-
checkValueForamtable
boolean checkValueForamtable(ConfigModel model, AbstractRuleActionRAO action, String valueToSet, ProductConfigRuleFormatTranslator rulesFormator, String actionDescription, Map<String, CsticModel> csticMap) checks whether the value can be parsed/formatted- Parameters:
model- config modelaction- rao actionvalueToSet- ctsic value namerulesFormator- formator instance to be usedactionDescription- text describing the action, used for loggingcsticMap- cached cstics- Returns:
true, only if the given cstic value has the expected format as defined by the cstic referenced by the action
-