Class EditorController

java.lang.Object
edu.kit.datamanager.takita.editor.EditorController

@Controller @RequestMapping("/editor") public class EditorController extends Object
Handles requests and directs them to the EditorService.
  • Constructor Details

    • EditorController

      @Autowired public EditorController(IEditorService editorService, IAssistanceService assistanceService)
      Constructor, initializes instances of used interfaces.
      Parameters:
      editorService - instance of IEditorService
      assistanceService - instance of IAssistanceService
  • Method Details

    • init

      @GetMapping public String init(org.springframework.ui.Model model)
      Default endpoint. Updates the model and shows the editor, if a current page is set.
      Parameters:
      model - the holder for model attributes. Used to pass attributes back to the view
      Returns:
      a string to indicate the redirect
    • selectPage

      @GetMapping("/{pageId}") public String selectPage(@PathVariable("pageId") String pageId, org.springframework.ui.Model model)
      Changes the currently displayed page.
      Parameters:
      pageId - Identifier in the editor of the page that should be displayed
      Returns:
      name of html file to display editor