Interface ConfigurationCopyStrategy
- All Known Implementing Classes:
PersistenceConfigurationCopyStrategyImpl
public interface ConfigurationCopyStrategy
strategy to handle coping/cloning of product configurations
-
Method Summary
Modifier and TypeMethodDescriptiondeepCopyConfiguration(String configId, String productCode, String externalConfiguration, boolean force) Deep Copies a configuration.voidfinalizeClone(AbstractOrderModel source, AbstractOrderModel target) Hook to be called after a document with a configuration attached was cloned.voidfinalizeCloneShallowCopy(AbstractOrderModel source, AbstractOrderModel target) Hook to be called after a document with a configuration attached was cloned.
-
Method Details
-
deepCopyConfiguration
String deepCopyConfiguration(String configId, String productCode, String externalConfiguration, boolean force) Deep Copies a configuration. The implementation can decide if a deep copy is needed; if not, the input ID is simply returned.- Parameters:
configId- ID of existing configurationexternalConfiguration- optional - externalConfiguration, if provided this will be used as source, instead of obtaining the external config via the provided configIdproductCode- optional - product code of configurable product to be copiedforce- iftruea deep copy is enforced- Returns:
- ID of new configuration if a deep copy was performed; input otherwise
-
finalizeClone
Hook to be called after a document with a configuration attached was cloned. It might be necessary to clone the respective configuration, as well. This happens typically were the configuration is stored in an external system and only reference in hybris (CPS). In case the configuration is attached in an external serialized form, no more actions are necessary (SSC).- Parameters:
source- source documenttarget- target document
-
finalizeCloneShallowCopy
Hook to be called after a document with a configuration attached was cloned. It might be necessary to copy (no deep copy) the respective configuration, as well. This happens typically were the configuration is stored in an external system and only reference in hybris (CPS). In case the configuration is attached in an external serialized form, no more actions are necessary (SSC).- Parameters:
source- source documenttarget- target document
-