DocumentApi

interface DocumentApi

Represents a Document API that allows to create, load and store documents. Please call all this methods in IO thread if possible as they performs file operations.

Functions

Link copied to clipboard
abstract fun createDocument(documentImageSizeLimit: Int = Document.DEFAULT_DOCUMENT_IMAGE_SIZE_LIMIT): Document

Create a new document. This is an IO operation and is not recommended to execute in the UI thread.

Link copied to clipboard
abstract fun deleteAllDocuments(): Boolean

Delete all stores documents. This is an IO operation and is not recommended to execute in the UI thread.

Link copied to clipboard
abstract fun deleteDocument(uuid: String): Boolean

Delete a document by its ID. This is an IO operation and is not recommended to execute in the UI thread.

Link copied to clipboard
abstract fun isDocumentExist(documentId: String): Boolean

Check if a document with the given ID exists. This is an IO operation and is not recommended to execute in the UI thread.

Link copied to clipboard
abstract fun loadDocument(documentId: String): Document?

Load a document by its ID. This is an IO operation and is not recommended to execute in the UI thread.

Link copied to clipboard
abstract fun storedDocumentIds(): List<String>

Get all stored documents. This is an IO operation and is not recommended to execute in the UI thread.