Interface SaveDataDocumentService

All Known Implementing Classes:
SuperUserSaveDataDocumentService, UserSaveDataDocumentService

public interface SaveDataDocumentService
Saves and retrieves documents from the save document system. Save documents are arbitrary data used by applications for data that needs persist cross sessions and application clients.
  • Method Details

    • getSaveDataDocument

      default SaveDataDocument getSaveDataDocument(String saveDataDocumentId)
      Gets a specific save document with the supplied.
      Parameters:
      saveDataDocumentId - the save document ID
      Returns:
      the save document
    • findSaveDataDocument

      Optional<SaveDataDocument> findSaveDataDocument(String saveDataDocumentId)
      Finds a save data document with a specified id, returning an empty Optional<SaveDataDocument> if no such document has been found.
      Parameters:
      saveDataDocumentId - the save data document id.
      Returns:
      an Optional<SaveDataDocument>
    • getSaveDataDocuments

      Pagination<SaveDataDocument> getSaveDataDocuments(int offset, int count, String query)
      Gets all save data documents, filtering by the supplied query string.
      Parameters:
      offset - the offset
      count - the number of results to return
      query - the query string
      Returns:
      a Pagination<SaveDataDocument>
    • getSaveDataDocuments

      Pagination<SaveDataDocument> getSaveDataDocuments(int offset, int count, String userId, String profileId)
      Gets all save data documents. Filtering by userId, profileId, or both.
      Parameters:
      offset - the offset
      count - the number of resluts to return
      userId - the userId, if blank or null this will be ignored
      profileId - the profileId, if blank or null this will be ignored
      Returns:
      a Pagination<SaveDataDocument>
    • getUserSaveDataDocumentBySlot

      SaveDataDocument getUserSaveDataDocumentBySlot(String userId, int slot)
      Gets a user-scoped saved data document by user id and slot.
      Parameters:
      userId - the user id
      slot - the slot
      Returns:
      the SaveDataDocument, never null
    • getProfileSaveDataDocumentBySlot

      SaveDataDocument getProfileSaveDataDocumentBySlot(String profileId, int slot)
      Gets a profile-scoped saved data document by user id and slot.
      Parameters:
      profileId - the profile id
      slot - the slot
      Returns:
      the SaveDataDocument, never null
    • createSaveDataDocument

      SaveDataDocument createSaveDataDocument(CreateSaveDataDocumentRequest createSaveDataDocumentRequest)
      Creates a new SaveDataDocument in the database.
      Parameters:
      createSaveDataDocumentRequest - the creation request
      Returns:
      the created SaveDataDocument
    • updateSaveDataDocument

      SaveDataDocument updateSaveDataDocument(String saveDataDocumentId, UpdateSaveDataDocumentRequest updateSaveDataDocumentRequest)
      Updates the SaveDataDocument with the supplied id and the UpdateSaveDataDocumentRequest and the
      Parameters:
      saveDataDocumentId - the save document ID
      updateSaveDataDocumentRequest - the update request
      Returns:
      the SaveDataDocument as it was written to the database
    • deleteSaveDocument

      void deleteSaveDocument(String saveDataDocumentId)
      Deletes the supplied SaveDataDocument.
      Parameters:
      saveDataDocumentId - the identifier of the save data document