public final class UserSearchUtilities extends Object
Modifier and Type | Field and Description |
---|---|
static String |
SEPARATORS_STRING |
static Comparator<UserDTO> |
USER_DTO_COMPARATOR
A comparator for
UserDTO that respects UserDTO::getDirectoryId . |
Constructor and Description |
---|
UserSearchUtilities() |
Modifier and Type | Method and Description |
---|---|
static List<ApplicationUser> |
intersectionRespectingLowerUsername(List<ApplicationUser> list1,
List<ApplicationUser> list2) |
static boolean |
userSearchMatchUser(ApplicationUser user,
String searchName)
Check if user can be matched using given String by username or display name.
|
static com.querydsl.core.types.Predicate |
userSearchQueryDSLPredicate(String queryString)
Create a
Predicate to make a search for users against the given queryString
by username or display name. |
public static final String SEPARATORS_STRING
public static final Comparator<UserDTO> USER_DTO_COMPARATOR
UserDTO
that respects UserDTO::getDirectoryId
.public static com.querydsl.core.types.Predicate userSearchQueryDSLPredicate(@Nullable String queryString)
Predicate
to make a search for users against the given queryString
by username or display name.
It is used in searching methods that make calls to crowd/database for users that meet the requirements. (Used for example during searching for mentionable or assignable users)
Display name is compared by each token located in it witch is created by splitting display name
by DISPLAY_NAME_SEPARATOR
userSearchMatchUser(com.atlassian.jira.user.ApplicationUser, java.lang.String)
queryString
- string that users will be match withPredicate
allowing to match users by username and display namepublic static boolean userSearchMatchUser(ApplicationUser user, @Nullable String searchName)
Display name is tokenised by DISPLAY_NAME_SEPARATOR
and the tokens
are compared to searchName
userSearchQueryDSLPredicate(java.lang.String)
user
- user that will be checked if matchsearchName
- searchName String used for matchingpublic static List<ApplicationUser> intersectionRespectingLowerUsername(List<ApplicationUser> list1, List<ApplicationUser> list2)
Copyright © 2002-2024 Atlassian. All Rights Reserved.