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(java.lang.String fragment, GraphContainer container)Restores the given history represented byfragementId.voiddeleteHistory()Deletes the history for all users.SavedHistorygetHistoryByFragment(java.lang.String fragment)Returns the history object for the providedfragment.SavedHistorygetHistoryByUserId(java.lang.String userId)Returns the history object for the provideduserId.java.lang.StringgetHistoryFragment(java.lang.String userId)java.lang.StringsaveOrUpdateHistory(java.lang.String userId, GraphContainer container)Saves the current state of theGraphContainerfor the currentuserId.
-
-
-
Method Detail
-
saveOrUpdateHistory
java.lang.String saveOrUpdateHistory(java.lang.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(java.lang.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.
-
getHistoryFragment
java.lang.String getHistoryFragment(java.lang.String userId)
-
getHistoryByFragment
SavedHistory getHistoryByFragment(java.lang.String fragment)
Returns the history object for the providedfragment.
-
getHistoryByUserId
SavedHistory getHistoryByUserId(java.lang.String userId)
Returns the history object for the provideduserId.
-
deleteHistory
void deleteHistory()
Deletes the history for all users.
-
-