Class ProjectAssociatedProjectsAjaxController


  • @Controller
    @RequestMapping("/ajax/projects/associated")
    public class ProjectAssociatedProjectsAjaxController
    extends java.lang.Object
    Ajax Controller for handling associated projects
    • Constructor Detail

    • 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 project
        associatedProjectId - identifier for the project to associate
        locale - 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 project
        associatedProjectId - identifier for the project to associate
        locale - current users locale
        Returns:
        the result of removing the project