Package cvut.fel.controller
Class PublisherController
java.lang.Object
cvut.fel.controller.PublisherController
@RestController
public class PublisherController
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description PublisherController(PublisherService publisherService, DTOMapper mapper)
-
Method Summary
Modifier and Type Method Description org.springframework.http.ResponseEntity<java.lang.Object>
createContract(java.lang.Long publisherId, java.lang.Long authorId)
PublisherDTO
getPublisherById(java.lang.Long publisherId)
org.springframework.http.ResponseEntity<java.lang.Object>
publishNewBook(java.lang.Long publisherId, BookCreate bookCreate)
-
Constructor Details
-
Method Details
-
getPublisherById
@GetMapping("/publisher/{publisherId}") public PublisherDTO getPublisherById(@PathVariable java.lang.Long publisherId) -
createContract
@PutMapping("/publisher/{publisherId}/createContractWith/{authorId}") public org.springframework.http.ResponseEntity<java.lang.Object> createContract(@PathVariable java.lang.Long publisherId, @PathVariable java.lang.Long authorId) -
publishNewBook
@PutMapping("/publisher/{publisherId}/publishNewBook") public org.springframework.http.ResponseEntity<java.lang.Object> publishNewBook(@PathVariable java.lang.Long publisherId, @RequestBody BookCreate bookCreate)
-