Class DefaultDataHubExtensionUploadService

java.lang.Object
com.hybris.datahub.core.services.impl.DefaultDataHubExtensionUploadService
All Implemented Interfaces:
DataHubExtensionUploadService, org.springframework.beans.factory.InitializingBean

public class DefaultDataHubExtensionUploadService extends Object implements DataHubExtensionUploadService, org.springframework.beans.factory.InitializingBean
This implementation of the extension upload service uses the DataHub's REST API to upload extensions to the DataHub server.
  • Constructor Details

    • DefaultDataHubExtensionUploadService

      public DefaultDataHubExtensionUploadService()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • uploadExtension

      public void uploadExtension(com.hybris.datahub.client.extension.ExtensionSource extSrc) throws IOException
      Description copied from interface: DataHubExtensionUploadService
      Uploads a DataHub extension to the DataHub server.
      Specified by:
      uploadExtension in interface DataHubExtensionUploadService
      Parameters:
      extSrc - a source of the extension definition.
      Throws:
      IOException - when failed to read extension definition from the source
    • setDataHubUrl

      public void setDataHubUrl(String url)
      Specifies location of the DataHub to which the extensions will be deployed.
      Parameters:
      url - a URL for the root of the DataHub REST API.
    • setClientConfiguration

      public void setClientConfiguration(com.hybris.datahub.client.ClientConfiguration configuration)
      Injects an optional Configuration for the underlaying rest client
      Parameters:
      configuration -
    • createClient

      protected com.hybris.datahub.client.extension.ExtensionClient createClient(String url)
      Creates a client for communicating to the DataHub REST API
      Parameters:
      url - a URL for the root of the DataHub REST API
      Returns:
      the client to use for communicating to the DataHub server.
    • client

      protected com.hybris.datahub.client.extension.ExtensionClient client()