Interface HistoryManager

  • All Known Implementing Classes:
    BundleContextHistoryManager

    public interface HistoryManager
    Common interface to handle the user's history.
    • Method Detail

      • saveOrUpdateHistory

        java.lang.String saveOrUpdateHistory​(java.lang.String userId,
                                             GraphContainer container)
        Saves the current state of the GraphContainer for the current userId. The returned String is the history fragment (hash).
        Parameters:
        userId - The user to save the history for
        container - The current GraphContainer
        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 by fragementId. The GraphContainer represents the user's state, which does not require the userId.
        Parameters:
        fragment - The history fragment (history hash)
        container - The GraphContainer needed 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 provided fragment.
      • getHistoryByUserId

        SavedHistory getHistoryByUserId​(java.lang.String userId)
        Returns the history object for the provided userId.
      • deleteHistory

        void deleteHistory()
        Deletes the history for all users.