Package org.rhq.enterprise.gui.legacy

Examples of org.rhq.enterprise.gui.legacy.WebUser


    private static final Log LOG = LogFactory.getLog(MetricComponentUtilityUIBean.class);

    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 boolean getReadOnly() {
        return readOnly;
    }

    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);
View Full Code Here

        return "success";
    }

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

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

        return favorite;
    }

    public String toggleFavorite() {
        log.debug("toggleFavorite for " + resourceUIBean.getId());
        WebUser user = EnterpriseFacesContextUtility.getWebUser();
        WebUserPreferences preferences = user.getWebPreferences();
        WebUserPreferences.FavoriteResourcePortletPreferences favoriteResourcePreferences = preferences
            .getFavoriteResourcePortletPreferences();

        boolean isFav = favoriteResourcePreferences.isFavorite(resourceUIBean.getId());
        if (isFav) {
View Full Code Here

        }
        return result;
    }

    public PageControl getPageControl() {
        WebUser user = EnterpriseFacesContextUtility.getWebUser();
        PageControl pageControl = getPagedDataTableUIBean().getPageControl(user, pageControlView);
        if (log.isTraceEnabled()) {
            log.trace("getPageControl() -->" + pageControl);
        }
        return pageControl;
View Full Code Here

        }
        return pageControl;
    }

    public PageControl getDefaultPageControl() {
        WebUser user = EnterpriseFacesContextUtility.getWebUser();
        return getPagedDataTableUIBean().getDefaultPageControl(user, pageControlView);
    }
View Full Code Here

    public void setPageControl(PageControl pageControl) {
        if (log.isTraceEnabled()) {
            log.trace("setPageControl(" + pageControl + ")");
        }
        WebUser user = EnterpriseFacesContextUtility.getWebUser();
        getPagedDataTableUIBean().setPageControl(user, pageControlView, pageControl);
    }
View Full Code Here

            super(view, beanName);
        }

        @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

        return this.subject;
    }

    public boolean isFavorite() {
        if (this.isFavorite == null) {
            WebUser user = EnterpriseFacesContextUtility.getWebUser();
            WebUserPreferences preferences = user.getWebPreferences();
            WebUserPreferences.FavoriteGroupPortletPreferences favorites = preferences
                .getFavoriteGroupPortletPreferences();

            this.isFavorite = favorites.isFavorite(getGroupId());
        }
View Full Code Here

        return this.isFavorite;
    }

    public String toggleFavorite() {
        //        log.debug("toggleFavorite for " + resourceGroup);
        WebUser user = EnterpriseFacesContextUtility.getWebUser();
        WebUserPreferences preferences = user.getWebPreferences();
        WebUserPreferences.FavoriteGroupPortletPreferences favorites = preferences.getFavoriteGroupPortletPreferences();

        boolean isFav = favorites.isFavorite(getGroupId());
        if (isFav) {
            favorites.removeFavorite(getGroupId());
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.gui.legacy.WebUser

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.