Exemplo n.º 1
0
 @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
 public ModelAndView deleteCompetition(@PathVariable("id") Integer id) {
   LOG.info("Se va a proceder a borrar una competicion");
   handlerCompetitions.removeCompetition(new Competition(id));
   return this.getResponse("Competición borrada correctamente");
 }
Exemplo n.º 2
0
 @RequestMapping(method = RequestMethod.PUT)
 public ModelAndView updateCompetition(@RequestBody Competition competition) {
   LOG.info("Se va a proceder a actualizar una competicion");
   handlerCompetitions.updateCompetition(competition);
   return this.getResponse("Competición actualizada correctamente");
 }
Exemplo n.º 3
0
 @RequestMapping(method = RequestMethod.GET)
 public Set<Competition> getAllCompetitions() {
   LOG.info("Se recuperan todas las competiciones");
   return handlerCompetitions.getCompetitions();
 }
Exemplo n.º 4
0
 @RequestMapping(value = "/{id}", method = RequestMethod.GET)
 public Competition getCompetitionById(@PathVariable("id") Integer id) {
   LOG.info("Se recupera una competicion");
   Competition competition = new Competition(id);
   return handlerCompetitions.findCompetition(competition);
 }
Exemplo n.º 5
0
 @RequestMapping(method = RequestMethod.POST)
 public ModelAndView insertCompetition(@RequestBody Competition competition) {
   LOG.info("Se va a proceder a insertar una competicion");
   handlerCompetitions.addCompetition(competition);
   return this.getResponse("Competición insertada correctamente");
 }