Package de.xima.fc.user_portal.route
Class RoutingContexts
- java.lang.Object
-
- de.xima.fc.user_portal.route.RoutingContexts
-
public final class RoutingContexts extends Object
Factory forIRoutingContext
.- Since:
- 8.2.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IRoutingContext
genericRoutingContext()
Creates a generic routing context without any specific data.static Optional<IRoutingContext.IPortalRoutingContext>
portalRoutingContext(String portalId)
Creates a routing context for a specific portal, identified by its alias.static Optional<IRoutingContext.IPortalRoutingContext>
portalRoutingContext(javax.servlet.http.HttpServletRequest request)
Creates a routing context for a specific portal, identified by its alias.
-
-
-
Method Detail
-
genericRoutingContext
public static IRoutingContext genericRoutingContext()
Creates a generic routing context without any specific data.- Returns:
- A generic routing context.
-
portalRoutingContext
public static Optional<IRoutingContext.IPortalRoutingContext> portalRoutingContext(String portalId)
Creates a routing context for a specific portal, identified by its alias.- Parameters:
portalId
- The alias of the portal.- Returns:
- A portal routing context, or empty when the portal alias is blank.
-
portalRoutingContext
public static Optional<IRoutingContext.IPortalRoutingContext> portalRoutingContext(javax.servlet.http.HttpServletRequest request)
Creates a routing context for a specific portal, identified by its alias. Extracts the portal alias from the given request.- Parameters:
request
- The request to extract the portal alias from.- Returns:
- A portal routing context, or empty when no portal alias could be extracted from the request.
-
-