Package com.google.gerrit.server.account
Class GroupBackends
java.lang.Object
com.google.gerrit.server.account.GroupBackends
Utility class for dealing with a GroupBackend.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic GroupReference
findBestSuggestion
(GroupBackend groupBackend, String name) RunsGroupBackend.suggest(String, ProjectState)
and filters the result to return the best suggestion, or null if one does not exist.static GroupReference
findBestSuggestion
(GroupBackend groupBackend, String name, ProjectState project) RunsGroupBackend.suggest(String, ProjectState)
and filters the result to return the best suggestion, or null if one does not exist.static GroupReference
findExactSuggestion
(GroupBackend groupBackend, String name) RunsGroupBackend.suggest(String, ProjectState)
and filters the result to return the exact suggestion, or null if one does not exist.static GroupReference
findExactSuggestion
(GroupBackend groupBackend, String name, ProjectState project) RunsGroupBackend.suggest(String, ProjectState)
and filters the result to return the exact suggestion, or null if one does not exist.static boolean
isExactSuggestion
(GroupReference ref, String name) Returns whether the GroupReference is an exact suggestion for the name.
-
Field Details
-
GROUP_REF_NAME_COMPARATOR
-
-
Method Details
-
findBestSuggestion
RunsGroupBackend.suggest(String, ProjectState)
and filters the result to return the best suggestion, or null if one does not exist.- Parameters:
groupBackend
- the group backendname
- the name for which to suggest groups- Returns:
- the best single GroupReference suggestion
-
findBestSuggestion
public static GroupReference findBestSuggestion(GroupBackend groupBackend, String name, ProjectState project) RunsGroupBackend.suggest(String, ProjectState)
and filters the result to return the best suggestion, or null if one does not exist.- Parameters:
groupBackend
- the group backendname
- the name for which to suggest groupsproject
- the project for which to suggest groups- Returns:
- the best single GroupReference suggestion
-
findExactSuggestion
RunsGroupBackend.suggest(String, ProjectState)
and filters the result to return the exact suggestion, or null if one does not exist.- Parameters:
groupBackend
- the group backendname
- the name for which to suggest groups- Returns:
- the exact single GroupReference suggestion
-
findExactSuggestion
public static GroupReference findExactSuggestion(GroupBackend groupBackend, String name, ProjectState project) RunsGroupBackend.suggest(String, ProjectState)
and filters the result to return the exact suggestion, or null if one does not exist.- Parameters:
groupBackend
- the group backendname
- the name for which to suggest groupsproject
- the project for which to suggest groups- Returns:
- the exact single GroupReference suggestion
-
isExactSuggestion
Returns whether the GroupReference is an exact suggestion for the name.
-