Class WorkspacesController


  • @Controller
    public class WorkspacesController
    extends java.lang.Object
    The controller that deals with the workspaces page
    • 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 page
      java.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 page
      java.lang.String indexGet()
      Handles GET requests to the workspaces page
      java.lang.String listGetFragment​(AccountWrapper account, boolean isAjax, org.springframework.ui.Model model)
      Handles GET requests to the workspaces list fragment
      • Methods inherited from class java.lang.Object

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

      • WorkspacesController

        public WorkspacesController()
    • 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 user
        isAjax - whether or not the request was ajax or not
        model - 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 request
        result - the results of the validation on the form above
        account - the account object of the current user
        model - holder for model attributes
        Returns:
        the path to the add workspace template