Class WorkspaceController
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.module.web.controllers.dashboard.workspace.WorkspaceController
-
@Controller public class WorkspaceController extends java.lang.Object
The controller that deals with the manage workspace pages
-
-
Constructor Summary
Constructors Constructor Description WorkspaceController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
deleteGet()
Handles GET requests to the delete workspace pagejava.lang.String
deletePost(WorkspaceWrapper workspaceWrapper)
Handles POST requests to the delete workspace pagejava.lang.String
detailsGetFragment(long pathid, WorkspaceWrapper workspaceWrapper, boolean isAjax, org.springframework.ui.Model model)
Handles the GET request to the workspace details fragmentjava.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 fragmentjava.lang.String
manageGet()
Handles the GET request to the manage workspace pagejava.lang.String
resultsGetFragment(long pathid, WorkspaceWrapper workspaceWrapper, boolean isAjax, org.springframework.ui.Model model)
Handles GET requests to the results fragmentjava.lang.String
runGetFragment(long pathid, WorkspaceWrapper workspaceWrapper, AccountWrapper account, boolean isAjax, org.springframework.ui.Model model)
Handles GET requests to the run analysis fragmentjava.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 fragmentjava.lang.String
submissionsGetFragment(long pathid, boolean isAjax)
Handles the GET requests for the submissions list fragmentjava.lang.String
uploadGetFragment()
Handles GET requests to the upload submissions pagejava.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
-
-
-
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 workspaceworkspaceWrapper
- the workspace being managedisAjax
- whether or not the request was ajax or notmodel
- 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 workspaceworkspaceWrapper
- the workspace being managedisAjax
- whether or not the request was ajax or notworkspaceForm
- the form that should be submitted in the requestresult
- the results of the validation on the form abovemodel
- 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 workspaceworkspaceWrapper
- the workspace being managedisAjax
- whether or not the request was ajax or notsubmissionsForm
- the form that should be submitted in the requestresult
- the results of the validation on the form abovemodel
- 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 workspaceisAjax
- 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 workspaceworkspaceWrapper
- the workspace being managedaccount
- the account of the current userisAjax
- whether or not the request was ajax or notmodel
- 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 workspacetemplate_id
- the id of the template to runworkspaceWrapper
- the workspace being managedaccount
- the account of the current userisAjax
- whether or not the request was ajax or notmodel
- 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 toTemplateNotFound
- 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 workspaceworkspaceWrapper
- the workspace being managedisAjax
- whether or not the request was ajax or notmodel
- 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
-
-