Interface TaskGroupController<D,T>
- Type Parameters:
D
- The type of the task group DTO.T
- The type of the additional data inModifyTaskGroupDto
.
- All Known Implementing Classes:
BaseTaskGroupController
,BaseTaskGroupControllerWithoutRequestMapping
public interface TaskGroupController<D,T>
Controller for managing task groups.
Add @RestController
and @RequestMapping("/api/taskGroup")
to the implementing class.
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(long id, ModifyTaskGroupDto<T> dto) Creates a new task group.delete
(long id) Deletes the task group.get
(long id) Returns the task group data.update
(long id, ModifyTaskGroupDto<T> dto) Updates the task group data.
-
Method Details
-
get
@GetMapping(value="/{id}", produces="application/json") ResponseEntity<D> get(@PathVariable long id) Returns the task group data.- Parameters:
id
- The identifier of the requested task group.- Returns:
- The task group details or an error response.
- Implementation Requirements:
- Only clients with role
AuthConstants.CRUD
should be allowed to access this endpoint.
-
create
@PostMapping(value="/{id}", produces="application/json", consumes="application/json") ResponseEntity<TaskGroupModificationResponseDto> create(@PathVariable long id, @RequestBody ModifyTaskGroupDto<T> dto) Creates a new task group.- Parameters:
id
- The identifier of the task group (generated by task administration app).dto
- The task group data.- Returns:
- The task-specific task group data or an error response.
- Implementation Requirements:
- Only clients with role
AuthConstants.CRUD
should be allowed to access this endpoint.
-
update
@PutMapping(value="/{id}", consumes="application/json") ResponseEntity<TaskGroupModificationResponseDto> update(@PathVariable long id, @RequestBody ModifyTaskGroupDto<T> dto) Updates the task group data.- Parameters:
id
- The identifier of the task group.dto
- The new task group data.- Returns:
- No content or an error response.
- Implementation Requirements:
- Only clients with role
AuthConstants.CRUD
should be allowed to access this endpoint.
-
delete
Deletes the task group.- Parameters:
id
- The identifier of the task group.- Returns:
- No content or an error response.
- Implementation Requirements:
- Only clients with role
AuthConstants.CRUD
should be allowed to access this endpoint.
-