Interface ConfigurationFacade

All Known Implementing Classes:
ConfigurationFacadeImpl

public interface ConfigurationFacade
Facade for Product Configuration.
  • Method Details

    • getConfiguration

      ConfigurationData getConfiguration(KBKeyData kbKey)
      Get the default configuration for the given Knowledge Base. In case the product identified by the productCode of the KBkey is a variant, the runtime configuration of the corresponding base product is instantiated.
      Parameters:
      kbKey - key of the Knowledge Base
      Returns:
      default configuration
    • getConfiguration

      default ConfigurationData getConfiguration(KBKeyData kbKey, boolean forceReset)
      Get the default configuration for the given Knowledge Base. In case the product identified by the productCode of the KBkey is a variant, the runtime configuration of the corresponding base product is instantiated. If parameter forceReset is true it will always return a new configuration independent of an existing configuration for the given product code.
      Parameters:
      kbKey - key of the Knowledge Base
      forceReset - If true it returns a new configuration
      Returns:
      default configuration
    • updateConfiguration

      void updateConfiguration(ConfigurationData configuration)
      Update the configuration with the values provided
      Parameters:
      configuration - actual configuration
    • getConfiguration

      ConfigurationData getConfiguration(ConfigurationData configuration)
      Read the actual configuration from the Backend. Current values in the model will be overwritten. The result is expected to contain domain values, as it's used for the interactive configuration
      Parameters:
      configuration - Configuration to be refreshed. Should contain the current group for display in ConfigurationData.getGroupIdToDisplay(). If this is null, the first group will become the current one
      Returns:
      actual configuration
    • getNumberOfErrors

      int getNumberOfErrors(String configId)
      Get the number of errors (conflict, not filled mandatory fields), as it is set at the cart item
      Parameters:
      configId - ID of the configuration
      Returns:
      Total number of errors
    • getNumberOfIncompleteCstics

      int getNumberOfIncompleteCstics(String configId)
      Get the number of incomplete characteristics (not filled mandatory fields)
      Parameters:
      configId - Configuration ID
      Returns:
      Number of incomplete characteristics
    • getNumberOfSolvableConflicts

      int getNumberOfSolvableConflicts(String configId)
      Get the number of solvable conflicts
      Parameters:
      configId - Configuration ID
      Returns:
      Number of solvable conflicts
    • isConfigurationAvailable

      default boolean isConfigurationAvailable(String configId)
      Check if a given configId is known by the configuration engine.
      Parameters:
      configId - ID of the configuration
      Returns:
      TRUE if the configuration exist, otherwise FALSE
    • getConfigurationFromTemplate

      default ConfigurationData getConfigurationFromTemplate(KBKeyData kbKey, String configIdTemplate)
      Copies the values of another configuration that is already existing into a new configuration that is managed by commerce. This API does not support product variants
      Parameters:
      kbKey - Key of the knowledge base
      configIdTemplate - ID of configuration that we use as template
      Returns:
      Configuration with existing values applied