Class QuotesController
java.lang.Object
info.ejava.examples.svc.content.quotes.controllers.QuotesController
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<Void> containsQuote
(int id) org.springframework.http.ResponseEntity
<QuoteDTO> createQuote
(QuoteDTO quote) This method provides two example method signatures.org.springframework.http.ResponseEntity
<Void> org.springframework.http.ResponseEntity
<Void> deleteQuote
(int id) org.springframework.http.ResponseEntity
<QuoteDTO> getQuote
(int id) org.springframework.http.ResponseEntity
<QuoteListDTO> getQuotes
(int offset, int limit) org.springframework.http.ResponseEntity
<QuoteDTO> org.springframework.http.ResponseEntity
<Void> updateQuote
(int id, QuoteDTO quote)
-
Field Details
-
quotesService
-
-
Constructor Details
-
QuotesController
-
-
Method Details
-
createQuote
@RequestMapping(path="api/quotes", method=POST, consumes={"application/json","application/xml"}, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity<QuoteDTO> createQuote(@RequestBody QuoteDTO quote) This method provides two example method signatures. Use the @RequestBody form when headers are of no interest. Use RequestEntity<Quote> form when headers are of interest -
getQuotes
@RequestMapping(path="api/quotes", method=GET, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity<QuoteListDTO> getQuotes(@RequestParam(name="offset",defaultValue="0") int offset, @RequestParam(name="limit",defaultValue="0") int limit) -
updateQuote
-
containsQuote
@RequestMapping(path="api/quotes/{id}", method=HEAD) public org.springframework.http.ResponseEntity<Void> containsQuote(@PathVariable("id") int id) -
getQuote
@RequestMapping(path="api/quotes/{id}", method=GET, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity<QuoteDTO> getQuote(@PathVariable("id") int id) -
randomQuote
@RequestMapping(path="api/quotes/random", method=GET, produces={"application/json","application/xml"}) public org.springframework.http.ResponseEntity<QuoteDTO> randomQuote() -
deleteQuote
@RequestMapping(path="api/quotes/{id}", method=DELETE) public org.springframework.http.ResponseEntity<Void> deleteQuote(@PathVariable("id") int id) -
deleteAllQuotes
@RequestMapping(path="api/quotes", method=DELETE) public org.springframework.http.ResponseEntity<Void> deleteAllQuotes()
-