コード例 #1
0
@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);
  }
}
コード例 #2
0
 @GET
 @Produces("application/json")
 @Path("/{year}")
 public OilPricesByYear getPricesForYear(@PathParam("year") int year) {
   return priceService.getOilPricesByYear(year);
 }
コード例 #3
0
 @GET
 @Produces("application/json")
 public StatisticsAvilableForYears getAvailableStatisticsOilPrices() {
   return priceService.getAvailableStatisticsOilPrices();
 }