Class ProjectUserGroupsAjaxController
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.web.ajax.projects.ProjectUserGroupsAjaxController
-
@RestController @RequestMapping("/ajax/projects/groups") public class ProjectUserGroupsAjaxController extends java.lang.Object
UI Ajax Controller for handling project user groups
-
-
Constructor Summary
Constructors Constructor Description ProjectUserGroupsAjaxController(UIProjectUserGroupsService service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<java.lang.String>
addUserGroupToProject(java.lang.Long projectId, NewMemberRequest request, java.util.Locale locale)
Add a user group to the current projectorg.springframework.http.ResponseEntity<java.util.List<UserGroup>>
getAvailableUserGroupsForProject(java.lang.Long projectId, java.lang.String query)
Get a list of user groups that are not on the current projectorg.springframework.http.ResponseEntity<TableResponse<ProjectUserGroupsTableModel>>
getProjectUserGroups(java.lang.Long projectId, TableRequest request)
Get a table page ofProjectUserGroupsTableModel
org.springframework.http.ResponseEntity<java.lang.String>
removeUserGroupFromProject(long projectId, long groupId, java.util.Locale locale)
Remove a user group from a projectorg.springframework.http.ResponseEntity<java.lang.String>
updateUserGroupMetadataRoleOnProject(java.lang.Long projectId, java.lang.Long id, java.lang.String metadataRole, java.util.Locale locale)
Update the project metadata role of a user group on the current projectorg.springframework.http.ResponseEntity<java.lang.String>
updateUserGroupRoleOnProject(java.lang.Long projectId, java.lang.Long id, java.lang.String projectRole, java.util.Locale locale)
Update the project role of a user group on the current project
-
-
-
Constructor Detail
-
ProjectUserGroupsAjaxController
@Autowired public ProjectUserGroupsAjaxController(UIProjectUserGroupsService service)
-
-
Method Detail
-
getProjectUserGroups
@RequestMapping("") public org.springframework.http.ResponseEntity<TableResponse<ProjectUserGroupsTableModel>> getProjectUserGroups(@RequestParam java.lang.Long projectId, @RequestBody TableRequest request)
Get a table page ofProjectUserGroupsTableModel
- Parameters:
projectId
- Identifier for a projectrequest
-TableRequest
details about the current page of the table- Returns:
TableResponse
-
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 projectgroupId
- Identifier for an user grouplocale
- 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 projectquery
- 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 projectrequest
- Identifier for an user grouplocale
- 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 projectid
- Identifier for an user groupprojectRole
- Project role to update the user group tolocale
- 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 projectid
- Identifier for an user groupmetadataRole
- metadata role to update for the user grouplocale
- Current users locale- Returns:
- message to user about the result of the update
-
-