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 Summary
Modifier and TypeMethodDescriptioncreateSaveDataDocument
(CreateSaveDataDocumentRequest createSaveDataDocumentRequest) Creates a new SaveDataDocument in the database.void
deleteSaveDocument
(String saveDataDocumentId) Deletes the suppliedSaveDataDocument
.findSaveDataDocument
(String saveDataDocumentId) Finds a save data document with a specified id, returning an emptyOptional<SaveDataDocument>
if no such document has been found.getProfileSaveDataDocumentBySlot
(String profileId, int slot) Gets a profile-scoped saved data document by user id and slot.default SaveDataDocument
getSaveDataDocument
(String saveDataDocumentId) Gets a specific save document with the supplied.getSaveDataDocuments
(int offset, int count, String query) Gets all save data documents, filtering by the supplied query string.getSaveDataDocuments
(int offset, int count, String userId, String profileId) Gets all save data documents.getUserSaveDataDocumentBySlot
(String userId, int slot) Gets a user-scoped saved data document by user id and slot.updateSaveDataDocument
(String saveDataDocumentId, UpdateSaveDataDocumentRequest updateSaveDataDocumentRequest) Updates theSaveDataDocument
with the supplied id and theUpdateSaveDataDocumentRequest
and the
-
Method Details
-
getSaveDataDocument
Gets a specific save document with the supplied.- Parameters:
saveDataDocumentId
- the save document ID- Returns:
- the save document
-
findSaveDataDocument
Finds a save data document with a specified id, returning an emptyOptional<SaveDataDocument>
if no such document has been found.- Parameters:
saveDataDocumentId
- the save data document id.- Returns:
- an
Optional<SaveDataDocument>
-
getSaveDataDocuments
Gets all save data documents, filtering by the supplied query string.- Parameters:
offset
- the offsetcount
- the number of results to returnquery
- 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 offsetcount
- the number of resluts to returnuserId
- the userId, if blank or null this will be ignoredprofileId
- the profileId, if blank or null this will be ignored- Returns:
- a
Pagination<SaveDataDocument>
-
getUserSaveDataDocumentBySlot
Gets a user-scoped saved data document by user id and slot.- Parameters:
userId
- the user idslot
- the slot- Returns:
- the
SaveDataDocument
, never null
-
getProfileSaveDataDocumentBySlot
Gets a profile-scoped saved data document by user id and slot.- Parameters:
profileId
- the profile idslot
- 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 theSaveDataDocument
with the supplied id and theUpdateSaveDataDocumentRequest
and the- Parameters:
saveDataDocumentId
- the save document IDupdateSaveDataDocumentRequest
- the update request- Returns:
- the
SaveDataDocument
as it was written to the database
-
deleteSaveDocument
Deletes the suppliedSaveDataDocument
.- Parameters:
saveDataDocumentId
- the identifier of the save data document
-