Package org.rhq.enterprise.gui.legacy

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


        // Set title
        MessageResources res = getResources(request);
        feed.setTitle(res.getMessage("dash.home.ResourceHealth"));

        // Get the resources health
        WebUser user = getWebUser(request);
        if (user != null) {
            WebUserPreferences preferences = user.getWebPreferences();
            FavoriteResourcePortletPreferences favoriteResourcePreferences = preferences
                .getFavoriteResourcePortletPreferences();

            PageList<ResourceHealthComposite> results = manager.findResourceHealth(user.getSubject(),
                favoriteResourcePreferences.asArray(), PageControl.getUnlimitedInstance());

            if ((results != null) && (results.size() > 0)) {
                PageList<DisambiguationReport<ResourceHealthComposite>> list = DisambiguatedResourceListUtil.disambiguate(manager, results, ViewAction.RESOURCE_ID_EXTRACTOR);
               
View Full Code Here


    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) throws Exception {

        PropertiesForm pForm = (PropertiesForm) form;

        WebUser user = SessionUtils.getWebUser(request.getSession());
        WebUserPreferences preferences = user.getWebPreferences();

        String forwardStr = RetCodeConstants.SUCCESS_URL;
        if (pForm.isRemoveClicked()) {
            FavoriteResourcePortletPreferences favoriteResourcePreferences = preferences
                .getFavoriteResourcePortletPreferences();
View Full Code Here

    @Override
    public ActionForward execute(ComponentContext context, ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response) throws Exception {
        PropertiesForm pForm = (PropertiesForm) form;
        PageControl pc = WebUtility.getPageControl(request);
        WebUser user = SessionUtils.getWebUser(request.getSession());
        WebUserPreferences preferences = user.getWebPreferences();

        // start a new flow, overriding an previous work that the user might have abandoned
        SessionUtils.removeList(request.getSession(), Constants.PENDING_RESOURCES_SES_ATTR);

        pForm.setDisplayOnDash(true);

        FavoriteResourcePortletPreferences favoriteResourcePreferences = preferences
            .getFavoriteResourcePortletPreferences();
        pForm.setFavoriteResourcePortletPreferences(favoriteResourcePreferences);

        PageList<Resource> resources = LookupUtil.getResourceManager().findResourceByIds(user.getSubject(),
            favoriteResourcePreferences.asArray(), false, pc);

        request.setAttribute("resourceHealthList", resources);
        request.setAttribute("resourceHealthTotalSize", resources.getTotalSize());
View Full Code Here

        PageList<DisambiguationReport<ResourceHealthComposite>> list = new PageList<DisambiguationReport<ResourceHealthComposite>>();
        boolean showAvailability = true;
        boolean showAlerts = true;
        try {
            WebUser user = SessionUtils.getWebUser(request.getSession());
            if (user == null) {
                // session timed out, return prematurely
                return null;
            }

            WebUserPreferences preferences = user.getWebPreferences();
            PageControl pc = WebUtility.getPageControl(request);

            FavoriteResourcePortletPreferences favoriteResourcePreferences = preferences
                .getFavoriteResourcePortletPreferences();

            ResourceManagerLocal manager = LookupUtil.getResourceManager();
            PageList<ResourceHealthComposite> lst = manager.findResourceHealth(user.getSubject(), favoriteResourcePreferences.asArray(), pc);
           
            list = DisambiguatedResourceListUtil.disambiguate(manager, lst, RESOURCE_ID_EXTRACTOR);
           
            showAvailability = favoriteResourcePreferences.showAvailability;
            showAlerts = favoriteResourcePreferences.showAlerts;
View Full Code Here

    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) throws Exception {

        PropertiesForm pForm = (PropertiesForm) form;
        HttpSession session = request.getSession();
        WebUser user = SessionUtils.getWebUser(session);
        WebUserPreferences preferences = user.getWebPreferences();

        ActionForward forward = checkSubmit(request, mapping, form);

        if (forward != null) {
            return forward;
View Full Code Here

    @Override
    public ActionForward execute(ComponentContext context, ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response) throws Exception {
        PropertiesForm pForm = (PropertiesForm) form;

        WebUser user = SessionUtils.getWebUser(request.getSession());
        WebUserPreferences preferences = user.getWebPreferences();

        pForm.setDisplayOnDash(true);

        ProblemResourcesPortletPreferences problemResourcePreferences = preferences
            .getProblemResourcesPortletPreferences();
View Full Code Here

        List<DisambiguationReport<ProblemResourceComposite>> disambiguatedList = new ArrayList<DisambiguationReport<ProblemResourceComposite>>();

        String timeRange = getResources(request).getMessage("dash.home.ProblemResources.timeRangeUnlimited");
        try {
            WebUser user = SessionUtils.getWebUser(request.getSession());
            if (user == null) {
                // session timed out, return prematurely
                return null;
            }

            Subject subject = user.getSubject();
            WebUserPreferences preferences = user.getWebPreferences();

            ProblemResourcesPortletPreferences problemResourcePreferences = preferences
                .getProblemResourcesPortletPreferences();

            long begin = 0;
View Full Code Here

public class RemovePortletAction extends BaseAction {
    @Override
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) throws Exception {
        HttpSession session = request.getSession();
        WebUser user = SessionUtils.getWebUser(session);

        String portletName = request.getParameter(Constants.REM_PORTLET_PARAM);

        DashboardUtils.removePortlet(user, portletName);
View Full Code Here

        GroupHubForm hubForm = (GroupHubForm) form;
        PageControl pageControl = WebUtility.getPageControl(request);
        Subject subject = RequestUtils.getSubject(request);

        HttpSession session = request.getSession();
        WebUser user = SessionUtils.getWebUser(request.getSession());

        // Setup whether we're displaying list view or chart view.
        HubUtils.initView(hubForm, user);

        // Find resources specified by category and potentially type.
View Full Code Here

            return null;
        }

        log.info("Viewing resource " + resource + "...");

        WebUser webUser = SessionUtils.getWebUser(request.getSession());
        Subject subject = webUser.getSubject();

        try {
            ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();

            PageList<Resource> childServers = resourceManager.findChildResourcesByCategoryAndInventoryStatus(subject,
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.