Interface UserGroupService

    • Method Detail

      • getUsersForGroup

        java.util.Collection<UserGroupJoin> getUsersForGroup​(UserGroup userGroup)
        Get all of the users in the group.
        Parameters:
        userGroup - the group to get users for.
        Returns:
        the users in the group.
      • getProjectsWithUserGroup

        java.util.Collection<UserGroupProjectJoin> getProjectsWithUserGroup​(UserGroup userGroup)
        Get all of the projects with group.
        Parameters:
        userGroup - the group to get projects for.
        Returns:
        the projects linked to the group.
      • addUserToGroup

        UserGroupJoin addUserToGroup​(User user,
                                     UserGroup userGroup,
                                     UserGroupJoin.UserGroupRole role)
        Add a user to the group with the specified role.
        Parameters:
        user - the user to add to the group
        userGroup - the group to add the user to
        role - the role that the user should have in the group
        Returns:
        the relationship created between the user and group.
      • filterUsersByUsername

        org.springframework.data.domain.Page<UserGroupJoin> filterUsersByUsername​(java.lang.String username,
                                                                                  UserGroup userGroup,
                                                                                  int page,
                                                                                  int size,
                                                                                  org.springframework.data.domain.Sort sort)
        Filter the list of users in the UserGroup by username.
        Parameters:
        username - the username string to filter on
        userGroup - the user group to filter for
        page - the current page
        size - the size of the page
        sort - the properties to sort on
        Returns:
        a page of UserGroupJoin.
      • getUsersNotInGroup

        java.util.List<User> getUsersNotInGroup​(UserGroup userGroup,
                                                java.lang.String filter)
        Get the set of User that are not currently in the UserGroup.
        Parameters:
        userGroup - the group to get the set of non-members
        filter - the search string to filter users by
        Returns:
        the list of users not in the group.
      • getUserGroupsForProject

        org.springframework.data.domain.Page<UserGroupProjectJoin> getUserGroupsForProject​(java.lang.String searchName,
                                                                                           Project project,
                                                                                           int page,
                                                                                           int size,
                                                                                           org.springframework.data.domain.Sort sort)
        Get a page of UserGroupProjectJoin for a specific Project .
        Parameters:
        searchName - the name to search with.
        project - the project
        page - the current page
        size - the size of the page
        sort - the properties to sort on
        Returns:
        a page of UserGroupProjectJoin.
      • getUserGroupsNotOnProject

        java.util.List<UserGroup> getUserGroupsNotOnProject​(Project project,
                                                            java.lang.String filter)
        Get a collection of UserGroup that aren't already on a Project.
        Parameters:
        project - the project
        filter - the name to filter on
        Returns:
        the groups not already on the project.