Class WorkspaceController


  • @Controller
    public class WorkspaceController
    extends java.lang.Object
    The controller that deals with the manage workspace pages
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String deleteGet()
      Handles GET requests to the delete workspace page
      java.lang.String deletePost​(WorkspaceWrapper workspaceWrapper)
      Handles POST requests to the delete workspace page
      java.lang.String detailsGetFragment​(long pathid, WorkspaceWrapper workspaceWrapper, boolean isAjax, org.springframework.ui.Model model)
      Handles the GET request to the workspace details fragment
      java.lang.String detailsPostFragment​(long pathid, WorkspaceWrapper workspaceWrapper, boolean isAjax, @Valid WorkspaceForm workspaceForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model)
      Handles POST requests to the workspace details fragment
      java.lang.String manageGet()
      Handles the GET request to the manage workspace page
      java.lang.String resultsGetFragment​(long pathid, WorkspaceWrapper workspaceWrapper, boolean isAjax, org.springframework.ui.Model model)
      Handles GET requests to the results fragment
      java.lang.String runGetFragment​(long pathid, WorkspaceWrapper workspaceWrapper, AccountWrapper account, boolean isAjax, org.springframework.ui.Model model)
      Handles GET requests to the run analysis fragment
      java.lang.String runPostFragment​(long pathid, long template_id, WorkspaceWrapper workspaceWrapper, AccountWrapper account, boolean isAjax, org.springframework.ui.Model model)
      Handles POST requests to the run analysis fragment
      java.lang.String submissionsGetFragment​(long pathid, boolean isAjax)
      Handles the GET requests for the submissions list fragment
      java.lang.String uploadGetFragment()
      Handles GET requests to the upload submissions page
      java.lang.String uploadPostFragment​(long pathid, WorkspaceWrapper workspaceWrapper, boolean isAjax, @Valid SubmissionsForm submissionsForm, org.springframework.validation.BindingResult result, org.springframework.ui.Model model)
      Handles POST requests to the upload submissions page
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WorkspaceController

        public WorkspaceController()
    • Method Detail

      • manageGet

        @GetMapping("/dashboard/workspaces/manage/{pathid}")
        public java.lang.String manageGet()
        Handles the GET request to the manage workspace page
        Returns:
        the path to the manage template
      • detailsGetFragment

        @GetMapping("/dashboard/workspaces/manage/{pathid}/details")
        public java.lang.String detailsGetFragment​(@PathVariable("pathid")
                                                   long pathid,
                                                   @ModelAttribute("workspace")
                                                   WorkspaceWrapper workspaceWrapper,
                                                   @ModelAttribute("isAjax")
                                                   boolean isAjax,
                                                   org.springframework.ui.Model model)
                                            throws NotAjaxRequest
        Handles the GET request to the workspace details fragment
        Parameters:
        pathid - the id of the workspace
        workspaceWrapper - the workspace being managed
        isAjax - whether or not the request was ajax or not
        model - holder for model attributes
        Returns:
        the path to the workspace details fragment
        Throws:
        NotAjaxRequest - if the request was not an ajax one, the message is where to redirect the user to
      • detailsPostFragment

        @PostMapping("/dashboard/workspaces/manage/{pathid}/details")
        public java.lang.String detailsPostFragment​(@PathVariable("pathid")
                                                    long pathid,
                                                    @ModelAttribute("workspace")
                                                    WorkspaceWrapper workspaceWrapper,
                                                    @ModelAttribute("isAjax")
                                                    boolean isAjax,
                                                    @Valid @ModelAttribute
                                                    @Valid WorkspaceForm workspaceForm,
                                                    org.springframework.validation.BindingResult result,
                                                    org.springframework.ui.Model model)
                                             throws NotAjaxRequest
        Handles POST requests to the workspace details fragment
        Parameters:
        pathid - the id of the workspace
        workspaceWrapper - the workspace being managed
        isAjax - whether or not the request was ajax or not
        workspaceForm - the form that should be submitted in the request
        result - the results of the validation on the form above
        model - holder for model attributes
        Returns:
        the path to the details fragment template
        Throws:
        NotAjaxRequest - if the request was not an ajax one, the message is where to redirect the user to
      • uploadGetFragment

        @GetMapping("/dashboard/workspaces/manage/{pathid}/submissions/upload")
        public java.lang.String uploadGetFragment()
        Handles GET requests to the upload submissions page
        Returns:
        the path to the upload template
      • uploadPostFragment

        @PostMapping("/dashboard/workspaces/manage/{pathid}/submissions/upload")
        public java.lang.String uploadPostFragment​(@PathVariable("pathid")
                                                   long pathid,
                                                   @ModelAttribute("workspace")
                                                   WorkspaceWrapper workspaceWrapper,
                                                   @ModelAttribute("isAjax")
                                                   boolean isAjax,
                                                   @Valid @ModelAttribute
                                                   @Valid SubmissionsForm submissionsForm,
                                                   org.springframework.validation.BindingResult result,
                                                   org.springframework.ui.Model model)
                                            throws NotAjaxRequest
        Handles POST requests to the upload submissions page
        Parameters:
        pathid - the id of the workspace
        workspaceWrapper - the workspace being managed
        isAjax - whether or not the request was ajax or not
        submissionsForm - the form that should be submitted in the request
        result - the results of the validation on the form above
        model - holder for model attributes
        Returns:
        the path to the upload confirmed template
        Throws:
        NotAjaxRequest - if the request was not an ajax one, the message is where to redirect the user to
      • submissionsGetFragment

        @GetMapping("/dashboard/workspaces/manage/{pathid}/submissions")
        public java.lang.String submissionsGetFragment​(@PathVariable("pathid")
                                                       long pathid,
                                                       @ModelAttribute("isAjax")
                                                       boolean isAjax)
                                                throws NotAjaxRequest
        Handles the GET requests for the submissions list fragment
        Parameters:
        pathid - the id of the workspace
        isAjax - whether or not the request was ajax or not
        Returns:
        the path to the submissions list template
        Throws:
        NotAjaxRequest - if the request was not an ajax one, the message is where to redirect the user to
      • runGetFragment

        @GetMapping("/dashboard/workspaces/manage/{pathid}/run")
        public java.lang.String runGetFragment​(@PathVariable("pathid")
                                               long pathid,
                                               @ModelAttribute("workspace")
                                               WorkspaceWrapper workspaceWrapper,
                                               @ModelAttribute("account")
                                               AccountWrapper account,
                                               @ModelAttribute("isAjax")
                                               boolean isAjax,
                                               org.springframework.ui.Model model)
                                        throws NotAjaxRequest
        Handles GET requests to the run analysis fragment
        Parameters:
        pathid - the id of the workspace
        workspaceWrapper - the workspace being managed
        account - the account of the current user
        isAjax - whether or not the request was ajax or not
        model - holder for model attributes
        Returns:
        the path to the run template
        Throws:
        NotAjaxRequest - if the request was not an ajax one, the message is where to redirect the user to
      • runPostFragment

        @PostMapping("/dashboard/workspaces/manage/{pathid}/run")
        public java.lang.String runPostFragment​(@PathVariable("pathid")
                                                long pathid,
                                                @RequestParam(value="template_id",required=true)
                                                long template_id,
                                                @ModelAttribute("workspace")
                                                WorkspaceWrapper workspaceWrapper,
                                                @ModelAttribute("account")
                                                AccountWrapper account,
                                                @ModelAttribute("isAjax")
                                                boolean isAjax,
                                                org.springframework.ui.Model model)
                                         throws NotAjaxRequest,
                                                TemplateNotFound
        Handles POST requests to the run analysis fragment
        Parameters:
        pathid - the id of the workspace
        template_id - the id of the template to run
        workspaceWrapper - the workspace being managed
        account - the account of the current user
        isAjax - whether or not the request was ajax or not
        model - holder for model attributes
        Returns:
        the path to the run template
        Throws:
        NotAjaxRequest - if the request was not an ajax one, the message is where to redirect the user to
        TemplateNotFound - if the template was not found
      • resultsGetFragment

        @GetMapping("/dashboard/workspaces/manage/{pathid}/results")
        public java.lang.String resultsGetFragment​(@PathVariable("pathid")
                                                   long pathid,
                                                   @ModelAttribute("workspace")
                                                   WorkspaceWrapper workspaceWrapper,
                                                   @ModelAttribute("isAjax")
                                                   boolean isAjax,
                                                   org.springframework.ui.Model model)
                                            throws NotAjaxRequest
        Handles GET requests to the results fragment
        Parameters:
        pathid - the id of the workspace
        workspaceWrapper - the workspace being managed
        isAjax - whether or not the request was ajax or not
        model - holder for model attributes
        Returns:
        the path to the results fragment template
        Throws:
        NotAjaxRequest - if the request was not an ajax one, the message is where to redirect the user to
      • deleteGet

        @GetMapping("/dashboard/workspaces/{pathid}/delete")
        public java.lang.String deleteGet()
        Handles GET requests to the delete workspace page
        Returns:
        the path to the delete template
      • deletePost

        @PostMapping("/dashboard/workspaces/{pathid}/delete")
        public java.lang.String deletePost​(@ModelAttribute("workspace")
                                           WorkspaceWrapper workspaceWrapper)
        Handles POST requests to the delete workspace page
        Parameters:
        workspaceWrapper - the workspace being managed
        Returns:
        the path to the delete template