Interface ProductConfigurationSomService

  • All Known Implementing Classes:
    DefaultProductConfigurationService

    public interface ProductConfigurationSomService
    Handles product configuration for cart entries: Maintains the session attributes, converts an external representation into a runtime object and vice versa.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      ConfigModel getConfigModel​(java.lang.String productCode, java.lang.String externalConfiguration)
      Creates a configuration runtime representation from a product and an external configuration.
      java.lang.String getExternalConfiguration​(java.lang.String itemKey)
      To get external configuration.
      java.lang.String getGetConfigId​(java.lang.String itemKey)
      Returns the configuration ID, supposed it is available in the hybris session
      java.lang.Double getTotalPrice​(java.lang.String itemKey)
      Returns the configuration total price, supposed the configuration ID is available in the hybris session.
      boolean isInSession​(java.lang.String itemKey)
      To check if key is in session
      void setIntoSession​(java.lang.String itemKey, java.lang.String configId)
      Sets ID of Product Configuration session into hybris session to enable UI for reconfiguration
    • Method Detail

      • setIntoSession

        void setIntoSession​(java.lang.String itemKey,
                            java.lang.String configId)
        Sets ID of Product Configuration session into hybris session to enable UI for reconfiguration
        Parameters:
        itemKey - Key of cart item. Corresponds to the BusinessObject.getHandle() attribute of the BOL item, or to the cart entry PK of the hybris cart in case the backend is down
        configId - ID of the configuration runtime object. The configurator is capable of accessing the session via this ID
      • isInSession

        boolean isInSession​(java.lang.String itemKey)
        To check if key is in session
        Parameters:
        itemKey - Key of cart item. Corresponds to the BusinessObject.getHandle() attribute of the BOL item, or to the cart entry PK of the hybris cart in case the backend is down
        Returns:
        Is a configuration is already available in the hybris session?
      • getExternalConfiguration

        java.lang.String getExternalConfiguration​(java.lang.String itemKey)
        To get external configuration.
        Parameters:
        itemKey - Key of cart item. Corresponds to the BusinessObject.getHandle() attribute of the BOL item, or to the cart entry PK of the hybris cart in case the backend is down
        Returns:
        The external configuration, supposed the configuration is available in the hybris session
      • getConfigModel

        ConfigModel getConfigModel​(java.lang.String productCode,
                                   java.lang.String externalConfiguration)
        Creates a configuration runtime representation from a product and an external configuration.
        Parameters:
        productCode - Product ID
        externalConfiguration - external configuration as XML string
        Returns:
        Configuration runtime representation
      • getTotalPrice

        java.lang.Double getTotalPrice​(java.lang.String itemKey)
        Returns the configuration total price, supposed the configuration ID is available in the hybris session.
        Parameters:
        itemKey - Key of cart item. Corresponds to the BusinessObject.getHandle() attribute of the BOL item, or to the cart entry PK of the hybris cart in case the backend is down
        Returns:
        Total price
      • getGetConfigId

        java.lang.String getGetConfigId​(java.lang.String itemKey)
        Returns the configuration ID, supposed it is available in the hybris session
        Parameters:
        itemKey - item key
        Returns:
        Configuration ID