Interface FlagDismissalService

All Known Implementing Classes:
FlagDismissalServiceImpl

@PublicApi public interface FlagDismissalService
Keeps a record of notification flags dismissed per-user, and provides a means to clear dismissals for a given flag for all users.

This is achieved by storing the time of dismissal and the reset time for a flag, and the latest one takes precedence.

Since:
6.4
  • Method Details

    • removeDismissFlagForUser

      void removeDismissFlagForUser(String flagKey, ApplicationUser user)
      Remove the dismiss entry for the current user. Removing a dismiss entry means that it is no longer considered hidden by the user.
      Parameters:
      flagKey - An arbitrary identifier for a given flag
      user - The user to remove the flag for
      Since:
      7.0
    • dismissFlagForUser

      void dismissFlagForUser(String flagKey, ApplicationUser user)
      Parameters:
      flagKey - An arbitrary identifier for a given flag
      user - The user dismissing the flag
    • resetFlagDismissals

      void resetFlagDismissals(String flagKey)
      Parameters:
      flagKey - The flag to start showing everyone again
    • getDismissedFlagsForUser

      Set<String> getDismissedFlagsForUser(ApplicationUser user)
      Parameters:
      user - The user for whom we wish to see dismissed flags
      Returns:
      The list of flags the user has dismissed since they were last reset