Class ContestController
java.lang.Object
info.ejava.examples.svc.springdoc.contests.controllers.ContestController
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<ContestDTO> createContest(ContestDTO newContest) org.springframework.http.ResponseEntity<Void> org.springframework.http.ResponseEntity<Void> deleteContest(int id) org.springframework.http.ResponseEntity<Void> doesContestExist(int id) org.springframework.http.ResponseEntity<ContestDTO> getContest(int id) org.springframework.http.ResponseEntity<ContestListDTO> getContests(int offset, int limit) org.springframework.http.ResponseEntity<Void> updateContest(int id, ContestDTO contestUpdate)
-
Field Details
-
contestService
-
-
Constructor Details
-
ContestController
-
-
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()
-