Class GroupBackends


  • public class GroupBackends
    extends Object
    Utility class for dealing with a GroupBackend.
    • Method Detail

      • findBestSuggestion

        public static GroupReference findBestSuggestion​(GroupBackend groupBackend,
                                                        String name)
        Runs GroupBackend.suggest(String, ProjectState) and filters the result to return the best suggestion, or null if one does not exist.
        Parameters:
        groupBackend - the group backend
        name - the name for which to suggest groups
        Returns:
        the best single GroupReference suggestion
      • findBestSuggestion

        public static GroupReference findBestSuggestion​(GroupBackend groupBackend,
                                                        String name,
                                                        ProjectState project)
        Runs GroupBackend.suggest(String, ProjectState) and filters the result to return the best suggestion, or null if one does not exist.
        Parameters:
        groupBackend - the group backend
        name - the name for which to suggest groups
        project - the project for which to suggest groups
        Returns:
        the best single GroupReference suggestion
      • findExactSuggestion

        public static GroupReference findExactSuggestion​(GroupBackend groupBackend,
                                                         String name)
        Runs GroupBackend.suggest(String, ProjectState) and filters the result to return the exact suggestion, or null if one does not exist.
        Parameters:
        groupBackend - the group backend
        name - the name for which to suggest groups
        Returns:
        the exact single GroupReference suggestion
      • findExactSuggestion

        public static GroupReference findExactSuggestion​(GroupBackend groupBackend,
                                                         String name,
                                                         ProjectState project)
        Runs GroupBackend.suggest(String, ProjectState) and filters the result to return the exact suggestion, or null if one does not exist.
        Parameters:
        groupBackend - the group backend
        name - the name for which to suggest groups
        project - 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.