Class WorkspacesController
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.module.web.controllers.dashboard.WorkspacesController
-
@Controller public class WorkspacesController extends java.lang.Object
The controller that deals with the workspaces page
-
-
Constructor Summary
Constructors Constructor Description WorkspacesController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
addGet(org.springframework.ui.Model model)
Handles GET requests to the add workspace pagejava.lang.String
addPost(@Valid WorkspaceForm workspaceForm, org.springframework.validation.BindingResult result, AccountWrapper account, org.springframework.ui.Model model)
Handles POST requests to the add workspace pagejava.lang.String
indexGet()
Handles GET requests to the workspaces pagejava.lang.String
listGetFragment(AccountWrapper account, boolean isAjax, org.springframework.ui.Model model)
Handles GET requests to the workspaces list fragment
-
-
-
Method Detail
-
indexGet
@GetMapping("/dashboard/workspaces") public java.lang.String indexGet()
Handles GET requests to the workspaces page- Returns:
- the path to the workspaces template
-
listGetFragment
@GetMapping("/dashboard/workspaces/list") public java.lang.String listGetFragment(@ModelAttribute("account") AccountWrapper account, @ModelAttribute("isAjax") boolean isAjax, org.springframework.ui.Model model) throws NotAjaxRequest
Handles GET requests to the workspaces list fragment- Parameters:
account
- the account object of the current userisAjax
- whether or not the request was ajax or notmodel
- holder for model attributes- Returns:
- the path to the list fragment template
- Throws:
NotAjaxRequest
- if the request was not an ajax one, the message is where to redirect the user to
-
addGet
@GetMapping("/dashboard/workspaces/add") public java.lang.String addGet(org.springframework.ui.Model model)
Handles GET requests to the add workspace page- Parameters:
model
- holder for model attributes- Returns:
- the path to the add workspace template
-
addPost
@PostMapping("/dashboard/workspaces/add") public java.lang.String addPost(@Valid @ModelAttribute @Valid WorkspaceForm workspaceForm, org.springframework.validation.BindingResult result, @ModelAttribute("account") AccountWrapper account, org.springframework.ui.Model model)
Handles POST requests to the add workspace page- Parameters:
workspaceForm
- the form that should be submitted in the requestresult
- the results of the validation on the form aboveaccount
- the account object of the current usermodel
- holder for model attributes- Returns:
- the path to the add workspace template
-
-