@RequestMapping( value = "/deletePublisher", method = {RequestMethod.GET, RequestMethod.POST}, consumes = "application/json") public List<Publisher> deletePublisher(@RequestBody Publisher publisher) { publisherdao.deletePublisher(publisher); return publisherdao.getAllPublishers(1, 5); }
@RequestMapping( value = "/getPublishersCount", method = {RequestMethod.GET, RequestMethod.POST}, produces = "application/json") public int getPublishersCount() { return publisherdao.getPublishersCount(); }
@RequestMapping( value = "/editPublisher", method = {RequestMethod.GET, RequestMethod.POST}, consumes = "application/json") public void editPublisher(@RequestBody List<Publisher> publishers) { for (Publisher publisher : publishers) publisherdao.updatePublisher(publisher); }
/*Admin Publisher*/ @RequestMapping( value = "/getPublishers/{pageNo}/{pageSize}", method = {RequestMethod.GET, RequestMethod.POST}, produces = "application/json") public List<Publisher> getPublishers(@PathVariable int pageNo, @PathVariable int pageSize) { return publisherdao.getAllPublishers(pageNo, pageSize); }