Interface SessionAccessService

All Known Implementing Classes:
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 Details

    • PRODUCT_CONFIG_SESSION_ATTRIBUTE_CONTAINER

      static final String PRODUCT_CONFIG_SESSION_ATTRIBUTE_CONTAINER
      cache key of product configuration cache container
      See Also:
  • Method Details

    • setConfigIdForCartEntry

      void setConfigIdForCartEntry(String cartEntryKey, 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

      String getConfigIdForCartEntry(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(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(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(String cartEntryKey, 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(String productKey, Object uiStatus)
      Stores object for a product key into the session
      Parameters:
      productKey - Product key
      uiStatus - ui status for product
    • removeUiStatusForCartEntry

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

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

      String getCartEntryForConfigId(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
    • removeConfigIdForCartEntry

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

      void removeSessionArtifactsForCartEntry(String cartEntryId)
      Removes all session artifacts belonging to a cart entry
      Parameters:
      cartEntryId - cart entry key
      productKey - product key
    • purge

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

      String getConfigIdForProduct(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

      String getProductForConfigId(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(String productCode, 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(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

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

      String getDraftConfigIdForCartEntry(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(String cartEntryKey, 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(String cartEntryKey)
      Removes draft config ID for cart entry
      Parameters:
      cartEntryKey - cart entry key