Package org.eclipse.edc.azure.blob.api
Class BlobStoreApiImpl
java.lang.Object
org.eclipse.edc.azure.blob.api.BlobStoreApiImpl
- All Implemented Interfaces:
BlobStoreApi
-
Constructor Summary
ConstructorsConstructorDescriptionBlobStoreApiImpl(org.eclipse.edc.spi.security.Vault vault, String blobstoreEndpointTemplate) -
Method Summary
Modifier and TypeMethodDescriptioncreateAccountSas(String accountName, String containerName, String permissionSpec, OffsetDateTime expiry) voidcreateContainer(String accountName, String containerName) createContainerSasToken(String accountName, String containerName, String permissionSpec, OffsetDateTime expiry) voiddeleteContainer(String accountName, String containerName) booleanbyte[]getBlobAdapter(String accountName, String containerName, String blobName) Get a blob adapter containing convenience methods for working on blob objects on a storage account.getBlobAdapter(String accountName, String containerName, String blobName, com.azure.core.credential.AzureSasCredential credential) Get a blob adapter containing convenience methods for working on blob objects on a storage account.getBlobAdapter(String accountName, String containerName, String blobName, String sharedKey) Get a blob adapter containing convenience methods for working on blob objects on a storage account.List<com.azure.storage.blob.models.BlobItem>listContainer(String accountName, String containerName) List<com.azure.storage.blob.models.BlobItem>listContainerFolder(String accountName, String containerName, String directory) List all blobs from given folder in the container on a storage account.void
-
Constructor Details
-
BlobStoreApiImpl
-
-
Method Details
-
createContainer
- Specified by:
createContainerin interfaceBlobStoreApi
-
deleteContainer
- Specified by:
deleteContainerin interfaceBlobStoreApi
-
exists
- Specified by:
existsin interfaceBlobStoreApi
-
createContainerSasToken
public String createContainerSasToken(String accountName, String containerName, String permissionSpec, OffsetDateTime expiry) - Specified by:
createContainerSasTokenin interfaceBlobStoreApi
-
listContainer
public List<com.azure.storage.blob.models.BlobItem> listContainer(String accountName, String containerName) - Specified by:
listContainerin interfaceBlobStoreApi
-
listContainerFolder
public List<com.azure.storage.blob.models.BlobItem> listContainerFolder(String accountName, String containerName, String directory) Description copied from interface:BlobStoreApiList all blobs from given folder in the container on a storage account.- Specified by:
listContainerFolderin interfaceBlobStoreApi- Parameters:
accountName- The name of the storage accountcontainerName- The name of the container within the storage accountdirectory- 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
- Specified by:
putBlobin interfaceBlobStoreApi
-
createAccountSas
public String createAccountSas(String accountName, String containerName, String permissionSpec, OffsetDateTime expiry) - Specified by:
createAccountSasin interfaceBlobStoreApi
-
getBlob
- Specified by:
getBlobin interfaceBlobStoreApi
-
getBlobAdapter
public BlobAdapter getBlobAdapter(String accountName, String containerName, String blobName, String sharedKey) Description copied from interface:BlobStoreApiGet 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:
getBlobAdapterin interfaceBlobStoreApi- Parameters:
accountName- The name of the storage accountcontainerName- The name of the container within the storage accountblobName- The name of the blob within the container of the storage accountsharedKey- 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:BlobStoreApiGet 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:
getBlobAdapterin interfaceBlobStoreApi- Parameters:
accountName- The name of the storage accountcontainerName- The name of the container within the storage accountblobName- The name of the blob within the container of the storage accountcredential- A valid SAS token- Returns:
- The blob adapter corresponding to the blob specified by the input parameters
-
getBlobAdapter
Description copied from interface:BlobStoreApiGet a blob adapter containing convenience methods for working on blob objects on a storage account. This method doesn't require any credentials; it usesDefaultAzureCredentialBuilder, 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:
getBlobAdapterin interfaceBlobStoreApi- Parameters:
accountName- The name of the storage accountcontainerName- The name of the container within the storage accountblobName- 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
-