Class BlobStoreApiImpl

java.lang.Object
org.eclipse.edc.azure.blob.api.BlobStoreApiImpl
All Implemented Interfaces:
BlobStoreApi

public class BlobStoreApiImpl extends Object implements BlobStoreApi
  • Constructor Details

    • BlobStoreApiImpl

      public BlobStoreApiImpl(org.eclipse.edc.spi.security.Vault vault, String blobstoreEndpointTemplate)
  • Method Details

    • createContainer

      public void createContainer(String accountName, String containerName)
      Specified by:
      createContainer in interface BlobStoreApi
    • deleteContainer

      public void deleteContainer(String accountName, String containerName)
      Specified by:
      deleteContainer in interface BlobStoreApi
    • exists

      public boolean exists(String accountName, String containerName)
      Specified by:
      exists in interface BlobStoreApi
    • createContainerSasToken

      public String createContainerSasToken(String accountName, String containerName, String permissionSpec, OffsetDateTime expiry)
      Specified by:
      createContainerSasToken in interface BlobStoreApi
    • listContainer

      public List<com.azure.storage.blob.models.BlobItem> listContainer(String accountName, String containerName)
      Specified by:
      listContainer in interface BlobStoreApi
    • listContainerFolder

      public List<com.azure.storage.blob.models.BlobItem> listContainerFolder(String accountName, String containerName, String directory)
      Description copied from interface: BlobStoreApi
      List all blobs from given folder in the container on a storage account.
      Specified by:
      listContainerFolder in interface BlobStoreApi
      Parameters:
      accountName - The name of the storage account
      containerName - The name of the container within the storage account
      directory - The name of the folder within the container of the storage account
      Returns:
      Lazy loaded list of blobs from folder specified by the input parameters
    • putBlob

      public void putBlob(String accountName, String containerName, String blobName, byte[] data)
      Specified by:
      putBlob in interface BlobStoreApi
    • createAccountSas

      public String createAccountSas(String accountName, String containerName, String permissionSpec, OffsetDateTime expiry)
      Specified by:
      createAccountSas in interface BlobStoreApi
    • getBlob

      public byte[] getBlob(String account, String container, String blobName)
      Specified by:
      getBlob in interface BlobStoreApi
    • getBlobAdapter

      public BlobAdapter getBlobAdapter(String accountName, String containerName, String blobName, String sharedKey)
      Description copied from interface: BlobStoreApi
      Get a blob adapter containing convenience methods for working on blob objects on a storage account. This method accepts storage account key credential, and it is used in a context, where unlimited access to a storage account is required.
      Specified by:
      getBlobAdapter in interface BlobStoreApi
      Parameters:
      accountName - The name of the storage account
      containerName - The name of the container within the storage account
      blobName - The name of the blob within the container of the storage account
      sharedKey - The storage account key credential
      Returns:
      The blob adapter corresponding to the blob specified by the input parameters
    • getBlobAdapter

      public BlobAdapter getBlobAdapter(String accountName, String containerName, String blobName, com.azure.core.credential.AzureSasCredential credential)
      Description copied from interface: BlobStoreApi
      Get a blob adapter containing convenience methods for working on blob objects on a storage account. This method accepts a SAS (Shared Access Signature) token as a credential, and it's typically used for accessing a storage account with limited sets of privileges. Pls. refer to the Azure SAS documentation for further details.
      Specified by:
      getBlobAdapter in interface BlobStoreApi
      Parameters:
      accountName - The name of the storage account
      containerName - The name of the container within the storage account
      blobName - The name of the blob within the container of the storage account
      credential - A valid SAS token
      Returns:
      The blob adapter corresponding to the blob specified by the input parameters
    • getBlobAdapter

      public BlobAdapter getBlobAdapter(String accountName, String containerName, String blobName)
      Description copied from interface: BlobStoreApi
      Get a blob adapter containing convenience methods for working on blob objects on a storage account. This method doesn't require any credentials; it uses DefaultAzureCredentialBuilder, which contains an authentication flow consisting of several authentication mechanisms to be tried in a specific order. Pls. refer to the official documentation for further details, i.e. the list of mechanisms tried.
      Specified by:
      getBlobAdapter in interface BlobStoreApi
      Parameters:
      accountName - The name of the storage account
      containerName - The name of the container within the storage account
      blobName - The name of the blob within the container of the storage account
      Returns:
      The blob adapter corresponding to the blob specified by the input parameters