Class RoutingContexts

    • 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.