DocumentManager

interface DocumentManager

Root component providing protected storage management components

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract fun cancelAllActiveTasks()
Link copied to clipboard
abstract suspend fun cancelUploadDocument(document: DocumentItem)
Link copied to clipboard
abstract fun createDocumentsPagingFlow(documentTypeId: String): Flow<PagingData<DocumentItem>>
Link copied to clipboard
abstract suspend fun createDocumentType(name: String, personId: String? = null): DocumentType

Create custom document type.

Link copied to clipboard
abstract fun createDocumentTypesFlow(personId: String? = null): Flow<List<DocumentType>>
Link copied to clipboard
abstract fun createPagingUploadedDocumentsFlow(documentTypeId: String): Flow<PagingData<DocumentItem>>
Link copied to clipboard
abstract suspend fun decryptDocumentContent(documentId: Long, size: DocumentSize): InputStream?
Link copied to clipboard
abstract suspend fun decryptDocumentFileMeta(documentId: Long): DocumentFileMeta
Link copied to clipboard
abstract suspend fun deleteDocument(documentId: Long): Boolean

The method deletes the document from the document wallet. Returns the result of deleting the document. Before deleting a document, stops all tasks associated with the documents being deleted.

Link copied to clipboard
abstract suspend fun deleteDocuments(documentIds: Set<Long>): Set<Long>

The method deletes the documents from the document wallet. Returns the result of deleting documents. Before deleting a documents, stops all tasks associated with the documents being deleted.

Link copied to clipboard
abstract suspend fun deleteDocumentType(documentTypeId: String)

Delete document type.

Link copied to clipboard
abstract suspend fun editDocumentType(documentTypeId: String, name: String): DocumentType

Edit custom document type.

Link copied to clipboard
abstract suspend fun enqueueToDownload(documentId: Long, size: DocumentSize, priority: DownloadPriority, cacheMode: CacheMode?, targetDirUri: Uri? = null)

Adds document with documentId and size to the download queue.

Link copied to clipboard
abstract suspend fun fetchDocuments(documentTypeId: String)
Link copied to clipboard
abstract suspend fun fetchDocumentTypes(personId: String? = null)
Link copied to clipboard
abstract suspend fun uploadDocuments(uriList: List<Uri>, documentTypeId: String, deleteFileAfterComplete: Boolean = false)