Examples of consumeURIPart()


Examples of org.jboss.dashboard.ui.components.ControllerStatus.consumeURIPart()

        // Check session expiration
        if (request.getRequestedSessionId() != null && !request.getRequestedSessionId().equals(session.getId())) {
            log.debug("Session expiration detected.");
            ControllerStatus controllerStatus = ControllerStatus.lookup();
            controllerStatus.setResponse(new RedirectToURLResponse(getExpirationRecoveryURL(request)));
            controllerStatus.consumeURIPart(controllerStatus.getURIToBeConsumed());
            return false;
        }
        return true;
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.components.ControllerStatus.consumeURIPart()

        // No friendly -> nothing to do.
        if (!servletPath.startsWith(FRIENDLY_MAPPING)) return true;

        String contextPath = request.getContextPath();
        controllerStatus.consumeURIPart(FRIENDLY_MAPPING);
        navigationManager.setShowingConfig(false);
        String requestUri = request.getRequestURI();
        String relativeUri = requestUri.substring(contextPath == null ? 0 : (contextPath.length()));
        relativeUri = relativeUri.substring(servletPath == null ? 0 : (servletPath.length()));
View Full Code Here

Examples of org.jboss.dashboard.ui.components.ControllerStatus.consumeURIPart()

        int endLocaleUri = relativeUri.indexOf("/", startLocaleUri + 1);
        endLocaleUri = endLocaleUri > 0 ? endLocaleUri : relativeUri.length();
        String localeUri = relativeUri.substring(startLocaleUri + 1, endLocaleUri);
        Locale uriLocale = localeManager.getLocaleById(localeUri);
        if (uriLocale != null) {
            controllerStatus.consumeURIPart("/" + localeUri);
            relativeUri = relativeUri.substring(localeUri.length() + 1);
            // Use the locale specified in the URI value only if no locale specified in the qeury string.
            if (localeToSet == null) localeManager.setCurrentLocale(uriLocale);
        }
View Full Code Here

Examples of org.jboss.dashboard.ui.components.ControllerStatus.consumeURIPart()

                                navigationManager.setUserRequiresLoginBackdoor(true);
                                navigationManager.setCurrentWorkspace(workspace);
                            }
                        }
                    }
                    controllerStatus.consumeURIPart("/" + workspaceCandidate);
                } catch (Exception e) {
                    log.error("Cannot set current workspace.", e);
                }
            }
            // Check the user has access permissions to the target section.
View Full Code Here

Examples of org.jboss.dashboard.ui.components.ControllerStatus.consumeURIPart()

                                navigationManager.setUserRequiresLoginBackdoor(true);
                                navigationManager.setCurrentSection(section);
                            }
                        }
                    }
                    controllerStatus.consumeURIPart("/" + workspaceCandidate);
                    controllerStatus.consumeURIPart("/" + sectionCandidate);
                } catch (Exception e) {
                    log.error("Cannot set current section.", e);
                }
            }
View Full Code Here

Examples of org.jboss.dashboard.ui.components.ControllerStatus.consumeURIPart()

                                navigationManager.setCurrentSection(section);
                            }
                        }
                    }
                    controllerStatus.consumeURIPart("/" + workspaceCandidate);
                    controllerStatus.consumeURIPart("/" + sectionCandidate);
                } catch (Exception e) {
                    log.error("Cannot set current section.", e);
                }
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.jboss.dashboard.ui.components.ControllerStatus.consumeURIPart()

            log.warn("Memory is running low ...");
            memoryProfiler.freeMemory();
            if (memoryProfiler.isLowMemory()) {
                ControllerStatus controllerStatus = ControllerStatus.lookup();
                controllerStatus.setResponse(new SendErrorResponse(503));
                controllerStatus.consumeURIPart(controllerStatus.getURIToBeConsumed());
                log.error("Memory is so low that the request had to be canceled - 503 sent. Consider increasing the JVM memory.");
                return false;
            }
        }
        return true;
View Full Code Here

Examples of org.jboss.dashboard.ui.components.ControllerStatus.consumeURIPart()

        ControllerStatus controllerStatus = ControllerStatus.lookup();
        if (StringUtils.isEmpty(pAction) || StringUtils.isEmpty(idPanel)) {
            log.debug("Running bean action.");
            CommandResponse res = beanDispatcher.handleRequest(req);
            if (request.getServletPath().indexOf("/" + URLMarkupGenerator.COMMAND_RUNNER) != -1) {
                controllerStatus.consumeURIPart(controllerStatus.getURIToBeConsumed());
            }
            if (res != null) {
                controllerStatus.setResponse(res);
            }
            return true;
View Full Code Here

Examples of org.jboss.dashboard.ui.components.ControllerStatus.consumeURIPart()

                        CommandResponse response = handler.execute(panel, req);
                        request.removeAttribute(Parameters.RENDER_PANEL);
                        if (response != null)
                            controllerStatus.setResponse(response);
                        if (request.getServletPath().indexOf("/" + URLMarkupGenerator.COMMAND_RUNNER) != -1) {
                            controllerStatus.consumeURIPart(controllerStatus.getURIToBeConsumed());
                        }
                    }
                }
            }
        } finally {
View Full Code Here

Examples of org.jboss.dashboard.ui.controller.RequestContext.consumeURIPart()

        // Check session expiration
        if (request.getRequestedSessionId() != null && !request.getRequestedSessionId().equals(session.getId())) {
            log.debug("Session expiration detected.");
            requestContext.setResponse(new RedirectToURLResponse(getExpirationRecoveryURL(request)));
            requestContext.consumeURIPart(requestContext.getURIToBeConsumed());
            return false;
        }
        return true;
    }
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.