use of ca.corefacility.bioinformatics.irida.ria.web.models.datatables.DTProjectGroup in project irida by phac-nml.
the class ProjectMembersController method getProjectGroupMembers.
/**
* Get a page of groups on the project for display in a DataTable.
*
* @param params
* the datatables criteria for filtering/sorting groups
* @param projectId
* the id of the project we're looking at
* @return a {@link DataTablesResponseModel} of groups on the project
*/
@RequestMapping(value = "/{projectId}/settings/ajax/groups")
@ResponseBody
public DataTablesResponse getProjectGroupMembers(@DataTablesRequest DataTablesParams params, @PathVariable final Long projectId) {
final Project project = projectService.read(projectId);
final Page<UserGroupProjectJoin> userGroupsForProject = userGroupService.getUserGroupsForProject(params.getSearchValue(), project, params.getCurrentPage(), params.getLength(), params.getSort());
List<DataTablesResponseModel> responseModels = new ArrayList<>();
for (UserGroupProjectJoin userGroupProjectJoin : userGroupsForProject) {
responseModels.add(new DTProjectGroup(userGroupProjectJoin));
}
return new DataTablesResponse(params, userGroupsForProject, responseModels);
}
Aggregations