Interface ProductConfigurationService

All Known Subinterfaces:
ProductConfigurationRuleAwareService
All Known Implementing Classes:
ProductConfigurationRuleAwareServiceImpl, ProductConfigurationServiceImpl

public interface ProductConfigurationService
ProductConfigurationService provides access to the configuration engine implementation.
  • Method Details

    • createDefaultConfiguration

      ConfigModel createDefaultConfiguration(KBKey kbKey)
      Based on the hybris product code, provided via the KBKey.productCode, the configuration engine will provide a default configuration for the requested product.
      Parameters:
      kbKey - The product code for the configurable product
      Returns:
      The configurable product with default configuration
    • createConfigurationForVariant

      ConfigModel createConfigurationForVariant(String baseProductCode, String variantProductCode)
      Based on the hybris product code, the configuration engine will provide a configuration for the requested product variant.
      Parameters:
      baseProductCode - The product code for the configurable base product
      variantProductCode - The product code for the specific product variant
      Returns:
      The configurable product with default configuration
    • updateConfiguration

      void updateConfiguration(ConfigModel model)
      Update the configuration model within the configuration engine.
      Parameters:
      model - Updated model
    • retrieveConfigurationModel

      @Deprecated(since="2211", forRemoval=true) ConfigModel retrieveConfigurationModel(String configId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieve the actual configuration model for the requested configId in the ConfigModel format.
      Parameters:
      configId - Unique configuration ID
      Returns:
      The actual configuration
    • retrieveExternalConfiguration

      String retrieveExternalConfiguration(String configId)
      Retrieve the actual configuration model for the requested configId in a XML format.
      Parameters:
      configId - Unique configuration ID
      Returns:
      The actual configuration as XML string
    • createConfigurationFromExternal

      ConfigModel createConfigurationFromExternal(KBKey kbKey, String externalConfiguration)
      Creates a configuration from the external string representation (which contains the configuration in XML format)
      Parameters:
      externalConfiguration - Configuration as XML string
      kbKey - Key attributes needed to create a model
      Returns:
      Configuration model
    • createConfigurationFromExternal

      default ConfigModel createConfigurationFromExternal(KBKey kbKey, String externalConfiguration, String cartEntryKey)
      Creates a configuration from the external string representation (which contains the configuration in XML format) and links it immediately with the given cart entry key
      Parameters:
      externalConfiguration - Configuration as XML string
      kbKey - Key attributes needed to create a model
      cartEntryKey - cartEntryKey this config belongs to
      Returns:
      Configuration model
    • createConfigurationFromExternal

      default ConfigModel createConfigurationFromExternal(KBKey kbKey, String externalConfiguration, String cartEntryKey, ConfigurationRetrievalOptions retrievalOptions)
      Creates a configuration from the external string representation (which contains the configuration in XML format) and links it immediately with the given cart entry key
      Parameters:
      externalConfiguration - Configuration as XML string
      kbKey - Key attributes needed to create a model
      cartEntryKey - cartEntryKey this config belongs to
      retrievalOptions - options to modify behavior
      Returns:
      Configuration model
    • createConfigurationFromExternalSource

      ConfigModel createConfigurationFromExternalSource(Configuration extConfig)
      /** Create a ConfigModel based on a Configuration for the provided product code.
      Parameters:
      extConfig - Configuration in a data structure
      Returns:
      Configuration model
    • releaseSession

      void releaseSession(String configId)
      Releases the configuration sessions identified by the provided ID and all associated resources. Accessing the session afterwards is not possible anymore.
      Parameters:
      configId - session id
    • releaseSession

      default void releaseSession(String configId, boolean keepModel)
      Releases the configuration sessions identified by the provided ID and all associated resources. Accessing the session afterwards is not possible anymore.
      Parameters:
      configId - session id
      keepModel - signifies whether config model should be kept despite releasing session
    • calculateNumberOfIncompleteCsticsAndSolvableConflicts

      int calculateNumberOfIncompleteCsticsAndSolvableConflicts(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
    • hasKbForDate

      boolean hasKbForDate(String productCode, Date kbDate)
      Checks whether a kb version exists for a given product and date
      Parameters:
      productCode - product code
      kbDate - date of the knowledgebase
      Returns:
      true if KB version for the date exists
    • isKbVersionValid

      boolean isKbVersionValid(KBKey kbKey)
      Checks whether kb version exists and is valid for specified date
      Parameters:
      kbKey - knowledgebase key
      Returns:
      true if KB version exists and is valid
    • getTotalNumberOfIssues

      int getTotalNumberOfIssues(ConfigModel configModel)
      Returns the total number of issues (number of solvable conflicts + number of incomplete cstics)
      Parameters:
      configModel - configuration model
      Returns:
      total number of issues
    • countNumberOfIncompleteCstics

      default int countNumberOfIncompleteCstics(InstanceModel rootInstance)
      Returns the number of incomplete cstics
      Parameters:
      rootInstance - InstanceModel
      Returns:
      number of incomplete cstics
    • countNumberOfSolvableConflicts

      default int countNumberOfSolvableConflicts(ConfigModel configModel)
      Returns the number of inconsistent cstics (solvable conflicts)
      Parameters:
      configModel - ConfigModel
      Returns:
      number of inconsistent cstics
    • extractKbKey

      KBKey extractKbKey(String productCode, String externalConfig)
      Extracts the KBKey from the external configuration
      Parameters:
      externalConfig - external config
      productCode - product code
      Returns:
      returns the kBKey of the given external config
    • retrieveConfigurationModel

      default ConfigModel retrieveConfigurationModel(String configId, String currentGroup)
      Reads the entire configuration without domain values, except for the given groupId, in contrast to retrieveConfigurationModel(String) which reads all domain values for all groups. Hence this method will execute faster.
      Parameters:
      configId - runtime configuration id
      currentGroup - for which domain values are calculated and fetched
      Returns:
      config model without domain values, except for the given groupId
    • retrieveConfigurationOverview

      default ConfigModel retrieveConfigurationOverview(String configId)
      Reads entire configuration without domain values. So this call can be used when the actual data of the configuration is required, without offering to change it.
      Parameters:
      configId - runtime configuration id
      Returns:
      entire config model without domain values