Interface HistoryManager
-
- All Known Implementing Classes:
BundleContextHistoryManager
public interface HistoryManagerCommon interface to handle the user's history.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidapplyHistory(String fragment, GraphContainer container)Restores the given history represented byfragementId.voiddeleteHistory()Deletes the history for all users.SavedHistorygetHistoryByFragment(String fragment)Returns the history object for the providedfragment.SavedHistorygetHistoryByUserId(String userId)Returns the history object for the provideduserId.StringgetHistoryFragment(String userId)StringsaveOrUpdateHistory(String userId, GraphContainer container)Saves the current state of theGraphContainerfor the currentuserId.
-
-
-
Method Detail
-
saveOrUpdateHistory
String saveOrUpdateHistory(String userId, GraphContainer container)
Saves the current state of theGraphContainerfor the currentuserId. The returnedStringis 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. TheGraphContainerrepresents the user's state, which does not require the userId.- Parameters:
fragment- The history fragment (history hash)container- TheGraphContainerneeded 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.
-
-