Class SubmissionController
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.module.web.controllers.dashboard.workspace.SubmissionController
-
@Controller public class SubmissionController extends java.lang.Object
The controller that deals with the workspace submission pages
-
-
Constructor Summary
Constructors Constructor Description SubmissionController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
deleteFileGet(ISubmission submission, long fileid, org.springframework.ui.Model model)
Handles GET requests to the delete file pagejava.lang.String
deleteFilePost(WorkspaceWrapper workspaceWrapper, ISubmission submission, long fileid)
Handles POST requests to the delete file pagejava.lang.String
deleteGet()
Handles GET requests to the delete submission pagejava.lang.String
deletePost(WorkspaceWrapper workspaceWrapper, ISubmission submission)
Handles POST requests to the delete submission pagejava.lang.String
fileGet(ISubmission submission, long fileid, boolean isPrinting)
Handles GET requests to the view file pagejava.lang.String
viewGet()
Handles GET requests to the view submission page
-
-
-
Method Detail
-
viewGet
@GetMapping("/dashboard/workspaces/manage/{pathid}/submission/{submissionid}") public java.lang.String viewGet()
Handles GET requests to the view submission page- Returns:
- the path to the view template
-
fileGet
@GetMapping(value="/dashboard/workspaces/manage/{pathid}/submission/{submissionid}/file/{fileid}/{filename}", produces="text/plain") @ResponseBody public java.lang.String fileGet(@ModelAttribute("submission") ISubmission submission, @PathVariable("fileid") long fileid, @ModelAttribute("isPrinting") boolean isPrinting) throws SourceFileNotFound
Handles GET requests to the view file page- Parameters:
submission
- the submission being managedfileid
- the id of the file- Returns:
- the plaintext contents of the file
- Throws:
SourceFileNotFound
- if the file was not found
-
deleteGet
@GetMapping("/dashboard/workspaces/manage/{pathid}/submission/{submissionid}/delete") public java.lang.String deleteGet()
Handles GET requests to the delete submission page- Returns:
- the path to the delete template
-
deletePost
@PostMapping("/dashboard/workspaces/manage/{pathid}/submission/{submissionid}/delete") public java.lang.String deletePost(@ModelAttribute("workspace") WorkspaceWrapper workspaceWrapper, @ModelAttribute("submission") ISubmission submission)
Handles POST requests to the delete submission page- Parameters:
workspaceWrapper
- the workspace being managedsubmission
- the submission being managed- Returns:
- a direct to the workspace page
-
deleteFileGet
@GetMapping("/dashboard/workspaces/manage/{pathid}/submission/{submissionid}/file/{fileid}/{filename}/delete") public java.lang.String deleteFileGet(@ModelAttribute("submission") ISubmission submission, @PathVariable("fileid") long fileid, org.springframework.ui.Model model) throws SourceFileNotFound
Handles GET requests to the delete file page- Parameters:
submission
- the submission being managedfileid
- the id of the file to deletemodel
- holder for model attributes- Returns:
- the path to the delete file template
- Throws:
SourceFileNotFound
- if the file doesn't exist
-
deleteFilePost
@PostMapping("/dashboard/workspaces/manage/{pathid}/submission/{submissionid}/file/{fileid}/{filename}/delete") public java.lang.String deleteFilePost(@ModelAttribute("workspace") WorkspaceWrapper workspaceWrapper, @ModelAttribute("submission") ISubmission submission, @PathVariable("fileid") long fileid) throws SourceFileNotFound
Handles POST requests to the delete file page- Parameters:
workspaceWrapper
- the workspace being managedsubmission
- the submission being managedfileid
- the id of the file to delete- Returns:
- a direct to the workspace page
- Throws:
SourceFileNotFound
- if the file doesn't exist
-
-