Package de.xima.fc.user_portal.route
Class UserPortalRouter
- java.lang.Object
-
- de.xima.fc.user_portal.route.UserPortalRouter
-
@ApplicationScoped @Named public class UserPortalRouter extends Object
Handles URL routing for user portal pages.- Since:
- 8.2.0
-
-
Constructor Summary
Constructors Constructor Description UserPortalRouter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
externalPortalUrl(IUserPortalRoute<IRoutingContext.IPortalRoutingContext> route, javax.servlet.http.HttpServletRequest request)
String
externalPortalUrlWithContext(IUserPortalRoute<IRoutingContext.IPortalRoutingContext> route, javax.servlet.http.HttpServletRequest request)
String
externalPortalUrlWithHost(IUserPortalRoute<IRoutingContext.IPortalRoutingContext> route, javax.servlet.http.HttpServletRequest request)
<C extends IRoutingContext>
StringexternalUrl(IUserPortalRoute<C> route, C routingContext)
<C extends IRoutingContext>
StringexternalUrlWithContext(IUserPortalRoute<C> route, C routingContext, javax.servlet.http.HttpServletRequest request)
<C extends IRoutingContext>
StringexternalUrlWithHost(IUserPortalRoute<C> route, C routingContext, javax.servlet.http.HttpServletRequest request)
<C extends IRoutingContext>
voidfacesRedirectTo(javax.faces.context.FacesContext facesContext, IUserPortalRoute<C> route, C routingContext)
Redirects an active Faces request to the given user portal view.void
facesRedirectToGenericError(javax.faces.context.FacesContext facesContext)
Redirects an active Faces request to the error view.void
facesRedirectToGenericNotFound(javax.faces.context.FacesContext facesContext)
Redirects an active Faces request to the not found view.boolean
isUserPortalRequest(javax.servlet.http.HttpServletRequest request)
IUserPortalRoute<?>
routeByRequest(javax.servlet.http.HttpServletRequest request)
Collection<IUserPortalRoute<?>>
routes()
Returns all known registered routes.
-
-
-
Method Detail
-
externalPortalUrl
public String externalPortalUrl(IUserPortalRoute<IRoutingContext.IPortalRoutingContext> route, javax.servlet.http.HttpServletRequest request)
-
externalPortalUrlWithContext
public String externalPortalUrlWithContext(IUserPortalRoute<IRoutingContext.IPortalRoutingContext> route, javax.servlet.http.HttpServletRequest request)
-
externalPortalUrlWithHost
public String externalPortalUrlWithHost(IUserPortalRoute<IRoutingContext.IPortalRoutingContext> route, javax.servlet.http.HttpServletRequest request)
-
externalUrl
public <C extends IRoutingContext> String externalUrl(IUserPortalRoute<C> route, C routingContext)
-
externalUrlWithContext
public <C extends IRoutingContext> String externalUrlWithContext(IUserPortalRoute<C> route, C routingContext, javax.servlet.http.HttpServletRequest request)
-
externalUrlWithHost
public <C extends IRoutingContext> String externalUrlWithHost(IUserPortalRoute<C> route, C routingContext, javax.servlet.http.HttpServletRequest request)
-
facesRedirectTo
public <C extends IRoutingContext> void facesRedirectTo(javax.faces.context.FacesContext facesContext, IUserPortalRoute<C> route, C routingContext)
Redirects an active Faces request to the given user portal view.- Parameters:
facesContext
- The currently active Faces context.route
- The route to redirect to.routingContext
- The routing context to use for the redirect.
-
facesRedirectToGenericNotFound
public void facesRedirectToGenericNotFound(javax.faces.context.FacesContext facesContext)
Redirects an active Faces request to the not found view.- Parameters:
facesContext
- The currently active Faces context.
-
facesRedirectToGenericError
public void facesRedirectToGenericError(javax.faces.context.FacesContext facesContext)
Redirects an active Faces request to the error view.- Parameters:
facesContext
- The currently active Faces context.
-
isUserPortalRequest
public boolean isUserPortalRequest(javax.servlet.http.HttpServletRequest request)
-
routeByRequest
public IUserPortalRoute<?> routeByRequest(javax.servlet.http.HttpServletRequest request)
-
routes
public Collection<IUserPortalRoute<?>> routes()
Returns all known registered routes.- Returns:
- All registered routes.
-
-