Interface MentionableUserSearcher

All Known Implementing Classes:
SortedMentionableUserSearcher

public interface MentionableUserSearcher
Responsible for finding users that can mentioned on an issue, by role or name. Split from MentionService to resolve circular dependencies.
Since:
v7.2
  • Method Details

    • findRelatedUsersToMention

      List<UserIssueRelevance> findRelatedUsersToMention(String searchString, Issue issue, ApplicationUser requestingUser, int maxResults)
      Calculates a list of users that are relevant to the issue so that they can be mentioned
      Parameters:
      searchString - the filter string to match the user, or role, against
      issue - the issue we are looking for users to mention on (to determine relevance)
      requestingUser - what user is making the request, for authorisation
      maxResults - the maximum number of results that will be returned. We assume it has been validated before reaching here.
      Returns:
      A list of users, ordered by relevance to the issue.
    • findRelatedUsersToMention

      List<UserIssueRelevance> findRelatedUsersToMention(@Nonnull String searchString, Issue issue, @Nullable ApplicationUser requestingUser, int maxResults, @Nonnull Supplier<List<ApplicationUser>> applicationUsersProvider)
      Calculates a list of users that are relevant to the issue so that they can be mentioned
      Parameters:
      searchString - the filter string to match the user, or role, against
      issue - the issue we are looking for users to mention on (to determine relevance)
      requestingUser - what user is making the request, for authorisation
      maxResults - the maximum number of results that will be returned. We assume it has been validated before reaching here.
      applicationUsersProvider - the supplier providing additional users if there will be not enough relevant ones
      Returns:
      A list of users, ordered by relevance to the issue.