use of org.springframework.web.bind.annotation.GetMapping in project easy-tests by malinink.
the class TopicsController method update.
@GetMapping("update/{topicId}/")
public String update(Model model, @PathVariable Integer topicId, @PathVariable("subjectId") Integer subjectId) {
final SubjectModelInterface subjectModel = getCurrentSubjectModel(subjectId, false);
final TopicModelInterface topicModel = this.getTopicModel(topicId, subjectId);
final TopicDto topic = new TopicDto();
topic.map(topicModel);
setUpdateBehaviour(model);
model.addAttribute("topic", topic);
model.addAttribute("subjectId", subjectId);
return "topics/form";
}
use of org.springframework.web.bind.annotation.GetMapping in project easy-tests by malinink.
the class TopicsController method deleteConfirmation.
@GetMapping("delete/{topicId}")
public String deleteConfirmation(Model model, @PathVariable("topicId") Integer topicId, @PathVariable("subjectId") Integer subjectId) {
final SubjectModelInterface subjectModel = getCurrentSubjectModel(subjectId, false);
final TopicModelInterface topicModel = this.getTopicModel(topicId, subjectId);
model.addAttribute("subjectId", subjectId);
return "topics/delete";
}
use of org.springframework.web.bind.annotation.GetMapping in project easy-tests by malinink.
the class TopicsController method read.
@GetMapping("{topicId}")
public String read(Model model, @PathVariable("subjectId") Integer subjectId, @PathVariable("topicId") Integer topicId) {
final SubjectModelInterface subjectModel = getCurrentSubjectModel(subjectId, false);
final TopicModelInterface topicModel = getTopicModel(topicId, subjectId);
model.addAttribute("topic", topicModel);
model.addAttribute("subjectId", subjectId);
return "topics/view";
}
use of org.springframework.web.bind.annotation.GetMapping in project easy-tests by malinink.
the class TopicsController method list.
@GetMapping("")
public String list(Model model, @PathVariable("subjectId") Integer subjectId) {
final SubjectModelInterface subjectModel = getCurrentSubjectModel(subjectId, true);
final List<TopicModelInterface> topics = subjectModel.getTopics();
model.addAttribute("topics", topics);
model.addAttribute("subjectId", subjectId);
return "topics/list";
}
use of org.springframework.web.bind.annotation.GetMapping in project easy-tests by malinink.
the class TopicsController method create.
@GetMapping("create/")
public String create(Model model, @PathVariable("subjectId") Integer subjectId) {
final SubjectModelInterface subjectModel = getCurrentSubjectModel(subjectId, false);
final TopicDto topic = new TopicDto();
setCreateBehaviour(model);
model.addAttribute("topic", topic);
model.addAttribute("subjectId", subjectId);
return "topics/form";
}
Aggregations