/** * Evaluates the threshold in light of the provided datasource value and * create any events for thresholds. * * Semi-deprecated method; only used for old Thresholding code (threshd and friends) * Implemented in terms of the other method with the same name and the extra param * * @param values * map of values (by datasource name) to evaluate against the threshold (might be an expression) * @param date * Date to use in created events * @return List of events */ public List<Event> evaluateAndCreateEvents(Map<String, Double> values, Date date) { return evaluateAndCreateEvents(null, values, date); }
resourceWrapper.setDsLabel(thresholdEntity.getDatasourceLabel()); try { List<Event> thresholdEvents = thresholdEntity.evaluateAndCreateEvents(resourceWrapper, values, date); eventsList.addAll(thresholdEvents); } catch (Exception e) {