Interface HistoryManager
-
- All Known Implementing Classes:
BundleContextHistoryManager
public interface HistoryManager
Common interface to handle the user's history.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
applyHistory(String fragment, GraphContainer container)
Restores the given history represented byfragementId
.void
deleteHistory()
Deletes the history for all users.SavedHistory
getHistoryByFragment(String fragment)
Returns the history object for the providedfragment
.SavedHistory
getHistoryByUserId(String userId)
Returns the history object for the provideduserId
.String
getHistoryFragment(String userId)
String
saveOrUpdateHistory(String userId, GraphContainer container)
Saves the current state of theGraphContainer
for the currentuserId
.
-
-
-
Method Detail
-
saveOrUpdateHistory
String saveOrUpdateHistory(String userId, GraphContainer container)
Saves the current state of theGraphContainer
for the currentuserId
. The returnedString
is the history fragment (hash).- Parameters:
userId
- The user to save the history forcontainer
- The currentGraphContainer
- Returns:
- the history fragment (hash) of the saved history
- See Also:
getHistoryFragment(String)
-
applyHistory
void applyHistory(String fragment, GraphContainer container)
Restores the given history represented byfragementId
. TheGraphContainer
represents the user's state, which does not require the userId.- Parameters:
fragment
- The history fragment (history hash)container
- TheGraphContainer
needed to actually apply the history.
-
getHistoryByFragment
SavedHistory getHistoryByFragment(String fragment)
Returns the history object for the providedfragment
.
-
getHistoryByUserId
SavedHistory getHistoryByUserId(String userId)
Returns the history object for the provideduserId
.
-
deleteHistory
void deleteHistory()
Deletes the history for all users.
-
-