Interface SessionAccessService

  • All Known Implementing Classes:
    DummySessionAccessService, SessionAccessServiceImpl

    public interface SessionAccessService
    Accessing the session to set and read product configuration related entities like UIStatus or runtime configuration ID per cart entry
    • Field Detail

      • PRODUCT_CONFIG_SESSION_ATTRIBUTE_CONTAINER

        static final java.lang.String PRODUCT_CONFIG_SESSION_ATTRIBUTE_CONTAINER
        cache key of product configuration cache container
        See Also:
        Constant Field Values
    • Method Detail

      • getSessionId

        @Deprecated(since="1811",
                    forRemoval=true)
        java.lang.String getSessionId()
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 18.11.0 - call {@link SessionService#getCurrentSession()#getSessionId()}
        returns the unique session id
        Returns:
        session id
      • setConfigIdForCartEntry

        void setConfigIdForCartEntry​(java.lang.String cartEntryKey,
                                     java.lang.String configId)
        Stores configuration ID for a cart entry key into the session
        Parameters:
        cartEntryKey - String representation of the cart entry primary key
        configId - ID of a runtime configuration object
      • getConfigIdForCartEntry

        java.lang.String getConfigIdForCartEntry​(java.lang.String cartEntryKey)
        Retrieves config identifier from the session for a given cart entry key
        Parameters:
        cartEntryKey - String representation of the cart entry primary key
        Returns:
        ID of a runtime configuration object
      • getUiStatusForCartEntry

        <T> T getUiStatusForCartEntry​(java.lang.String cartEntryKey)
        Retrieves object from the session for a given cart entry key
        Parameters:
        cartEntryKey - String representation of the cart entry primary key
        Returns:
        ui status for cart entry
      • getUiStatusForProduct

        <T> T getUiStatusForProduct​(java.lang.String productKey)
        Retrieves object from the session for a given cart entry key
        Parameters:
        productKey - Product key
        Returns:
        ui status for product
      • setUiStatusForCartEntry

        void setUiStatusForCartEntry​(java.lang.String cartEntryKey,
                                     java.lang.Object uiStatus)
        Stores object for a cart entry key into the session
        Parameters:
        cartEntryKey - String representation of the cart entry primary key
        uiStatus - ui status for cart entry
      • setUiStatusForProduct

        void setUiStatusForProduct​(java.lang.String productKey,
                                   java.lang.Object uiStatus)
        Stores object for a product key into the session
        Parameters:
        productKey - Product key
        uiStatus - ui status for product
      • removeUiStatusForCartEntry

        void removeUiStatusForCartEntry​(java.lang.String cartEntryKey)
        Removes object for a cart entry
        Parameters:
        cartEntryKey - String representation of the cart entry primary key
      • removeUiStatusForProduct

        void removeUiStatusForProduct​(java.lang.String productKey)
        Removes object for a product
        Parameters:
        productKey - Product key
      • getCartEntryForConfigId

        java.lang.String getCartEntryForConfigId​(java.lang.String configId)
        Retrieves cart entry key belonging to a specific config ID
        Parameters:
        configId - id of the configuration
        Returns:
        String representation of the cart entry primary key
      • setCartEntryForProduct

        @Deprecated(since="1808",
                    forRemoval=true)
        void setCartEntryForProduct​(java.lang.String productKey,
                                    java.lang.String cartEntryId)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 18.08.0 - only link cart entries to configs and configs to products, no direct linking.
        Stores cart entry in session per product key
        Parameters:
        productKey - product key
        cartEntryId - String representation of the cart entry primary key
      • getCartEntryForProduct

        @Deprecated(since="1808",
                    forRemoval=true)
        java.lang.String getCartEntryForProduct​(java.lang.String productKey)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 18.08.0 - only link cart entries to configs and configs to products, no direct linking.
        Retrieves cart entry key per product
        Parameters:
        productKey - product key
        Returns:
        String representation of the cart entry primary key
      • removeCartEntryForProduct

        @Deprecated(since="1808",
                    forRemoval=true)
        void removeCartEntryForProduct​(java.lang.String productKey)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 18.08.0 - only link cart entries to configs and configs to products, no direct linking.
        Removes cart entry key for product
        Parameters:
        productKey - product key
      • removeConfigIdForCartEntry

        void removeConfigIdForCartEntry​(java.lang.String cartEntryKey)
        Removes config ID for cart entry
        Parameters:
        cartEntryKey - cart entry key
      • removeSessionArtifactsForCartEntry

        void removeSessionArtifactsForCartEntry​(java.lang.String cartEntryId)
        Removes all session artifacts belonging to a cart entry
        Parameters:
        cartEntryId - cart entry key
        productKey - product key
      • getCachedNameMap

        @Deprecated(since="1811",
                    forRemoval=true)
        java.util.Map<java.lang.String,​ClassificationSystemCPQAttributesContainer> getCachedNameMap()
        Deprecated, for removal: This API element is subject to removal in a future version.
        call ProductConfigurationCacheAccessService#getCachedNameMap() instead
        Returns:
        Map of names from the hybris classification system
        Since:
        18.11.0
      • getSolrIndexedProperties

        @Deprecated(since="1811",
                    forRemoval=true)
        java.util.Set<java.lang.String> getSolrIndexedProperties()
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 18.11.0 - no longer cached
        Returns:
        Set of indexed properties
      • setSolrIndexedProperties

        @Deprecated(since="1811",
                    forRemoval=true)
        void setSolrIndexedProperties​(java.util.Set<java.lang.String> solrTypes)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 18.11.0 - no longer cached
        Stores set of indexed properties
        Parameters:
        solrTypes - solr types to be stored
      • getConfigurationProvider

        @Deprecated(since="1811",
                    forRemoval=true)
        ConfigurationProvider getConfigurationProvider()
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 18.11.0 - caching decision is moved to ProviderFactory
        get the configuration provider for this session
        Returns:
        Configuration provider
      • setPricingProvider

        @Deprecated(since="1811",
                    forRemoval=true)
        void setPricingProvider​(PricingProvider provider)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 18.11.0 - caching decision is moved to ProviderFactory
        cache the pricing provider in this session
        Parameters:
        provider - provider to cache
      • getPricingProvider

        @Deprecated(since="1811",
                    forRemoval=true)
        PricingProvider getPricingProvider()
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 18.11.0 - caching decision is moved to ProviderFactory
        get the pricing provider for this session
        Returns:
        Configuration provider
      • setConfigurationProvider

        @Deprecated(since="1811",
                    forRemoval=true)
        void setConfigurationProvider​(ConfigurationProvider provider)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 18.11.0 - caching decision is moved to ProviderFactory
        cache the pricing provider in this session
        Parameters:
        provider - provider to cache
      • getConfigurationModelEngineState

        @Deprecated(since="1811",
                    forRemoval=true)
        ConfigModel getConfigurationModelEngineState​(java.lang.String configId)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Retrieves the configuration model engine state
        Parameters:
        configId - id of the configuration
        Returns:
        Configuration model
      • setConfigurationModelEngineState

        @Deprecated(since="1811",
                    forRemoval=true)
        void setConfigurationModelEngineState​(java.lang.String configId,
                                              ConfigModel configModel)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 18.11.0 - call ProductConfigurationCacheAccessService#setConfigurationModelEngineState(String) instead
        Puts the given config model into the engine state read cache
        Parameters:
        configId - unique config id
        configModel - model to cache
      • removeConfigAttributeStates

        @Deprecated(since="1811",
                    forRemoval=true)
        void removeConfigAttributeStates()
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 18.11.0 - this method is obsolete because the key under which the configuration engine state and price summary states have been saved consists of configuration id an user session id
        Clears the read cache for the configuration engine state and price summary states for the whole user session
      • getPriceSummaryState

        @Deprecated(since="1811",
                    forRemoval=true)
        PriceSummaryModel getPriceSummaryState​(java.lang.String configId)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Retrieves the price summary for a given runtime configuration, specified via its runtime id
        Parameters:
        configId - id of the configuration
        Returns:
        price summary model
      • setAnalyticsProvider

        @Deprecated(since="1811",
                    forRemoval=true)
        void setAnalyticsProvider​(AnalyticsProvider analyticsProvider)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 18.11.0 - caching decision is moved to ProviderFactory
        Puts the given analytics provider into the cached
        Parameters:
        analyticsProvider -
      • removeConfigAttributeState

        @Deprecated(since="1811",
                    forRemoval=true)
        void removeConfigAttributeState​(java.lang.String configId)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Removes the given configuration engine state and price summary model from read cache for engine state
        Parameters:
        configId - unique config id
      • getAnalyticsProvider

        @Deprecated(since="1811",
                    forRemoval=true)
        AnalyticsProvider getAnalyticsProvider()
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 18.11.0 - caching decision is moved to ProviderFactory
        Retrieves an analytics provider from the cached map
        Returns:
        return the cached analytics provider
      • getAnalyticData

        @Deprecated(since="1811",
                    forRemoval=true)
        AnalyticsDocument getAnalyticData​(java.lang.String configId)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Retrieves analytic data from the cached map
        Parameters:
        configId - id of the configuration
        Returns:
        anlytics document
      • purge

        void purge()
        Purges the entire session (with regards to CPQ artifacts)
      • getConfigIdForProduct

        java.lang.String getConfigIdForProduct​(java.lang.String productCode)
        Get the runtime configuration currently associated with the given product
        Parameters:
        productCode - code of product, for which the link to the runtime configuration should be returned
        Returns:
        runtime configuration id that is currently linked to the given product
      • getProductForConfigId

        java.lang.String getProductForConfigId​(java.lang.String configId)
        Get the product for the given runtime configuration id
        Parameters:
        configId - configuration id
        Returns:
        product code if link is present, otherwise null
      • setConfigIdForProduct

        void setConfigIdForProduct​(java.lang.String productCode,
                                   java.lang.String configId)
        Links a product code with a given runtime configuration
        Parameters:
        productCode - code of product, for which the link to the runtime configuration should be created
        configId - runtime configuration id
      • removeConfigIdForProduct

        void removeConfigIdForProduct​(java.lang.String productCode)
        Removes the link between product code and runtime configuration
        Parameters:
        productCode - code of product, for which the link to the runtime configuration should be deleted
      • getCartEntryForDraftConfigId

        java.lang.String getCartEntryForDraftConfigId​(java.lang.String configId)
        get cart entry linked to the given draft configuration
        Parameters:
        configId - runtime configuration id
        Returns:
        cartItemHandle
      • getDraftConfigIdForCartEntry

        java.lang.String getDraftConfigIdForCartEntry​(java.lang.String cartEntryKey)
        gets the config id linked as draft to the given cart entry
        Parameters:
        cartEntryKey - cart entry key
        Returns:
        config Id
      • setDraftConfigIdForCartEntry

        void setDraftConfigIdForCartEntry​(java.lang.String cartEntryKey,
                                          java.lang.String configId)
        Stores darfat configuration ID for a cart entry key into the session
        Parameters:
        cartEntryKey - String representation of the cart entry primary key
        configId - ID of a runtime configuration object
      • removeDraftConfigIdForCartEntry

        void removeDraftConfigIdForCartEntry​(java.lang.String cartEntryKey)
        Removes draft config ID for cart entry
        Parameters:
        cartEntryKey - cart entry key