XuiRedirectHelper.java revision 1f2d552ab2fe7fc52b528ef4fef4136054b0871f
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2015-2016 ForgeRock AS.
*/
/**
* Helper for redirecting back to the XUI.
*
* @since 13.0.0
*/
public final class XuiRedirectHelper {
private XuiRedirectHelper() {
}
/**
* Redirects to the XUI to the specified realm and hash.
*
* @param request Used to determine the OpenAM deployment URI.
* @param redirectRealm The realm.
* @param xuiHash The XUI location hash.
*/
public static void redirectToXui(HttpServletRequest request, String redirectRealm, String xuiHash) {
.getContextPath();
try {
throw new CompleteRequestException();
} catch (IOException e) {
//never thrown, empty catch
}
}
/**
* Redirects to the XUI to the specified hash.
*
* @param request Used to determine the OpenAM deployment URI.
* @param xuiHash The XUI location hash.
*/
try {
throw new CompleteRequestException();
} catch (IOException e) {
//never thrown, empty catch
}
}
/**
* Gets the realm to redirect to from the JATO page session.
*
* @param viewBean The view bean.
* @return The redirect realm.
*/
if (redirectRealm == null) {
}
return redirectRealm;
}
/**
* Determines if request is from XUI to get a JATO page session.
*
* @param request The request.
* @return {@code true} if the request is from the XUI, {@code false} otherwise.
*/
}
/**
* Determines if the XUI admin console is enabled.
*
* @return {@code true} if the XUI admin console is enabled, {@code false} otherwise.
*/
public static boolean isXuiAdminConsoleEnabled() {
}
}