java.lang.Object
info.ejava.examples.svc.springdoc.contests.controllers.ContestController

@RestController public class ContestController extends Object
  • Field Details

  • Constructor Details

    • ContestController

      public ContestController(ContestService contestService)
  • Method Details

    • createContest

      @RequestMapping(method=POST, path="/api/contests", consumes={"application/json","application/xml"}, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity<ContestDTO> createContest(@RequestBody ContestDTO newContest)
    • getContests

      @RequestMapping(method=GET, path="/api/contests", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity<ContestListDTO> getContests(@RequestParam(name="offset",defaultValue="0") int offset, @RequestParam(name="limit",defaultValue="0") int limit)
    • getContest

      @RequestMapping(method=GET, path="/api/contests/{contestId}", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity<ContestDTO> getContest(@PathVariable("contestId") int id)
    • doesContestExist

      @RequestMapping(method=HEAD, path="/api/contests/{contestId}", produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity<Void> doesContestExist(@PathVariable("contestId") int id)
    • updateContest

      @RequestMapping(method=PUT, path="/api/contests/{contestId}", consumes={"application/json","application/xml"}) public org.springframework.http.ResponseEntity<Void> updateContest(@PathVariable(name="contestId") int id, @RequestBody ContestDTO contestUpdate)
    • deleteContest

      @RequestMapping(method=DELETE, path="/api/contests/{contestId}") public org.springframework.http.ResponseEntity<Void> deleteContest(@PathVariable(name="contestId") int id)
    • deleteAllContests

      @RequestMapping(method=DELETE, path="/api/contests") public org.springframework.http.ResponseEntity<Void> deleteAllContests()