Пример #1
0
 @GET
 @LogPerformances(layer = "REST", operation = "list_all_players")
 public List<PlayerDto> listAll() {
   List<PlayerDto> ret = Lists.newArrayList();
   ret.addAll(DtoAssembler.get().toDto(application.listMusicians()));
   return ret;
 }
Пример #2
0
 @GET
 @LogPerformances(layer = "REST", operation = "list_all_players_by_category")
 @Path("/{category}")
 public List<PlayerDto> listByCategory(@PathParam("category") String category) {
   List<PlayerDto> ret = Lists.newArrayList();
   try {
     Category categ = Category.valueOf(category);
     if (categ != null) ret.addAll(DtoAssembler.get().toDto(application.findMusician(categ)));
   } catch (IllegalArgumentException e) {
     logger.error("Unable to list player of category;" + category + ";error;" + e.getMessage());
   }
   return ret;
 }