Class DefaultProductConfigurationService

java.lang.Object
de.hybris.platform.sap.sapproductconfigsomservices.prodconf.impl.DefaultProductConfigurationService
All Implemented Interfaces:
ProductConfigurationSomService

public class DefaultProductConfigurationService extends Object implements ProductConfigurationSomService
Default implementation for ProductConfigurationSomService
  • Constructor Details

    • DefaultProductConfigurationService

      public DefaultProductConfigurationService()
  • Method Details

    • getProductConfigurationService

      protected de.hybris.platform.sap.productconfig.services.intf.ProductConfigurationService getProductConfigurationService()
      Returns:
      the productConfigurationService
    • setProductConfigurationService

      public void setProductConfigurationService(de.hybris.platform.sap.productconfig.services.intf.ProductConfigurationService productConfigurationService)
      Parameters:
      productConfigurationService - the productConfigurationService to set
    • setIntoSession

      public void setIntoSession(String itemKey, String configId)
      Description copied from interface: ProductConfigurationSomService
      Sets ID of Product Configuration session into hybris session to enable UI for reconfiguration
      Specified by:
      setIntoSession in interface ProductConfigurationSomService
      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
    • getSessionAccessService

      public de.hybris.platform.sap.productconfig.services.SessionAccessService getSessionAccessService()
      Returns:
      the sessionAccessService
    • setSessionAccessService

      public void setSessionAccessService(de.hybris.platform.sap.productconfig.services.SessionAccessService sessionAccessService)
      Parameters:
      sessionAccessService - the sessionAccessService to set
    • isInSession

      public boolean isInSession(String itemKey)
      Description copied from interface: ProductConfigurationSomService
      To check if key is in session
      Specified by:
      isInSession in interface ProductConfigurationSomService
      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

      public String getExternalConfiguration(String itemKey)
      Description copied from interface: ProductConfigurationSomService
      To get external configuration.
      Specified by:
      getExternalConfiguration in interface ProductConfigurationSomService
      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

      public de.hybris.platform.sap.productconfig.runtime.interf.model.ConfigModel getConfigModel(String productCode, String externalConfiguration)
      Description copied from interface: ProductConfigurationSomService
      Creates a configuration runtime representation from a product and an external configuration.
      Specified by:
      getConfigModel in interface ProductConfigurationSomService
      Parameters:
      productCode - Product ID
      externalConfiguration - external configuration as XML string
      Returns:
      Configuration runtime representation
    • getTotalPrice

      public Double getTotalPrice(String itemKey)
      Description copied from interface: ProductConfigurationSomService
      Returns the configuration total price, supposed the configuration ID is available in the hybris session.
      Specified by:
      getTotalPrice in interface ProductConfigurationSomService
      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

      public String getGetConfigId(String itemKey)
      Description copied from interface: ProductConfigurationSomService
      Returns the configuration ID, supposed it is available in the hybris session
      Specified by:
      getGetConfigId in interface ProductConfigurationSomService
      Parameters:
      itemKey - item key
      Returns:
      Configuration ID
    • getConfigIdFromSession

      protected String getConfigIdFromSession(String itemKey)
      Fetches config ID from hybris session
      Parameters:
      itemKey -
      Returns:
      Config ID