Class DataHubTransferHandler

java.lang.Object
de.hybris.platform.sap.core.configuration.datahub.DataHubTransferHandler

public class DataHubTransferHandler extends Object
This class handles the transfer of configuration models to the data hub via property map.
  • Constructor Details

    • DataHubTransferHandler

      public DataHubTransferHandler()
  • Method Details

    • setDataHubOutboundService

      public void setDataHubOutboundService(com.hybris.datahub.core.services.DataHubOutboundService outboundService)
      Injection setter for DataHubOutboundService
      Parameters:
      outboundService - DataHubOutboundService
    • invokeTransfer

      public DataHubTransferLog invokeTransfer(String code, List<ItemModel> models, List<DataHubTransferConfiguration> dataHubTransferConfigurations, DataHubTransferLog dataHubTransferLog) throws com.hybris.datahub.core.rest.DataHubCommunicationException
      Invokes the data transfer of the given configuration models to data hub.
      Parameters:
      code - item code as string
      models - list of configuration models
      dataHubTransferConfigurations - list of data hub transfer configurations related to this model
      dataHubTransferLog - collect the log information for the data hub
      Returns:
      DataHubTransferLog
      Throws:
      com.hybris.datahub.core.rest.DataHubCommunicationException - if the Data Hub server was unable to successfully complete the export operation
    • invokeDeleteItem

      public DataHubTransferLog invokeDeleteItem(String code, List<ItemModel> models, List<DataHubTransferConfiguration> dataHubTransferConfigurations, DataHubTransferLog dataHubTransferLog) throws com.hybris.datahub.core.rest.DataHubCommunicationException
      Delete configuration items in the Data Hub.
      Parameters:
      code - item code as string
      models - list of configuration models
      dataHubTransferConfigurations - list of data hub transfer configurations related to this model
      dataHubTransferLog - collect the log information for the data hub
      Returns:
      DataHubTransferLog
      Throws:
      com.hybris.datahub.core.rest.DataHubCommunicationException - if the Data Hub server was unable to successfully complete the export operation
    • invokeDeleteContent

      public DataHubTransferLog invokeDeleteContent(String code, List<DataHubTransferConfiguration> dataHubTransferConfigurations, DataHubTransferLog dataHubTransferLog) throws com.hybris.datahub.core.rest.DataHubCommunicationException
      Delete configuration content in the Data Hub. #
      Parameters:
      code - item code as string
      dataHubTransferConfigurations - list of data hub transfer configurations related to this model
      dataHubTransferLog - collect the log information for the data hub
      Returns:
      DataHubTransferLog
      Throws:
      com.hybris.datahub.core.rest.DataHubCommunicationException - if the Data Hub server was unable to successfully complete the export operation
    • createConfigurationMap

      protected Map<String,Object> createConfigurationMap(ItemModel model, de.hybris.platform.converters.impl.AbstractPopulatingConverter<ItemModel,Map<String,Object>> converter)
      Creates the property map for the given model.
      Parameters:
      model - the given model
      converter - converter for populating the property map
      Returns:
      the related property map of the event
    • createConfigurationDTO

      protected Object createConfigurationDTO(ItemModel model, de.hybris.platform.converters.impl.AbstractPopulatingConverter converter)
      Creates the DTO for the item type of the save event.
      Parameters:
      model - source item model
      converter - converter for populating the dto
      Returns:
      the related DTO of the event