Class EditorController
java.lang.Object
edu.kit.datamanager.takita.editor.EditorController
Handles requests and directs them to the EditorService.
-
Constructor Summary
ConstructorsConstructorDescriptionEditorController(IEditorService editorService, IAssistanceService assistanceService) Constructor, initializes instances of used interfaces. -
Method Summary
Modifier and TypeMethodDescriptioninit(org.springframework.ui.Model model) Default endpoint.selectPage(String pageId, org.springframework.ui.Model model) Changes the currently displayed page.
-
Constructor Details
-
EditorController
@Autowired public EditorController(IEditorService editorService, IAssistanceService assistanceService) Constructor, initializes instances of used interfaces.- Parameters:
editorService- instance of IEditorServiceassistanceService- instance of IAssistanceService
-
-
Method Details
-
init
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
-