Exemple #1
0
 @POST
 @Path("{id}")
 @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
 public void edit(
     @PathParam("id") Long id,
     @FormParam("name") String name,
     @FormParam("description") String description) {
   Genre genre = genreManager.get(id);
   if (genre != null) {
     genreManager.update(genre, name, description);
   }
 }
Exemple #2
0
 @DELETE
 @Path("{id}")
 public void delete(@PathParam("id") Long id) {
   genreManager.delete(genreManager.get(id));
 }
Exemple #3
0
 @GET
 @Path("{id}")
 public Genre get(@PathParam("id") Long id) {
   return genreManager.get(id);
 }