Package com.google.gerrit.server.account
Class GroupBackends
- java.lang.Object
-
- com.google.gerrit.server.account.GroupBackends
-
public class GroupBackends extends Object
Utility class for dealing with a GroupBackend.
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<GroupReference>
GROUP_REF_NAME_COMPARATOR
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
GROUP_REF_NAME_COMPARATOR
public static final Comparator<GroupReference> GROUP_REF_NAME_COMPARATOR
-
-
Method Detail
-
findBestSuggestion
public static 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.- 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
public 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.- 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
public static boolean isExactSuggestion(GroupReference ref, String name)
Returns whether the GroupReference is an exact suggestion for the name.
-
-