Controller methods for Modules
DTO
Name: ModuleViewDTO
This DTO is a:
-
Create -
Patch -
View
It has the following fields:
Type | Name | Comment |
---|---|---|
Long | id | |
String | name | |
EditionViewDTO | edition | |
List | assignmnets | |
List | divisions | |
List | groups |
notes:
- Ruben is also using ModuleViewDTO but he only uses id and name in it. Maybe I can rename it to something like ModuleFullViewDTO or something similar on Ruben's end. Or sending nulls is also an option.
- AssignmentViewDTO is defined by Hanka
- DivisionViewDTO not sure what it contains, maybe id, and list of groups/students or just their sizes?
- GroupViewDTO likewise to the previous, id and list or size, we can determine this later when we're making GUI
Endpoint (Method)
name: ModuleControllerApi.getModuleById(...)
Params | Type | Comment |
---|---|---|
Input | ||
moduleId | Long | |
Output | ||
module | ModuleViewDTO | see my def of ModuleViewDTO for retrieval info |
Endpoint (Method)
name: ModuleControllerApi.getModuleById(...)
Params | Type | Comment |
---|---|---|
Input | ||
moduleId | Long | |
Output | ||
module | ModuleViewDTO | see my def of ModuleViewDTO for retrieval info |
Endpoint (Method)
name: ModuleControllerApi.getModuleById(...)
Params | Type | Comment |
---|---|---|
Input | ||
moduleId | Long | |
Output | ||
module | ModuleViewDTO | see my def of ModuleViewDTO for retrieval info |
What does this method do?
- fetch a module by it's id
Endpoint (Method)
name: ModuleDivisionControllerApi.addDivision(...)
Params | Type | Comment |
---|---|---|
Input | ||
moduleId | Long | |
Output | ||
divisionId | Long | not sure if necessary |
What does this method do?
- create a new division with empty groups assigned
Endpoint (Method)
Already defined by Hanka.
name: AssignmentControllerApi.addAssignment(...)
Params | Type | Comment |
---|---|---|
Input | ||
assignment | AssignmentCreateDTO | |
Output | ||
id | Long | id of the new assignment |
What does this method do?
- create a new assignmnet