Package play.mvc.results

Examples of play.mvc.results.Redirect


        if (federatedIdentity != null) {
            url = getUserService().createLoginURL(returnURL, null, federatedIdentity, attributesRequest);
        } else {
            url = getUserService().createLoginURL(returnURL);
        }
        throw new Redirect(url);
    }
View Full Code Here


    }

    public static void logout(String returnAction) {
        String returnURL = Router.getFullUrl(returnAction);
        String url = getUserService().createLogoutURL(returnURL);
        throw new Redirect(url);
    }
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 = PlayException.getInterestingStrackTraceElement(e);
                if (element != null) {
                    throw new NoRouteFoundException(action, newArgs, Play.classes.getApplicationClass(element.getClassName()), element.getLineNumber());
View Full Code Here

        // Mark an evolution as resolved
        if (Play.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 (Play.mode.isDev() && request.method.equals("POST") && request.url.equals("/@evolutions/apply")) {
            applyScript(true);
            new Redirect("/").apply(request, response);
            return true;
        }
        return super.rawInvocation(request, response);
    }
View Full Code Here

     * First step of the OAuth2 process: redirects the user to the authorization page
     *
     * @param callbackURL
     */
    public void retrieveVerificationCode(String callbackURL) {
        throw new Redirect(authorizationURL
                + "?client_id=" + clientid
                + "&redirect_uri=" + callbackURL);
    }
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 = PlayException.getInterestingStrackTraceElement(e);
                if (element != null) {
                    throw new NoRouteFoundException(action, newArgs, Play.classes.getApplicationClass(element.getClassName()), element.getLineNumber());
View Full Code Here

        // Mark an evolution as resolved
        if (Play.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 (Play.mode.isDev() && request.method.equals("POST") && request.url.equals("/@evolutions/apply")) {
            applyScript(true);
            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

TOP

Related Classes of play.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.