Class ProjectAssociatedProjectsAjaxController
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.web.projects.settings.ProjectAssociatedProjectsAjaxController
-
@Controller @RequestMapping("/ajax/projects/associated") public class ProjectAssociatedProjectsAjaxController extends java.lang.Object
Ajax Controller for handling associated projects
-
-
Constructor Summary
Constructors Constructor Description ProjectAssociatedProjectsAjaxController(UIAssociatedProjectsService service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<AjaxResponse>
addAssociatedProject(java.lang.Long projectId, java.lang.Long associatedProjectId, java.util.Locale locale)
Create a new associated project linkageorg.springframework.http.ResponseEntity<java.util.List<AssociatedProject>>
getAssociatedProjects(java.lang.Long projectId)
Get a list of all projects associated with the current project.org.springframework.http.ResponseEntity<java.util.List<AssociatedProject>>
getAssociatedProjectsForProject(java.lang.Long projectId)
Get a list of all projects associated with the current project.org.springframework.http.ResponseEntity<AjaxResponse>
removeAssociatedProject(java.lang.Long projectId, java.lang.Long associatedProjectId, java.util.Locale locale)
Remove an associated project linkage
-
-
-
Constructor Detail
-
ProjectAssociatedProjectsAjaxController
public ProjectAssociatedProjectsAjaxController(UIAssociatedProjectsService service)
-
-
Method Detail
-
getAssociatedProjects
@GetMapping("") public org.springframework.http.ResponseEntity<java.util.List<AssociatedProject>> getAssociatedProjects(@RequestParam java.lang.Long projectId)
Get a list of all projects associated with the current project. If the user is a manager or administrator, the list will also contain all projects they have access to.- Parameters:
projectId
- project identifier for the currently active project- Returns:
- list of projects
-
getAssociatedProjectsForProject
@GetMapping("/list") public org.springframework.http.ResponseEntity<java.util.List<AssociatedProject>> getAssociatedProjectsForProject(@RequestParam java.lang.Long projectId)
Get a list of all projects associated with the current project.- Parameters:
projectId
- project identifier for the currently active project- Returns:
- list of projects
-
addAssociatedProject
@PostMapping("") public org.springframework.http.ResponseEntity<AjaxResponse> addAssociatedProject(@RequestParam java.lang.Long projectId, @RequestParam java.lang.Long associatedProjectId, java.util.Locale locale)
Create a new associated project linkage- Parameters:
projectId
- identifier for the current projectassociatedProjectId
- identifier for the project to associatelocale
- current users locale- Returns:
- The result of adding the associated project
-
removeAssociatedProject
@DeleteMapping("") public org.springframework.http.ResponseEntity<AjaxResponse> removeAssociatedProject(@RequestParam java.lang.Long projectId, @RequestParam java.lang.Long associatedProjectId, java.util.Locale locale)
Remove an associated project linkage- Parameters:
projectId
- identifier for the current projectassociatedProjectId
- identifier for the project to associatelocale
- current users locale- Returns:
- the result of removing the project
-
-