@Path("oilprices")
public class OilPricesResource {

  private CommodityPriceService priceService = CommodityPriceService.getCommodityPriceService();

  @GET
  @Produces("application/json")
  public StatisticsAvilableForYears getAvailableStatisticsOilPrices() {
    return priceService.getAvailableStatisticsOilPrices();
  }

  @GET
  @Produces("application/json")
  @Path("/{year}")
  public OilPricesByYear getPricesForYear(@PathParam("year") int year) {
    return priceService.getOilPricesByYear(year);
  }
}
 @GET
 @Produces("application/json")
 @Path("/{year}")
 public OilPricesByYear getPricesForYear(@PathParam("year") int year) {
   return priceService.getOilPricesByYear(year);
 }
 @GET
 @Produces("application/json")
 public StatisticsAvilableForYears getAvailableStatisticsOilPrices() {
   return priceService.getAvailableStatisticsOilPrices();
 }