Class TodoController

java.lang.Object
be.appify.prefab.example.todo.infrastructure.http.TodoController

@RestController @RequestMapping(path="todos") public class TodoController extends Object
  • 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

      @RequestMapping(method=DELETE, path="/{id}") @PreAuthorize("hasAuthority('todo:delete')") public org.springframework.http.ResponseEntity<Void> delete(@PathVariable String id)
    • 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)