use of easytests.core.models.SubjectModelInterface 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 easytests.core.models.SubjectModelInterface 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 easytests.core.models.SubjectModelInterface in project easy-tests by malinink.
the class SubjectsController method read.
@GetMapping("{id}")
public String read(@PathVariable("id") Integer id, Model model) {
final SubjectsOptionsInterface subjectsOptions = new SubjectsOptions().withIssueStandard(new IssueStandardsOptions());
final SubjectModelInterface subjectModel = getSubjectModel(id, subjectsOptions);
final SubjectDto subject = new SubjectDto();
subject.map(subjectModel);
model.addAttribute("subject", subject);
model.addAttribute("issueStandardId", subjectModel.getIssueStandard().getId());
return "subjects/view";
}
use of easytests.core.models.SubjectModelInterface in project easy-tests by malinink.
the class SubjectsController method getSubjectModel.
private SubjectModelInterface getSubjectModel(Integer id) {
final SubjectModelInterface subjectModel = this.subjectsService.find(id);
checkModel(subjectModel);
return subjectModel;
}
use of easytests.core.models.SubjectModelInterface in project easy-tests by malinink.
the class SubjectsController method getSubjectModel.
private SubjectModelInterface getSubjectModel(Integer id, SubjectsOptionsInterface subjectsOptions) {
final SubjectModelInterface subjectModel = this.subjectsService.find(id, subjectsOptions);
checkModel(subjectModel);
return subjectModel;
}
Aggregations