Class ProductConfigRuleActionStrategyCheckerImpl
java.lang.Object
de.hybris.platform.sap.productconfig.rules.action.strategy.impl.ProductConfigRuleActionStrategyCheckerImpl
- All Implemented Interfaces:
ProductConfigRuleActionStrategyChecker
public class ProductConfigRuleActionStrategyCheckerImpl
extends Object
implements ProductConfigRuleActionStrategyChecker
default implementation of
ProductConfigRuleActionStrategyChecker-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckCsticPartOfModel(ConfigModel model, AbstractRuleActionRAO action, String prefix, Map<String, CsticModel> csticMap) checks whether the provided cstic is valid in context of the given modelbooleancheckValueAssignable(ConfigModel model, AbstractRuleActionRAO action, String valueToSet, String prefix, Map<String, CsticModel> csticMap) checks whether the given value can be assignedbooleancheckValueForamtable(ConfigModel model, AbstractRuleActionRAO action, String valueToSet, ProductConfigRuleFormatTranslator rulesFormator, String prefix, Map<String, CsticModel> csticMap) checks whether the value can be parsed/formattedbooleancheckValueUnassigned(ConfigModel model, AbstractRuleActionRAO action, String value, String prefix, Map<String, CsticModel> csticMap) checks whether the given value is already assignedprotected ConfigModelFactorygetCstic(ConfigModel model, AbstractRuleActionRAO action, Map<String, CsticModel> csticMap) extracts the cstic from action raosprotected booleanvoidsetConfigModelFactory(ConfigModelFactory configModelFactory) voidsetReadDomainValuesOnDemand(boolean readDomainValuesOnDemand)
-
Constructor Details
-
ProductConfigRuleActionStrategyCheckerImpl
public ProductConfigRuleActionStrategyCheckerImpl()
-
-
Method Details
-
getCstic
public CsticModel getCstic(ConfigModel model, AbstractRuleActionRAO action, Map<String, CsticModel> csticMap) Description copied from interface:ProductConfigRuleActionStrategyCheckerextracts the cstic from action raos- Specified by:
getCsticin interfaceProductConfigRuleActionStrategyChecker- Parameters:
model- config modelaction- rao actioncsticMap- cached cstics- Returns:
- cstic model referenced by the rao action
-
checkCsticPartOfModel
public boolean checkCsticPartOfModel(ConfigModel model, AbstractRuleActionRAO action, String prefix, Map<String, CsticModel> csticMap) Description copied from interface:ProductConfigRuleActionStrategyCheckerchecks whether the provided cstic is valid in context of the given model- Specified by:
checkCsticPartOfModelin interfaceProductConfigRuleActionStrategyChecker- Parameters:
model- config modelaction- rao actionprefix- 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
public boolean checkValueUnassigned(ConfigModel model, AbstractRuleActionRAO action, String value, String prefix, Map<String, CsticModel> csticMap) Description copied from interface:ProductConfigRuleActionStrategyCheckerchecks whether the given value is already assigned- Specified by:
checkValueUnassignedin interfaceProductConfigRuleActionStrategyChecker- Parameters:
model- config modelaction- rao actiovalue- cstic value nameprefix- 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
public boolean checkValueAssignable(ConfigModel model, AbstractRuleActionRAO action, String valueToSet, String prefix, Map<String, CsticModel> csticMap) Description copied from interface:ProductConfigRuleActionStrategyCheckerchecks whether the given value can be assigned- Specified by:
checkValueAssignablein interfaceProductConfigRuleActionStrategyChecker- Parameters:
model- config modelaction- rao actionvalueToSet- cstic value nameprefix- 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
public boolean checkValueForamtable(ConfigModel model, AbstractRuleActionRAO action, String valueToSet, ProductConfigRuleFormatTranslator rulesFormator, String prefix, Map<String, CsticModel> csticMap) Description copied from interface:ProductConfigRuleActionStrategyCheckerchecks whether the value can be parsed/formatted- Specified by:
checkValueForamtablein interfaceProductConfigRuleActionStrategyChecker- Parameters:
model- config modelaction- rao actionvalueToSet- ctsic value namerulesFormator- formator instance to be usedprefix- 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
-
getConfigModelFactory
-
setConfigModelFactory
- Parameters:
configModelFactory- factory for configuration model objects
-
isReadDomainValuesOnDemand
protected boolean isReadDomainValuesOnDemand() -
setReadDomainValuesOnDemand
public void setReadDomainValuesOnDemand(boolean readDomainValuesOnDemand)
-