Class ProjectDetailsAjaxController
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.web.projects.settings.ProjectDetailsAjaxController
-
@RestController @RequestMapping("/ajax/project/details") public class ProjectDetailsAjaxController extends java.lang.Object
Handle asynchronous requests for the UI project details page.
-
-
Constructor Summary
Constructors Constructor Description ProjectDetailsAjaxController(ProjectService projectService, UIProjectsService service, UIMetadataService metadataService, org.springframework.context.MessageSource messageSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<AjaxResponse>
deleteProject(long projectId, java.util.Locale locale)
Delete a projectorg.springframework.http.ResponseEntity<AjaxResponse>
getProjectDetails(java.lang.Long projectId, java.util.Locale locale)
Get general details about the project.org.springframework.http.ResponseEntity<AjaxResponse>
setDefaultMetadataTemplate(java.lang.Long templateId, java.lang.Long projectId, java.util.Locale locale)
Set a default metadata template for a projectorg.springframework.http.ResponseEntity<AjaxResponse>
updateProcessingCoverage(long projectId, Coverage coverage, java.util.Locale locale)
Update the minimum/maximum coverage or genome size for the projectorg.springframework.http.ResponseEntity<AjaxResponse>
updateProcessingPriority(long projectId, AnalysisSubmission.Priority priority, java.util.Locale locale)
Update the priority for analyses for a project.org.springframework.http.ResponseEntity<AjaxResponse>
updateProjectDetails(java.lang.Long projectId, UpdateProjectAttributeRequest request, java.util.Locale locale)
Update a field within the project details.
-
-
-
Constructor Detail
-
ProjectDetailsAjaxController
@Autowired public ProjectDetailsAjaxController(ProjectService projectService, UIProjectsService service, UIMetadataService metadataService, org.springframework.context.MessageSource messageSource)
-
-
Method Detail
-
getProjectDetails
@RequestMapping("") public org.springframework.http.ResponseEntity<AjaxResponse> getProjectDetails(@RequestParam java.lang.Long projectId, java.util.Locale locale)
Get general details about the project.- Parameters:
projectId
-Long
identifier for the projectlocale
- Locale of the current user- Returns:
ResponseEntity
containing the project details
-
updateProjectDetails
@PutMapping("") @PreAuthorize("hasPermission(#projectId, \'canManageLocalProjectSettings\')") public org.springframework.http.ResponseEntity<AjaxResponse> updateProjectDetails(@RequestParam java.lang.Long projectId, @RequestBody UpdateProjectAttributeRequest request, java.util.Locale locale)
Update a field within the project details.- Parameters:
projectId
-Long
identifier for the projectrequest
-UpdateProjectAttributeRequest
details about which field to updatelocale
-Locale
for the currently logged in user- Returns:
ResponseEntity
explaining to the user the results of the update.
-
setDefaultMetadataTemplate
@PutMapping("/default-template") public org.springframework.http.ResponseEntity<AjaxResponse> setDefaultMetadataTemplate(@RequestParam java.lang.Long templateId, @RequestParam java.lang.Long projectId, java.util.Locale locale)
Set a default metadata template for a project- Parameters:
templateId
- Identifier for the metadata template to set as default.projectId
- Identifier for the project to set the metadata template as default for.locale
- Current usersLocale
- Returns:
AjaxSuccessResponse
with the success message
-
updateProcessingPriority
@PutMapping("/priority") public org.springframework.http.ResponseEntity<AjaxResponse> updateProcessingPriority(@RequestParam long projectId, @RequestParam AnalysisSubmission.Priority priority, java.util.Locale locale)
Update the priority for analyses for a project.- Parameters:
projectId
- identifier for aProject
priority
- the new priority for analyseslocale
- current users locale- Returns:
- message to user about the update ot the priority
-
updateProcessingCoverage
@PutMapping("/coverage") public org.springframework.http.ResponseEntity<AjaxResponse> updateProcessingCoverage(@RequestParam long projectId, @RequestBody Coverage coverage, java.util.Locale locale)
Update the minimum/maximum coverage or genome size for the project- Parameters:
projectId
- identifier for the projectcoverage
- minimum/maximum coverage or genome size for the projectlocale
- current users locale- Returns:
- Message to user about the update
-
deleteProject
@DeleteMapping("") @PreAuthorize("hasPermission(#projectId, \'canManageLocalProjectSettings\')") public org.springframework.http.ResponseEntity<AjaxResponse> deleteProject(@RequestParam long projectId, java.util.Locale locale)
Delete a project- Parameters:
projectId
- identifier for a projectlocale
- Current users locale- Returns:
- an indication to the user about the result of the update
-
-