Class DefaultDataHubExtensionUploadService

  • All Implemented Interfaces:
    DataHubExtensionUploadService, org.springframework.beans.factory.InitializingBean

    public class DefaultDataHubExtensionUploadService
    extends java.lang.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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      protected com.hybris.datahub.client.extension.ExtensionClient client()  
      protected com.hybris.datahub.client.extension.ExtensionClient createClient​(java.lang.String url)
      Creates a client for communicating to the DataHub REST API
      void setClientConfiguration​(com.hybris.datahub.client.ClientConfiguration configuration)
      Injects an optional Configuration for the underlaying rest client
      void setDataHubUrl​(java.lang.String url)
      Specifies location of the DataHub to which the extensions will be deployed.
      void uploadExtension​(com.hybris.datahub.client.extension.ExtensionSource extSrc)
      Uploads a DataHub extension to the DataHub server.
      • Methods inherited from class java.lang.Object

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

      • DefaultDataHubExtensionUploadService

        public DefaultDataHubExtensionUploadService()
    • Method Detail

      • afterPropertiesSet

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

        public void uploadExtension​(com.hybris.datahub.client.extension.ExtensionSource extSrc)
                             throws java.io.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:
        java.io.IOException - when failed to read extension definition from the source
      • setDataHubUrl

        public void setDataHubUrl​(java.lang.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​(java.lang.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()