public interface HistoryManager
Modifier and Type | Method and Description |
---|---|
void |
applyHistory(String fragment,
GraphContainer container)
Restores the given history represented by
fragementId . |
void |
deleteHistory()
Deletes the history for all users.
|
SavedHistory |
getHistoryByFragment(String fragment)
Returns the history object for the provided
fragment . |
SavedHistory |
getHistoryByUserId(String userId)
Returns the history object for the provided
userId . |
String |
getHistoryFragment(String userId) |
String |
saveOrUpdateHistory(String userId,
GraphContainer container)
Saves the current state of the
GraphContainer for the current userId . |
String saveOrUpdateHistory(String userId, GraphContainer container)
GraphContainer
for the current userId
.
The returned String
is the history fragment (hash).userId
- The user to save the history forcontainer
- The current GraphContainer
getHistoryFragment(String)
void applyHistory(String fragment, GraphContainer container)
fragementId
.
The GraphContainer
represents the user's state, which does not require the userId.fragment
- The history fragment (history hash)container
- The GraphContainer
needed to actually apply the history.SavedHistory getHistoryByFragment(String fragment)
fragment
.SavedHistory getHistoryByUserId(String userId)
userId
.void deleteHistory()
Copyright © 2021. All rights reserved.