Class ProjectsAjaxController


  • @RestController
    @RequestMapping("/ajax/projects")
    public class ProjectsAjaxController
    extends java.lang.Object
    Controller for handling all ajax requests for Projects.
    • 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 details
        locale - 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
      • getPotentialProjectsToShareTo

        @RequestMapping("/samples-share/projects")
        public java.util.List<Project> getPotentialProjectsToShareTo​(@RequestParam
                                                                     long currentId)
        Get a list of projects that the user can share sample to.
        Parameters:
        currentId - Current project identifier
        Returns:
        List of Projects