Class ProjectUserGroupsAjaxController


  • @RestController
    @RequestMapping("/ajax/projects/groups")
    public class ProjectUserGroupsAjaxController
    extends java.lang.Object
    UI Ajax Controller for handling project user groups
    • Constructor Detail

    • Method Detail

      • removeUserGroupFromProject

        @RequestMapping(value="",
                        method=DELETE)
        public org.springframework.http.ResponseEntity<java.lang.String> removeUserGroupFromProject​(@RequestParam
                                                                                                    long projectId,
                                                                                                    @RequestParam
                                                                                                    long groupId,
                                                                                                    java.util.Locale locale)
        Remove a user group from a project
        Parameters:
        projectId - Identifier for a project
        groupId - Identifier for an user group
        locale - current users locale
        Returns:
        message to user about the result of removing the user group
      • getAvailableUserGroupsForProject

        @RequestMapping("/available")
        public org.springframework.http.ResponseEntity<java.util.List<UserGroup>> getAvailableUserGroupsForProject​(@RequestParam
                                                                                                                   java.lang.Long projectId,
                                                                                                                   @RequestParam
                                                                                                                   java.lang.String query)
        Get a list of user groups that are not on the current project
        Parameters:
        projectId - Identifier for the current project
        query - Filter string to search the existing user groups by
        Returns:
        List of user groups
      • addUserGroupToProject

        @RequestMapping(value="/add",
                        method=POST)
        public org.springframework.http.ResponseEntity<java.lang.String> addUserGroupToProject​(@RequestParam
                                                                                               java.lang.Long projectId,
                                                                                               @RequestBody
                                                                                               NewMemberRequest request,
                                                                                               java.util.Locale locale)
        Add a user group to the current project
        Parameters:
        projectId - Identifier for a project
        request - Identifier for an user group
        locale - Current users locale
        Returns:
        message to user about the outcome of adding the user group to the project
      • updateUserGroupRoleOnProject

        @RequestMapping(value="/role",
                        method=PUT)
        public org.springframework.http.ResponseEntity<java.lang.String> updateUserGroupRoleOnProject​(@RequestParam
                                                                                                      java.lang.Long projectId,
                                                                                                      @RequestParam
                                                                                                      java.lang.Long id,
                                                                                                      java.lang.String projectRole,
                                                                                                      java.util.Locale locale)
        Update the project role of a user group on the current project
        Parameters:
        projectId - Identifier for a project
        id - Identifier for an user group
        projectRole - Project role to update the user group to
        locale - Current users locale
        Returns:
        message to user about the result of the update
      • updateUserGroupMetadataRoleOnProject

        @RequestMapping(value="/metadata-role",
                        method=PUT)
        public org.springframework.http.ResponseEntity<java.lang.String> updateUserGroupMetadataRoleOnProject​(@RequestParam
                                                                                                              java.lang.Long projectId,
                                                                                                              @RequestParam
                                                                                                              java.lang.Long id,
                                                                                                              java.lang.String metadataRole,
                                                                                                              java.util.Locale locale)
        Update the project metadata role of a user group on the current project
        Parameters:
        projectId - Identifier for a project
        id - Identifier for an user group
        metadataRole - metadata role to update for the user group
        locale - Current users locale
        Returns:
        message to user about the result of the update