Class MockConfigurationService

    • Constructor Detail

      • MockConfigurationService

        public MockConfigurationService()
    • Method Detail

      • createDefaultConfiguration

        public ConfigModel createDefaultConfiguration​(KBKey kbKey)
        Description copied from interface: ProductConfigurationService
        Based on the hybris product code, provided via the KBKey.productCode, the configuration engine will provide a default configuration for the requested product.
        Specified by:
        createDefaultConfiguration in interface ProductConfigurationService
        Parameters:
        kbKey - The product code for the configurable product
        Returns:
        The configurable product with default configuration
      • createConfigurationForVariant

        public ConfigModel createConfigurationForVariant​(java.lang.String baseProductCode,
                                                         java.lang.String variantProductCode)
        Description copied from interface: ProductConfigurationService
        Based on the hybris product code, the configuration engine will provide a configuration for the requested product variant.
        Specified by:
        createConfigurationForVariant in interface ProductConfigurationService
        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
      • retrieveExternalConfiguration

        public java.lang.String retrieveExternalConfiguration​(java.lang.String configId)
        Description copied from interface: ProductConfigurationService
        Retrieve the actual configuration model for the requested configId in a XML format.
        Specified by:
        retrieveExternalConfiguration in interface ProductConfigurationService
        Parameters:
        configId - Unique configuration ID
        Returns:
        The actual configuration as XML string
      • createConfigurationFromExternal

        public ConfigModel createConfigurationFromExternal​(KBKey kbKey,
                                                           java.lang.String externalConfiguration)
        Description copied from interface: ProductConfigurationService
        Creates a configuration from the external string representation (which contains the configuration in XML format)
        Specified by:
        createConfigurationFromExternal in interface ProductConfigurationService
        Parameters:
        kbKey - Key attributes needed to create a model
        externalConfiguration - Configuration as XML string
        Returns:
        Configuration model
      • releaseSession

        public void releaseSession​(java.lang.String configId)
        Description copied from interface: ProductConfigurationService
        Releases the configuration sessions identified by the provided ID and all associated resources. Accessing the session afterwards is not possible anymore.
        Specified by:
        releaseSession in interface ProductConfigurationService
        Parameters:
        configId - session id
      • hasKbForDate

        public boolean hasKbForDate​(java.lang.String productCode,
                                    java.util.Date kbDate)
        Description copied from interface: ProductConfigurationService
        Checks whether a kb version exists for a given product and date
        Specified by:
        hasKbForDate in interface ProductConfigurationService
        Parameters:
        productCode - product code
        kbDate - date of the knowledgebase
        Returns:
        true if KB version for the date exists
      • hasKbForVersion

        public boolean hasKbForVersion​(KBKey kbKey,
                                       java.lang.String externalConfig)
        Description copied from interface: ProductConfigurationService
        Checks whether kb version specified in the external config still exists
        Specified by:
        hasKbForVersion in interface ProductConfigurationService
        Parameters:
        kbKey - knowledgebase key which is used to extract product code
        externalConfig - external configuration
        Returns:
        true if KB version specified in the external config exists
      • extractKbKey

        public KBKey extractKbKey​(java.lang.String productCode,
                                  java.lang.String externalConfig)
        Description copied from interface: ProductConfigurationService
        Extracts the KBKey from the external configuration
        Specified by:
        extractKbKey in interface ProductConfigurationService
        Parameters:
        productCode - product code
        externalConfig - external config
        Returns:
        returns the kBKey of the given external config