/** * Returns information of all existing alerts. * <p> * <i> Example URL: /alerts</i> * </p> * * @return a list of {@link Alert} with all existing alerts. */ @RequestMapping(method = GET, value = "") @ResponseBody public List<Alert> getAll() { return alertService.getAlerts(); }
/** * Returns information of all closed alerts. * <p> * <i> Example URL: /alerts/closed</i> * </p> * * @return a list of {@link Alert} with all closed alerts. */ @RequestMapping(method = GET, value = "closed") @ResponseBody public List<Alert> getClosedAlerts() { return alertService.getClosedAlerts(); }
/** * Returns information of all open alerts. * <p> * <i> Example URL: /alerts/open</i> * </p> * * @return a list of {@link Alert} with all open alerts. */ @RequestMapping(method = GET, value = "open") @ResponseBody public List<Alert> getOpenAlerts() { return alertService.getOpenAlerts(); }
/** * Returns the alert of a given alertId. * <p> * <i> Example URL: /alerts/{alertId}</i> * </p> * * @param alertId * Alert ID bounded from path. * @return the alert of a given alertId. */ @RequestMapping(method = GET, value = "{alertId}") @ResponseBody public Alert getAlert(@PathVariable String alertId) { return alertService.getAlert(alertId); } }