Class ProjectsAjaxController
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.web.projects.ProjectsAjaxController
-
@RestController @RequestMapping("/ajax/projects") public class ProjectsAjaxController extends java.lang.Object
Controller for handling all ajax requests for Projects.
-
-
Constructor Summary
Constructors Constructor Description ProjectsAjaxController(UIProjectsService UIProjectsService, org.springframework.context.MessageSource messageSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AjaxResponse
createNewProject(CreateProjectRequest request, java.util.Locale locale)
Create a new project.org.springframework.http.ResponseEntity<TableResponse>
getPagedProjectsForUser(TableRequest tableRequest, java.lang.Boolean admin)
Handle request for getting a filtered and sorted list of projects for a user or administratorjava.util.List<Project>
getPotentialProjectsToShareTo(long currentId)
Get a list of projects that the user can share sample to.org.springframework.http.ResponseEntity<java.util.List<Role>>
getProjectRoles(java.util.Locale locale)
Get a list of all roles available on a project
-
-
-
Constructor Detail
-
ProjectsAjaxController
@Autowired public ProjectsAjaxController(UIProjectsService UIProjectsService, org.springframework.context.MessageSource messageSource)
-
-
Method Detail
-
createNewProject
@PostMapping("/new") public AjaxResponse createNewProject(@RequestBody CreateProjectRequest request, java.util.Locale locale)
Create a new project.- Parameters:
request
-CreateProjectRequest
containing the name for the project and any other detailslocale
-Locale
for the currently logged-in user- Returns:
- Response will contain the created project identifier, or an error message
-
getPagedProjectsForUser
@RequestMapping public org.springframework.http.ResponseEntity<TableResponse> getPagedProjectsForUser(@RequestBody TableRequest tableRequest, @RequestParam java.lang.Boolean admin)
Handle request for getting a filtered and sorted list of projects for a user or administrator- Parameters:
tableRequest
-TableRequest
Details about what is needed in the table (sort, filter, and search).admin
-Boolean
Is the user on an administration page.- Returns:
TableResponse
-
getProjectRoles
@RequestMapping("/roles") public org.springframework.http.ResponseEntity<java.util.List<Role>> getProjectRoles(java.util.Locale locale)
Get a list of all roles available on a project- Parameters:
locale
- -Locale
of the current user- Returns:
- list of roles and their internationalized strings
-
-