Package org.rhq.enterprise.server.measurement

Examples of org.rhq.enterprise.server.measurement.MeasurementBaselineManagerLocal


        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();
                Resource[] resources = null; // TODO hwr: fix this

                // TODO what do we really want here?
                // this looks like users want to see old baselines at display time
                //                    bb.saveBaselines(sessionId.intValue(), resources, m,
                //                                     begin.longValue(), end.longValue());
                log.trace("Set baselines in MetricsDisplayAction " + " for " + id + ": " + StringUtil.arrayToString(m));
            }

            RequestUtils.setConfirmation(request, Constants.CNF_METRICS_BASELINE_SET);
        } else if (displayForm.isEnableClicked()) {
            Integer[] m = displayForm.getM();
            if ((m != null) && (m.length > 0)) {
                Integer[] resources = displayForm.getR();
                baselineManager.enableAutoBaselineCalculation(subject, resources, m);
                log.trace("Enable auto baselines in MetricsDisplayAction " + " for " + id + ": "
                    + StringUtil.arrayToString(m));
            }

            RequestUtils.setConfirmation(request, Constants.CNF_AUTO_BASELINE_SET);
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.measurement.MeasurementBaselineManagerLocal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.