Class JSONWindDirectionController

java.lang.Object
eu.acclimatize.unison.jsoncontroller.JSONWindDirectionController

@RestController public class JSONWindDirectionController extends Object
A controller to obtain wind direction data in a JSON format.
  • Constructor Details

    • JSONWindDirectionController

      public JSONWindDirectionController(ItemListFinder<HarmonieItem> windDirectionFinder)
      Creates an instance of JSONWindDirectionController.
      Parameters:
      windDirectionFinder - Used to find an ordered list of wind direction data.
  • Method Details

    • windDirection

      @GetMapping(value="/locationCollection/{name}/windDirection", produces="application/json") public Iterable<HarmonieItem> windDirection(@PathVariable("name") String location, @RequestParam("fromDate") @DateTimeFormat(pattern="d-M-yyyy") Date fromDate, @RequestParam("toDate") @DateTimeFormat(pattern="d-M-yyyy") Date toDate, javax.servlet.http.HttpServletResponse response)
      Finds a list of Jackson annotated wind direction data.
      Parameters:
      location - The location of interest.
      fromDate - The start date for the data (inclusive).
      toDate - The end date for the data (inclusive).
      response - The HTTP servlet response used to add the vary and cache control headers.
      Returns:
      A list of WindDirectionResult items.