Class JSONWindDirectionController
java.lang.Object
eu.acclimatize.unison.jsoncontroller.JSONWindDirectionController
A controller to obtain wind direction data in a JSON format.
-
Constructor Summary
ConstructorsConstructorDescriptionJSONWindDirectionController(ItemListFinder<HarmonieItem> windDirectionFinder) Creates an instance of JSONWindDirectionController. -
Method Summary
Modifier and TypeMethodDescriptionwindDirection(String location, Date fromDate, Date toDate, javax.servlet.http.HttpServletResponse response) Finds a list of Jackson annotated wind direction data.
-
Constructor Details
-
JSONWindDirectionController
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
WindDirectionResultitems.
-