Package org.rhq.enterprise.server.measurement.MeasurementPreferences

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


    private boolean readOnly;

    public MetricComponentUtilityUIBean() {
        WebUser user = EnterpriseFacesContextUtility.getWebUser();
        MeasurementPreferences preferences = user.getMeasurementPreferences();
        MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();
        this.readOnly = rangePreferences.readOnly;

        LOG.debug("Creating MetricComponentUtilityUIBean: " + rangePreferences);
    }
View Full Code Here


    }

    public String update() {
        WebUser user = EnterpriseFacesContextUtility.getWebUser();
        MeasurementPreferences preferences = user.getMeasurementPreferences();
        MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();

        int value = FacesContextUtility.getOptionalRequestParameter(MetricComponent.VALUE, Integer.class, -1);
        String unit = FacesContextUtility.getOptionalRequestParameter(MetricComponent.UNIT, String.class, null);

        readOnly = false;
View Full Code Here

    }

    public String switchToSimpleMode() {
        WebUser user = EnterpriseFacesContextUtility.getWebUser();
        MeasurementPreferences preferences = user.getMeasurementPreferences();
        MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();

        readOnly = false;
        rangePreferences.readOnly = false;
        rangePreferences.unit = 3;
        rangePreferences.lastN = 8;
View Full Code Here

        @Override
        public PageList<EventComposite> fetchPage(PageControl pc) {
            WebUser user = EnterpriseFacesContextUtility.getWebUser();
            MeasurementPreferences preferences = user.getMeasurementPreferences();
            MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();

            EventSeverity[] severities = getEventSeverity();
            String search = getSearchFilter();
            String source = getSourceFilter();
View Full Code Here

        WebUser user = SessionUtils.getWebUser(request.getSession());
        MeasurementPreferences preferences = user.getMeasurementPreferences();
        Subject subject = user.getSubject();

        MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();
        long begin = rangePreferences.begin;
        long end = rangePreferences.end;

        ResourceGroupManagerLocal groupManager = LookupUtil.getResourceGroupManager();
        ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();
View Full Code Here

        HttpServletResponse response) throws Exception {

        try {
            WebUser user = SessionUtils.getWebUser(request.getSession());
            MeasurementPreferences preferences = user.getMeasurementPreferences();
            MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();
            long begin = rangePreferences.begin;
            long end = rangePreferences.end;
            long interval = TimeUtil.getInterval(begin, end, DefaultConstants.DEFAULT_CHART_POINTS);

            begin = Long.parseLong(WebUtility.getOptionalRequestParameter(request, "begin", "0"));
View Full Code Here

        int parent = WebUtility.getOptionalIntRequestParameter(request, "parent", -1);
        int type = WebUtility.getOptionalIntRequestParameter(request, "type", -1);

        WebUser user = SessionUtils.getWebUser(request.getSession());
        MeasurementPreferences preferences = user.getMeasurementPreferences();
        MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();
        Subject subject = user.getSubject();

        // Get metric range defaults
        long begin = rangePreferences.begin;
        long end = rangePreferences.end;
View Full Code Here

        WebUser user = SessionUtils.getWebUser(request.getSession());
        MeasurementPreferences preferences = user.getMeasurementPreferences();

        int resourceId = RequestUtils.getResourceId(request);
        try {
            MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();

            List<AvailabilityPoint> data = availabilityManager.findAvailabilitiesForResource(user.getSubject(),
                resourceId, rangePreferences.begin, rangePreferences.end, DefaultConstants.DEFAULT_CHART_POINTS,
                !rangePreferences.readOnly);
View Full Code Here

    // ---------------------------------------------------- Protected Methods

    protected void prepareForm(HttpServletRequest request, MetricsControlForm form) throws IllegalArgumentException {
        WebUser user = SessionUtils.getWebUser(request.getSession());
        MeasurementPreferences preferences = user.getMeasurementPreferences();
        MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();

        form.setReadOnly(rangePreferences.readOnly);
        form.setRn(rangePreferences.lastN);
        form.setRu(rangePreferences.unit);
        form.setRb(rangePreferences.begin);
View Full Code Here

        Subject subject = RequestUtils.getSubject(request);

        MeasurementProblemManagerLocal problemManager = LookupUtil.getMeasurementProblemManager();

        // Now fetch the display range
        MetricRangePreferences rangePreferences = preferences.getMetricRangePreferences();
        long beginTime = rangePreferences.begin;
        long endTime = rangePreferences.end;

        ProblemMetricsDisplayForm probForm = (ProblemMetricsDisplayForm) form;
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.measurement.MeasurementPreferences.MetricRangePreferences

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.