AttachmentContext

Context for performing Attachment operations. This typically is provided through a locking/exclusivity method.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun clearQueue()

Helper function to clear the attachment queue Currently only used for testing purposes.

Link copied to clipboard
abstract suspend fun deleteArchivedAttachments(callback: suspend (attachments: List<Attachment>) -> Unit): Boolean

Delete attachments which have been archived

Link copied to clipboard
abstract suspend fun deleteAttachment(id: String)

Delete the attachment from the attachment queue.

Link copied to clipboard
abstract suspend fun getActiveAttachments(): List<Attachment>

Gets all the active attachments which require an operation to be performed.

Link copied to clipboard
abstract suspend fun getAttachment(id: String): Attachment?

Get the attachment from the attachment queue using an ID.

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

Get all the ID's of attachments in the attachment queue.

Link copied to clipboard
abstract suspend fun getAttachments(): List<Attachment>

Get all Attachment records present in the database.

Link copied to clipboard
abstract suspend fun ignoreAttachment(id: String)

Set the state of the attachment to ignore.

Link copied to clipboard
abstract suspend fun saveAttachment(attachment: Attachment): Attachment

Save the attachment to the attachment queue.

Link copied to clipboard
abstract suspend fun saveAttachments(attachments: List<Attachment>)

Save the attachments to the attachment queue.

Link copied to clipboard
abstract fun upsertAttachment(attachment: Attachment, context: ConnectionContext): Attachment

Upserts an attachment record synchronously given a database connection context.