Interface ProductConfigRuleActionStrategyChecker

All Known Implementing Classes:
ProductConfigRuleActionStrategyCheckerImpl

public interface ProductConfigRuleActionStrategyChecker
helper class for rule based action strategies. provides common used functionality
  • Method Details

    • getCstic

      CsticModel getCstic(ConfigModel model, AbstractRuleActionRAO action, Map<String,CsticModel> csticMap)
      extracts the cstic from action raos
      Parameters:
      model - config model
      action - rao action
      csticMap - 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 model
      action - rao action
      actionDescription - text describing the action, used for logging
      csticMap - 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 model
      action - rao actio
      value - cstic value name
      actionDescription - text describing the action, used for logging
      csticMap - 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 model
      action - rao action
      value - cstic value name
      actionDescription - text describing the action, used for logging
      csticMap - 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 model
      action - rao action
      valueToSet - ctsic value name
      rulesFormator - formator instance to be used
      actionDescription - text describing the action, used for logging
      csticMap - cached cstics
      Returns:
      true, only if the given cstic value has the expected format as defined by the cstic referenced by the action