Examples of MetricViewsPreferences


Examples of org.rhq.enterprise.server.measurement.MeasurementPreferences.MetricViewsPreferences

public class MeasurementViewManagerBean implements MeasurementViewManagerLocal {

    public List<String> getViewNames(Subject user, EntityContext context) {
        String key = context.getLegacyKey();
        MeasurementPreferences measurementPreferences = new MeasurementPreferences(user);
        MetricViewsPreferences prefs = measurementPreferences.getMetricViews(key);
        return prefs.views;
    }
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.MeasurementPreferences.MetricViewsPreferences

    }

    public void createView(Subject user, EntityContext context, String viewName) throws MeasurementViewException {
        String key = context.getLegacyKey();
        MeasurementPreferences measurementPreferences = new MeasurementPreferences(user);
        MetricViewsPreferences prefs = measurementPreferences.getMetricViews(key);
        if (prefs.views.contains(viewName)) {
            throw new MeasurementViewException("View name already in use: '" + viewName + "'");
        }
        prefs.views.add(viewName);
        measurementPreferences.setMetricViews(prefs, key);
View Full Code Here

Examples of org.rhq.enterprise.server.measurement.MeasurementPreferences.MetricViewsPreferences

    }

    public void deleteView(Subject user, EntityContext context, String viewName) {
        String key = context.getLegacyKey();
        MeasurementPreferences measurementPreferences = new MeasurementPreferences(user);
        MetricViewsPreferences prefs = measurementPreferences.getMetricViews(key);
        prefs.views.remove(viewName); // graceful no-op if viewName did not exist in context
        measurementPreferences.setMetricViews(prefs, key);
        measurementPreferences.deleteMetricViewData(key, viewName);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.