Package yalp.mvc.results

Examples of yalp.mvc.results.Redirect


     * @param parameters  Any additional parameters that weren't included in the constructor. For example you might need to add a response_type.
     */
    public void retrieveVerificationCode(String callbackURL, Map<String, String> parameters) {
        parameters.put(CLIENT_ID_NAME, clientid);
        parameters.put(REDIRECT_URI, callbackURL);
        throw new Redirect(authorizationURL, parameters);
    }
View Full Code Here


        // Mark an evolution as resolved
        if (Yalp.mode.isDev() && request.method.equals("POST") && request.url.matches("^/@evolutions/force/[0-9]+$")) {
            int revision = Integer.parseInt(request.url.substring(request.url.lastIndexOf("/") + 1));
            resolve(revision);
            new Redirect("/").apply(request, response);
            return true;
        }

        // Apply the current evolution script
        if (Yalp.mode.isDev() && request.method.equals("POST") && request.url.equals("/@evolutions/apply")) {

            for (Entry<String, VirtualFile> moduleRoot : modulesWithEvolutions.entrySet()) {
                applyScript(true, moduleRoot.getKey(), moduleRoot.getValue());
            }
            new Redirect("/").apply(request, response);
            return true;
        }
        return super.rawInvocation(request, response);
    }
View Full Code Here

     */
    protected static void redirect(String url, boolean permanent) {
        if (url.matches("^([^./]+[.]?)+$")) { // fix Java !
            redirect(url, permanent, new Object[0]);
        }
        throw new Redirect(url, permanent);
    }
View Full Code Here

                    currentActionDefinition.star = actionDefinition.star;
                    currentActionDefinition.args = actionDefinition.args;

                    _currentReverse.remove();
                } else {
                    throw new Redirect(actionDefinition.toString(), permanent);
                }
            } catch (NoRouteFoundException e) {
                StackTraceElement element = YalpException.getInterestingStrackTraceElement(e);
                if (element != null) {
                    throw new NoRouteFoundException(action, newArgs, Yalp.classes.getApplicationClass(element.getClassName()), element.getLineNumber());
View Full Code Here

            if (Logger.isTraceEnabled()) {
                // Debug
                Logger.trace("Send request %s", url);
            }

            throw new Redirect(url);
        } catch (Redirect e) {
            throw e;
        } catch (YalpException e) {
            throw e;
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of yalp.mvc.results.Redirect

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.