Ejemplo n.º 1
0
 @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);
 }
Ejemplo n.º 2
0
 @RequestMapping(
     value = "/getPublishersCount",
     method = {RequestMethod.GET, RequestMethod.POST},
     produces = "application/json")
 public int getPublishersCount() {
   return publisherdao.getPublishersCount();
 }
Ejemplo n.º 3
0
 @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);
 }
Ejemplo n.º 4
0
 /*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);
 }