Class DataStoreService

java.lang.Object
com.gooddata.sdk.service.gdc.DataStoreService

public class DataStoreService extends Object
Uploads, downloads, deletes, ... at datastore
  • Constructor Details

    • DataStoreService

      public DataStoreService(SingleEndpointGoodDataRestProvider restProvider, Supplier<String> stagingUriSupplier)
      Creates new DataStoreService
      Parameters:
      restProvider - restProvider to make datastore connection
      stagingUriSupplier - used to obtain datastore URI
  • Method Details

    • getUri

      public URI getUri(String path)
      Returns uri for given path (which is used by this service for upload, download or delete)
      Parameters:
      path - path the uri is constructed for
      Returns:
      uri for given path
    • upload

      public void upload(String path, InputStream stream)
      Uploads given stream to given datastore path
      Parameters:
      path - path where to upload to
      stream - stream to upload
      Throws:
      DataStoreException - in case upload failed
    • download

      public InputStream download(String path)
      Download given path and return data as stream
      Parameters:
      path - path from where to download
      Returns:
      download stream
      Throws:
      DataStoreException - in case download failed
    • delete

      public void delete(String path)
      Delete given path from datastore.
      Parameters:
      path - path to delete
      Throws:
      DataStoreException - in case delete failed