Package io.dialob.db.azure.blob.storage
Class FormAzureBlobStorageDatabase
java.lang.Object
io.dialob.db.spi.spring.AbstractDocumentDatabase<F>
io.dialob.db.azure.blob.storage.AbstractAzureBlobStorageDatabase<io.dialob.api.form.Form>
io.dialob.db.azure.blob.storage.FormAzureBlobStorageDatabase
- All Implemented Interfaces:
FormDatabase
public class FormAzureBlobStorageDatabase
extends AbstractAzureBlobStorageDatabase<io.dialob.api.form.Form>
implements FormDatabase
FormAzureBlobStorageDatabase is an implementation of the FormDatabase interface that
provides methods for managing form documents stored in Azure Blob Storage. It extends
the AbstractAzureBlobStorageDatabase to leverage its generic functionality while
specializing it for Form documents.
Features: - Interacts with Azure Blob Storage to store, retrieve, and manage form documents. - Uses JSON serialization/deserialization (via ObjectMapper) for storing and reading document data. - Supports operations such as saving, deleting, checking existence, and retrieving metadata for forms. - Provides efficient handling of form metadata with tenant-specific scoping.
This class handles document-specific operations, including updating document IDs or revisions as part of the save process.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.dialob.form.service.api.FormDatabase
FormDatabase.FormMetadataRow -
Constructor Summary
ConstructorsConstructorDescriptionFormAzureBlobStorageDatabase(com.azure.storage.blob.BlobContainerClient blobContainerClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String prefix, String suffix) -
Method Summary
Modifier and TypeMethodDescriptionvoidfindAllMetadata(String tenantId, io.dialob.api.form.Form.Metadata metadata, Consumer<FormDatabase.FormMetadataRow> consumer) protected io.dialob.api.form.FormupdateDocumentId(io.dialob.api.form.Form form, String id) protected io.dialob.api.form.FormupdateDocumentRev(io.dialob.api.form.Form form, String rev) Methods inherited from class io.dialob.db.azure.blob.storage.AbstractAzureBlobStorageDatabase
createUuid, delete, exists, extractObjectName, findOne, findOne, forAllObjects, loadFile, objectName, save, tenantPrefixMethods inherited from class io.dialob.db.spi.spring.AbstractDocumentDatabase
getDocumentClass, id, rev
-
Constructor Details
-
FormAzureBlobStorageDatabase
-
-
Method Details
-
findAllMetadata
public void findAllMetadata(String tenantId, io.dialob.api.form.Form.Metadata metadata, @NonNull Consumer<FormDatabase.FormMetadataRow> consumer) - Specified by:
findAllMetadatain interfaceFormDatabase
-
updateDocumentId
@NonNull protected io.dialob.api.form.Form updateDocumentId(@NonNull io.dialob.api.form.Form form, String id) - Specified by:
updateDocumentIdin classAbstractDocumentDatabase<io.dialob.api.form.Form>
-
updateDocumentRev
@NonNull protected io.dialob.api.form.Form updateDocumentRev(@NonNull io.dialob.api.form.Form form, String rev) - Specified by:
updateDocumentRevin classAbstractDocumentDatabase<io.dialob.api.form.Form>
-