Class DefaultDataHubOutboundClient

  • All Implemented Interfaces:
    DataHubOutboundClient

    public class DefaultDataHubOutboundClient
    extends java.lang.Object
    implements DataHubOutboundClient
    Implementation of a REST client for communication with the Data Hub
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ResultData deleteByFeed​(java.lang.String feedName, java.lang.String rawItemType)
      Deletes all items originating from the data feed and raw item type specified
      ResultData deleteByFeed​(java.lang.String feedName, java.lang.String rawItemType, java.util.Map<java.lang.String,​java.lang.Object> keyFields)
      Deletes item with an integration key comprised of the specified primary keys, originating from the data feed and raw item type specified
      ResultData deleteItem​(java.lang.String poolName, java.lang.String canonicalItemType, java.util.Map<java.lang.String,​java.lang.String> keyFields)
      Deletes item with an integration key comprised of the specified primary keys, of the type specified, in the pool specified on the Data Hub server
      ResultData exportData​(java.lang.String[] csvContent, java.lang.String dataFeed, java.lang.String rawItemType)  
      void setDataHubUrl​(java.lang.String dataHubUrl)
      Specifies DataHub location.
      void setRetryTemplate​(org.springframework.retry.support.RetryTemplate retryTemplate)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • 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 Detail

      • deleteItem

        public ResultData deleteItem​(java.lang.String poolName,
                                     java.lang.String canonicalItemType,
                                     java.util.Map<java.lang.String,​java.lang.String> keyFields)
                              throws DataHubCommunicationException
        Description copied from interface: DataHubOutboundClient
        Deletes 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:
        deleteItem in interface DataHubOutboundClient
        Parameters:
        poolName - name of the data pool the item to be deleted resides in
        canonicalItemType - type code for the canonical item to delete
        keyFields - 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​(java.lang.String feedName,
                                       java.lang.String rawItemType,
                                       java.util.Map<java.lang.String,​java.lang.Object> keyFields)
                                throws DataHubCommunicationException
        Description copied from interface: DataHubOutboundClient
        Deletes item with an integration key comprised of the specified primary keys, originating from the data feed and raw item type specified
        Specified by:
        deleteByFeed in interface DataHubOutboundClient
        Parameters:
        feedName - Name of the data feed the items originated from
        rawItemType - Name of the raw item type the items originated from
        keyFields - 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

        public void setDataHubUrl​(java.lang.String dataHubUrl)
        Specifies DataHub location.
        Parameters:
        dataHubUrl - URL for the DataHub server to exchange data with.