Interface ConfigurationFacade
- All Known Implementing Classes:
ConfigurationFacadeImpl
public interface ConfigurationFacade
Facade for Product Configuration.
-
Method Summary
Modifier and TypeMethodDescriptiongetConfiguration(ConfigurationData configuration) Read the actual configuration from the Backend.getConfiguration(KBKeyData kbKey) Get the default configuration for the given Knowledge Base.default ConfigurationDatagetConfiguration(KBKeyData kbKey, boolean forceReset) Get the default configuration for the given Knowledge Base.default ConfigurationDatagetConfigurationFromTemplate(KBKeyData kbKey, String configIdTemplate) Copies the values of another configuration that is already existing into a new configuration that is managed by commerce.intgetNumberOfErrors(String configId) Get the number of errors (conflict, not filled mandatory fields), as it is set at the cart itemintgetNumberOfIncompleteCstics(String configId) Get the number of incomplete characteristics (not filled mandatory fields)intgetNumberOfSolvableConflicts(String configId) Get the number of solvable conflictsdefault booleanisConfigurationAvailable(String configId) Check if a given configId is known by the configuration engine.voidupdateConfiguration(ConfigurationData configuration) Update the configuration with the values provided
-
Method Details
-
getConfiguration
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
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 BaseforceReset- If true it returns a new configuration- Returns:
- default configuration
-
updateConfiguration
Update the configuration with the values provided- Parameters:
configuration- actual configuration
-
getConfiguration
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 inConfigurationData.getGroupIdToDisplay(). If this is null, the first group will become the current one- Returns:
- actual configuration
-
getNumberOfErrors
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
Get the number of incomplete characteristics (not filled mandatory fields)- Parameters:
configId- Configuration ID- Returns:
- Number of incomplete characteristics
-
getNumberOfSolvableConflicts
Get the number of solvable conflicts- Parameters:
configId- Configuration ID- Returns:
- Number of solvable conflicts
-
isConfigurationAvailable
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
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 baseconfigIdTemplate- ID of configuration that we use as template- Returns:
- Configuration with existing values applied
-