DocumentUploadManager

Responsible for managing access to the DocumentUploadWorker and DraftDocumentDaoProxy. Used to start any document uploading required, managing the returned results and validation of documents.

All images passed into the worker are copied and stored separately in memory then the captured images. This is to allow the DocumentUploadManager and DocumentUploadWorker to work with their own version of the file, and the ability to compress if required before upload, without affecting outside usage.

Parameters

draftDocumentDaoProxy

DraftDocumentDaoProxy Dao proxy which interacts with the dao and document database are created

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Takes in a list of DocumentToUpload, generates entities from them and stores them into the database. Then begins the upload process by calling the DocumentUploadWorker.

Link copied to clipboard

Will look into the local database and find all DraftDocumentEntity's that are in a DocumentStatus.INITIALIZED state or greater that qualify for uploading. It will then attempt to upload them.