Class ProjectMembersAjaxController


  • @RestController
    @RequestMapping("/ajax/projects/members")
    public class ProjectMembersAjaxController
    extends java.lang.Object
    Controller for all asynchronous request from the UI for Project Members
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.http.ResponseEntity<java.lang.String> addMemberToProject​(java.lang.Long projectId, NewMemberRequest request, java.util.Locale locale)
      Add a user to a project
      org.springframework.http.ResponseEntity<java.util.List<User>> getAvailableMembersForProject​(java.lang.Long projectId, java.lang.String query)
      Get a filtered list of available IRIDA instance users for this project
      org.springframework.http.ResponseEntity<TableResponse<ProjectMemberTableModel>> getProjectMembers​(java.lang.Long projectId, TableRequest tableRequest)
      Get a paged listing of project members passed on parameters set in the table request.
      org.springframework.http.ResponseEntity<java.lang.String> removeUserFromProject​(java.lang.Long projectId, java.lang.Long id, java.util.Locale locale)
      Remove a user from the project
      org.springframework.http.ResponseEntity<java.lang.String> updateUserMetadataRoleOnProject​(java.lang.Long projectId, java.lang.Long id, java.lang.String metadataRole, java.util.Locale locale)
      Update a users metadata role on a project
      org.springframework.http.ResponseEntity<java.lang.String> updateUserRoleOnProject​(java.lang.Long projectId, java.lang.Long id, java.lang.String projectRole, java.util.Locale locale)
      Update a users role on a project
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProjectMembersAjaxController

        @Autowired
        public ProjectMembersAjaxController​(UIProjectMembersService projectMembersService)
    • Method Detail

      • getProjectMembers

        @RequestMapping("")
        public org.springframework.http.ResponseEntity<TableResponse<ProjectMemberTableModel>> getProjectMembers​(@RequestParam
                                                                                                                 java.lang.Long projectId,
                                                                                                                 @RequestBody
                                                                                                                 TableRequest tableRequest)
        Get a paged listing of project members passed on parameters set in the table request.
        Parameters:
        projectId - - identifier for the current project
        tableRequest - - details about the current page of the table
        Returns:
        sorted and filtered list of project members
      • removeUserFromProject

        @RequestMapping(value="",
                        method=DELETE)
        public org.springframework.http.ResponseEntity<java.lang.String> removeUserFromProject​(@RequestParam
                                                                                               java.lang.Long projectId,
                                                                                               @RequestParam
                                                                                               java.lang.Long id,
                                                                                               java.util.Locale locale)
        Remove a user from the project
        Parameters:
        projectId - - identifier for the current project
        id - - identifier for the user to remove from the project
        locale - - of the currently logged in user
        Returns:
        message to display to the user about the outcome of the removal.
      • updateUserRoleOnProject

        @RequestMapping(value="/role",
                        method=PUT)
        public org.springframework.http.ResponseEntity<java.lang.String> updateUserRoleOnProject​(@RequestParam
                                                                                                 java.lang.Long projectId,
                                                                                                 @RequestParam
                                                                                                 java.lang.Long id,
                                                                                                 java.lang.String projectRole,
                                                                                                 java.util.Locale locale)
        Update a users role on a project
        Parameters:
        projectId - Identifier for the current project
        id - Identifier for the user to remove from the project
        projectRole - Project role to update the user to
        locale - Locale of the currently logged in user
        Returns:
        message to display to the user about the outcome of the change in role.
      • updateUserMetadataRoleOnProject

        @RequestMapping(value="/metadata-role",
                        method=PUT)
        public org.springframework.http.ResponseEntity<java.lang.String> updateUserMetadataRoleOnProject​(@RequestParam
                                                                                                         java.lang.Long projectId,
                                                                                                         @RequestParam
                                                                                                         java.lang.Long id,
                                                                                                         @RequestParam(required=false)
                                                                                                         java.lang.String metadataRole,
                                                                                                         java.util.Locale locale)
        Update a users metadata role on a project
        Parameters:
        projectId - Identifier for the current project
        id - Identifier for the user to remove from the project
        metadataRole - Metadata role to update the user to
        locale - Locale of the currently logged in user
        Returns:
        message to display to the user about the outcome of the change in role.
      • getAvailableMembersForProject

        @RequestMapping("/available")
        public org.springframework.http.ResponseEntity<java.util.List<User>> getAvailableMembersForProject​(@RequestParam
                                                                                                           java.lang.Long projectId,
                                                                                                           @RequestParam
                                                                                                           java.lang.String query)
        Get a filtered list of available IRIDA instance users for this project
        Parameters:
        projectId - - identifier for the current project
        query - - search query to filter the users by
        Returns:
        List of filtered users.
      • addMemberToProject

        @RequestMapping(value="/add",
                        method=POST)
        public org.springframework.http.ResponseEntity<java.lang.String> addMemberToProject​(@RequestParam
                                                                                            java.lang.Long projectId,
                                                                                            @RequestBody
                                                                                            NewMemberRequest request,
                                                                                            java.util.Locale locale)
        Add a user to a project
        Parameters:
        projectId - - identifier for the current project
        request - - details about the user to add to the project (id and role)
        locale - - of the currently logged in user
        Returns:
        message to display to the user about the outcome of adding the user to the project