Map forwardParams = displayForm.getForwardParams();
Integer id = displayForm.getId();
WebUser user = SessionUtils.getWebUser(request.getSession());
MeasurementPreferences preferences = user.getMeasurementPreferences();
Subject subject = RequestUtils.getSubject(request);
MeasurementBaselineManagerLocal baselineManager = LookupUtil.getMeasurementBaselineManager();
if (displayForm.isCompareClicked()) {
return returnCompare(request, mapping, forwardParams);
} else if (displayForm.isChartClicked()) {
forwardParams.put(ParamConstants.METRIC_ID_PARAM, displayForm.getM());
return returnChart(request, mapping, forwardParams);
} else if (displayForm.isThresholdClicked()) {
Integer threshold = displayForm.getT();
preferences.setMetricThresholdPreference(threshold);
log.trace("saving threshold pref [" + threshold + "]");
LogFactory.getLog("user.preferences").trace(
"Invoking setUserPrefs" + " in MetricsDisplayAction " + " for " + user.getId() + " at "
+ System.currentTimeMillis() + " user.prefs = " + user.getWebPreferences());
} else if (displayForm.isUsersetClicked()) {
Integer[] m = displayForm.getM();
if ((m != null) && (m.length > 0)) {
MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();
Long begin = rangePreferences.begin;
Long end = rangePreferences.end;
Integer[] resourceIds = displayForm.getR();