Interface DocumentRepository
-
- All Implemented Interfaces:
-
io.writeopia.sdk.manager.DocumentUpdate
public interface DocumentRepository implements DocumentUpdate
DocumentRepository is the repository for using simple CRUD operations in Document. The implementations of this interface shouldn't control order (sorting) or oder configurations, those need to be passed as parameters.
-
-
Method Summary
Modifier and Type Method Description abstract List<Document>loadDocumentsForUser(String orderBy, String userId)abstract DocumentloadDocumentById(String id)abstract List<Document>loadDocumentsById(List<String> ids, String orderBy)abstract UnitsaveDocument(Document document)Saves document. abstract UnitsaveDocumentMetadata(Document document)Saves the document meta data. abstract UnitsaveStoryStep(StoryStep storyStep, Integer position, String documentId)Saves of StoryStep of a document abstract UnitdeleteDocument(Document document)abstract UnitdeleteDocumentById(Set<String> ids)abstract UnitdeleteByUserId(String userId)Deleted all the documents of a User abstract UnitmoveDocumentsToNewUser(String oldUserId, String newUserId)Moves all tickets from one user to another. -
-
Method Detail
-
loadDocumentsForUser
abstract List<Document> loadDocumentsForUser(String orderBy, String userId)
-
loadDocumentById
abstract Document loadDocumentById(String id)
-
loadDocumentsById
abstract List<Document> loadDocumentsById(List<String> ids, String orderBy)
-
saveDocument
abstract Unit saveDocument(Document document)
Saves document. Both with content and meta data.
-
saveDocumentMetadata
abstract Unit 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.
-
saveStoryStep
abstract Unit saveStoryStep(StoryStep storyStep, Integer position, String documentId)
Saves of StoryStep of a document
-
deleteDocument
abstract Unit deleteDocument(Document document)
-
deleteDocumentById
abstract Unit deleteDocumentById(Set<String> ids)
-
deleteByUserId
abstract Unit deleteByUserId(String userId)
Deleted all the documents of a User
-
moveDocumentsToNewUser
abstract Unit moveDocumentsToNewUser(String oldUserId, String newUserId)
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.
-
-
-
-