Class DefaultConfigurationCopyStrategyImpl

    • Constructor Detail

      • DefaultConfigurationCopyStrategyImpl

        public DefaultConfigurationCopyStrategyImpl()
    • Method Detail

      • deepCopyConfiguration

        public java.lang.String deepCopyConfiguration​(java.lang.String configId,
                                                      java.lang.String productCode,
                                                      java.lang.String externalConfiguration,
                                                      boolean force)
        Description copied from interface: ConfigurationCopyStrategy
        Deep Copies a configuration. The implementation can decide if a deep copy is needed; if not, the input ID is simply returned.
        Specified by:
        deepCopyConfiguration in interface ConfigurationCopyStrategy
        Parameters:
        configId - ID of existing configuration
        productCode - optional - product code of configurable product to be copied
        externalConfiguration - optional - externalConfiguration, if provided this will be used as source, instead of obtaining the external config via the provided configId
        force - if true a deep copy is enforced
        Returns:
        ID of new configuration if a deep copy was performed; input otherwise
      • finalizeClone

        public void finalizeClone​(AbstractOrderModel source,
                                  AbstractOrderModel target)
        Description copied from interface: ConfigurationCopyStrategy
        Hook to be called after a document with a confguration 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 extenal seriliazed form, no more actions are necessary (SSC).
        Specified by:
        finalizeClone in interface ConfigurationCopyStrategy
        Parameters:
        source - source document
        target - target document