InMemoryDocumentRepository

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open suspend override fun deleteByUserId(userId: String)

Deleted all the documents of a User

Link copied to clipboard
open suspend override fun deleteDocument(document: Document)
Link copied to clipboard
open suspend override fun deleteDocumentByFolder(folderId: String)
Link copied to clipboard
open suspend override fun deleteDocumentByIds(ids: Set<String>)
Link copied to clipboard
open suspend override fun favoriteDocumentByIds(ids: Set<String>)
Link copied to clipboard
open suspend override fun getLastUpdatedAt(): List<Document>
Link copied to clipboard
open suspend override fun listenForDocumentInfoById(id: String): Flow<DocumentInfo>
Link copied to clipboard
open suspend override fun listenForDocumentsByParentId(parentId: String): Flow<Map<String, List<Document>>>
Link copied to clipboard
open suspend override fun loadDocumentById(id: String): Document?
Link copied to clipboard
open suspend override fun loadDocumentByIds(ids: List<String>): List<Document>
Link copied to clipboard
open suspend override fun loadDocumentsByParentId(parentId: String): List<Document>
Link copied to clipboard
open suspend override fun loadDocumentsForFolder(folderId: String): List<Document>
Link copied to clipboard
open suspend override fun loadDocumentsForUser(folderId: String): List<Document>
Link copied to clipboard
open suspend override fun loadDocumentsForUserAfterTime(orderBy: String, userId: String, instant: Instant): List<Document>
Link copied to clipboard
open suspend override fun loadDocumentsWithContentByIds(ids: List<String>, orderBy: String): List<Document>
Link copied to clipboard
open suspend override fun loadFavDocumentsForUser(orderBy: String, userId: String): List<Document>
Link copied to clipboard
open suspend override fun moveDocumentsToNewUser(oldUserId: String, newUserId: String)

Moves all tickets from one user to another. Use this we would like to pass all the data of documents to another user. When the offline user becomes a new online user, all documents should be moved to the new online user.

Link copied to clipboard
open suspend override fun moveToFolder(documentId: String, parentId: String)
Link copied to clipboard
open suspend override fun refreshDocuments()
Link copied to clipboard
open suspend override fun saveDocument(document: Document)

Saves document. Both with content and meta data.

Link copied to clipboard
open suspend override fun saveDocumentMetadata(document: Document)

Saves the document meta data. Use this was updating the content of the document is not necessary. This is a much lighter operation than saveDocument, because it is not necessary to save/update all lines of content.

Link copied to clipboard
open suspend override fun saveStoryStep(storyStep: StoryStep, position: Int, documentId: String)
Link copied to clipboard
open suspend override fun search(query: String): List<Document>
Link copied to clipboard
open suspend override fun stopListeningForFoldersByParentId(parentId: String)
Link copied to clipboard
open suspend override fun unFavoriteDocumentByIds(ids: Set<String>)
Link copied to clipboard
open suspend override fun updateStoryStep(storyStep: StoryStep, position: Int, documentId: String)