Interface CharonFacade

All Known Implementing Classes:
CharonFacadeImpl, CharonFacadeImplTest.CharonFacadeForDefaultTest

public interface CharonFacade
Facade around charon REST accesses
  • Method Details

    • createDefaultConfiguration

      CPSConfiguration createDefaultConfiguration(de.hybris.platform.sap.productconfig.runtime.interf.KBKey kbKey)
      Create default configuration and handle cookies
      Parameters:
      kbKey - key of the knowledgebase
      Returns:
      runtime configuration
    • getExternalConfiguration

      String getExternalConfiguration(String configId) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
      Retrieves the external representation for a given runtime configuration
      Parameters:
      configId - id of the runtime configuration
      Returns:
      external representation of the runtime configuration
      Throws:
      de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException - Service has failed, e.g. because session timed out
    • releaseSession

      void releaseSession(String configId, String version)
      Deletes the session for the specified runtime configuration on the client
      Parameters:
      configId - id of the runtime configuration to be deleted
      version - version of the runtime configuration to be deleted
    • updateConfiguration

      String updateConfiguration(CPSConfiguration configuration) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
      Updates configuration, sends cookies along with request. The cookies are handled internally and received from the CPSResponseAttributeStrategy
      Parameters:
      configuration - runtime configuration that includes only the updates
      Returns:
      version of the updated runtime configuration
      Throws:
      de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException - when service call fails
    • getConfiguration

      CPSConfiguration getConfiguration(String configId) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
      Gets configuration, sends cookies along with request. The cookies are handled internally and received from the CPSResponseAttributeStrategy
      Parameters:
      configId - configuration id
      Returns:
      current state of the runtime configuration
      Throws:
      de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException - when service call fails
    • createConfigurationFromExternal

      CPSConfiguration createConfigurationFromExternal(String externalConfiguration, String contextProduct)
      Creates a new runtime configuration from the external representation of the configuration. The KB version will not be re-determined.
      Parameters:
      externalConfiguration - external representation of the configuration
      contextProduct - context product
      Returns:
      runtime configuration based on the external representation
    • createConfigurationFromExternalWithDate

      default CPSConfiguration createConfigurationFromExternalWithDate(String externalConfiguration, String contextProduct, Date date)
      Creates a new runtime configuration from the external representation of the configuration
      Parameters:
      externalConfiguration - external representation of the configuration
      contextProduct - context product
      date - this date will be sent to CPS Service and a KB re-determination happens in order to find the most current KB version Otherwise the result will be exactly the same as calling createConfigurationFromExternal(CPSExternalConfiguration, String)
      Returns:
      runtime configuration based on the external representation
    • createConfigurationFromExternal

      CPSConfiguration createConfigurationFromExternal(CPSExternalConfiguration externalConfigStructured, String contextProduct)
      Creates a new runtime configuration from the external typed representation of the configuration
      Parameters:
      externalConfigStructured - structured external configuration
      contextProduct - context product
      Returns:
      Runtime representation
    • getItemWithGroupDetails

      CPSItem getItemWithGroupDetails(String configId, String instanceId, List<String> groupNames) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
      Reads an item within a configuration and returns all details only for the specified groups of this instance
      Parameters:
      configId - Configuration ID
      instanceId - Instance Id for which group data are requested
      groupNames - List of requested group names for which we want to read the group details.
      Returns:
      Requested characteristic groups including domain values and all details
      Throws:
      de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException - Indicates that the CPS call could not be performed
    • isReadDomainValuesOnDemand

      boolean isReadDomainValuesOnDemand()
      Are domain values ready on demand, on group level?
      Returns:
      Domain values read on demand?