Class ProjectDetailsAjaxController


  • @RestController
    @RequestMapping("/ajax/project/details")
    public class ProjectDetailsAjaxController
    extends java.lang.Object
    Handle asynchronous requests for the UI project details page.
    • Constructor Detail

    • 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 project
        locale - 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 project
        request - UpdateProjectAttributeRequest details about which field to update
        locale - 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 users Locale
        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 a Project
        priority - the new priority for analyses
        locale - 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 project
        coverage - minimum/maximum coverage or genome size for the project
        locale - 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 project
        locale - Current users locale
        Returns:
        an indication to the user about the result of the update