Class DefaultDataHubOutboundClient
java.lang.Object
com.hybris.datahub.core.rest.client.DefaultDataHubOutboundClient
- All Implemented Interfaces:
DataHubOutboundClient
Implementation of a REST client for communication with the Data Hub
-
Constructor Summary
ConstructorsModifierConstructorDescriptionInstantiates this client.DefaultDataHubOutboundClient(com.hybris.datahub.client.ClientConfiguration cfg) protectedDefaultDataHubOutboundClient(javax.ws.rs.client.Client cl) -
Method Summary
Modifier and TypeMethodDescriptiondeleteByFeed(String feedName, String rawItemType) Deletes all items originating from the data feed and raw item type specifiedDeletes item with an integration key comprised of the specified primary keys, originating from the data feed and raw item type specifiedDeletes item with an integration key comprised of the specified primary keys, of the type specified, in the pool specified on the Data Hub serverexportData(String[] csvContent, String dataFeed, String rawItemType) voidsetDataHubUrl(String dataHubUrl) Specifies DataHub location.voidsetRetryTemplate(org.springframework.retry.support.RetryTemplate retryTemplate)
-
Constructor Details
-
DefaultDataHubOutboundClient
public DefaultDataHubOutboundClient()Instantiates this client. -
DefaultDataHubOutboundClient
protected DefaultDataHubOutboundClient(javax.ws.rs.client.Client cl) -
DefaultDataHubOutboundClient
public DefaultDataHubOutboundClient(com.hybris.datahub.client.ClientConfiguration cfg)
-
-
Method Details
-
exportData
public ResultData exportData(String[] csvContent, String dataFeed, String rawItemType) throws DataHubCommunicationException - Specified by:
exportDatain interfaceDataHubOutboundClient- Parameters:
csvContent- the CSV contentdataFeed- the name of the data feedrawItemType- the raw item type- Returns:
- the result of the export
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failed
-
deleteItem
public ResultData deleteItem(String poolName, String canonicalItemType, Map<String, String> keyFields) throws DataHubCommunicationExceptionDescription copied from interface:DataHubOutboundClientDeletes item with an integration key comprised of the specified primary keys, of the type specified, in the pool specified on the Data Hub server- Specified by:
deleteItemin interfaceDataHubOutboundClient- Parameters:
poolName- name of the data pool the item to be deleted resides incanonicalItemType- type code for the canonical item to deletekeyFields- map of primary key attribute names and values to uniquely identify the item to be deleted- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failed
-
deleteByFeed
public ResultData deleteByFeed(String feedName, String rawItemType) throws DataHubCommunicationException Description copied from interface:DataHubOutboundClientDeletes all items originating from the data feed and raw item type specified- Specified by:
deleteByFeedin interfaceDataHubOutboundClient- Parameters:
feedName- Name of the data feed the items originated fromrawItemType- Name of the raw item type the items originated from- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failed
-
deleteByFeed
public ResultData deleteByFeed(String feedName, String rawItemType, Map<String, Object> keyFields) throws DataHubCommunicationExceptionDescription copied from interface:DataHubOutboundClientDeletes item with an integration key comprised of the specified primary keys, originating from the data feed and raw item type specified- Specified by:
deleteByFeedin interfaceDataHubOutboundClient- Parameters:
feedName- Name of the data feed the items originated fromrawItemType- Name of the raw item type the items originated fromkeyFields- Map of primary key attribute names and values to uniquely identify the item to be deleted- Returns:
- the result of the deletion
- Throws:
DataHubCommunicationException- if communication with the Data Hub server failed
-
setRetryTemplate
public void setRetryTemplate(org.springframework.retry.support.RetryTemplate retryTemplate) -
setDataHubUrl
Specifies DataHub location.- Parameters:
dataHubUrl- URL for the DataHub server to exchange data with.
-