Class DataHubTransferHandler
java.lang.Object
de.hybris.platform.sap.core.configuration.datahub.DataHubTransferHandler
This class handles the transfer of configuration models to the data hub via property map.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectcreateConfigurationDTO(ItemModel model, de.hybris.platform.converters.impl.AbstractPopulatingConverter converter) Creates the DTO for the item type of the save event.createConfigurationMap(ItemModel model, de.hybris.platform.converters.impl.AbstractPopulatingConverter<ItemModel, Map<String, Object>> converter) Creates the property map for the given model.invokeDeleteContent(String code, List<DataHubTransferConfiguration> dataHubTransferConfigurations, DataHubTransferLog dataHubTransferLog) Delete configuration content in the Data Hub.invokeDeleteItem(String code, List<ItemModel> models, List<DataHubTransferConfiguration> dataHubTransferConfigurations, DataHubTransferLog dataHubTransferLog) Delete configuration items in the Data Hub.invokeTransfer(String code, List<ItemModel> models, List<DataHubTransferConfiguration> dataHubTransferConfigurations, DataHubTransferLog dataHubTransferLog) Invokes the data transfer of the given configuration models to data hub.voidsetDataHubOutboundService(com.hybris.datahub.core.services.DataHubOutboundService outboundService) Injection setter forDataHubOutboundService
-
Constructor Details
-
DataHubTransferHandler
public DataHubTransferHandler()
-
-
Method Details
-
setDataHubOutboundService
public void setDataHubOutboundService(com.hybris.datahub.core.services.DataHubOutboundService outboundService) Injection setter forDataHubOutboundService- 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 stringmodels- list of configuration modelsdataHubTransferConfigurations- list of data hub transfer configurations related to this modeldataHubTransferLog- 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 stringmodels- list of configuration modelsdataHubTransferConfigurations- list of data hub transfer configurations related to this modeldataHubTransferLog- 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 stringdataHubTransferConfigurations- list of data hub transfer configurations related to this modeldataHubTransferLog- 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 modelconverter- 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 modelconverter- converter for populating the dto- Returns:
- the related DTO of the event
-