Class TodoController
java.lang.Object
be.appify.prefab.example.todo.infrastructure.http.TodoController
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> create(@Valid CreateTodoRequest request) org.springframework.http.ResponseEntity<Void> org.springframework.http.ResponseEntity<TodoResponse> org.springframework.http.ResponseEntity<org.springframework.data.web.PagedModel<TodoResponse>> org.springframework.http.ResponseEntity<TodoResponse> org.springframework.http.ResponseEntity<TodoResponse> updateDescription(String id, @Valid TodoUpdateDescriptionRequest request)
-
Method Details
-
create
@RequestMapping(method=POST, path="") @PreAuthorize("hasAuthority('todo:create')") public org.springframework.http.ResponseEntity<Void> create(@Valid @RequestBody @Valid CreateTodoRequest request) -
getById
@RequestMapping(method=GET, path="/{id}") public org.springframework.http.ResponseEntity<TodoResponse> getById(@PathVariable String id) -
delete
-
getList
@RequestMapping(method=GET, path="") public org.springframework.http.ResponseEntity<org.springframework.data.web.PagedModel<TodoResponse>> getList(org.springframework.data.domain.Pageable pageable, String description) -
markDone
@RequestMapping(method=POST, path="/{id}/done") @PreAuthorize("isAuthenticated()") public org.springframework.http.ResponseEntity<TodoResponse> markDone(@PathVariable String id) -
updateDescription
@RequestMapping(method=PUT, path="/{id}/description") @PreAuthorize("hasAuthority('todo:update')") public org.springframework.http.ResponseEntity<TodoResponse> updateDescription(@PathVariable String id, @Valid @RequestBody @Valid TodoUpdateDescriptionRequest request)
-