Class RouteUtil

java.lang.Object
com.vaadin.hilla.route.RouteUtil
All Implemented Interfaces:
com.vaadin.flow.internal.hilla.FileRouterRequestUtil

@NullMarked public class RouteUtil extends Object implements com.vaadin.flow.internal.hilla.FileRouterRequestUtil
A container for utility methods related with Routes.

For internal use only. May be renamed or removed in a future release.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getAllowedAuthorities(jakarta.servlet.http.HttpServletRequest request)
     
    protected @Nullable com.vaadin.flow.server.menu.AvailableViewInfo
    getRouteByPath(Map<String,com.vaadin.flow.server.menu.AvailableViewInfo> availableRoutes, String path)
    Gets the client view configuration for the given route.
    boolean
    isAnonymousRoute(jakarta.servlet.http.HttpServletRequest request)
     
    boolean
    isRouteAllowed(jakarta.servlet.http.HttpServletRequest request)
    Checks if the given request is allowed route to the user.
    boolean
    isSecuredRoute(jakarta.servlet.http.HttpServletRequest request)
     
    static void
    removeChildren(Map<String,com.vaadin.flow.server.menu.AvailableViewInfo> configurations, com.vaadin.flow.server.menu.AvailableViewInfo viewInfo, String parentPath)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RouteUtil

      public RouteUtil()
  • Method Details

    • isAnonymousRoute

      public boolean isAnonymousRoute(jakarta.servlet.http.HttpServletRequest request)
      Specified by:
      isAnonymousRoute in interface com.vaadin.flow.internal.hilla.FileRouterRequestUtil
    • isSecuredRoute

      public boolean isSecuredRoute(jakarta.servlet.http.HttpServletRequest request)
      Specified by:
      isSecuredRoute in interface com.vaadin.flow.internal.hilla.FileRouterRequestUtil
    • getAllowedAuthorities

      public Set<String> getAllowedAuthorities(jakarta.servlet.http.HttpServletRequest request)
      Specified by:
      getAllowedAuthorities in interface com.vaadin.flow.internal.hilla.FileRouterRequestUtil
    • isRouteAllowed

      public boolean isRouteAllowed(jakarta.servlet.http.HttpServletRequest request)
      Checks if the given request is allowed route to the user.
      Specified by:
      isRouteAllowed in interface com.vaadin.flow.internal.hilla.FileRouterRequestUtil
      Parameters:
      request - the HTTP request to check
      Returns:
      true if the request goes allowed route, false otherwise
    • removeChildren

      public static void removeChildren(Map<String,com.vaadin.flow.server.menu.AvailableViewInfo> configurations, com.vaadin.flow.server.menu.AvailableViewInfo viewInfo, String parentPath)
    • getRouteByPath

      protected @Nullable com.vaadin.flow.server.menu.AvailableViewInfo getRouteByPath(Map<String,com.vaadin.flow.server.menu.AvailableViewInfo> availableRoutes, String path)
      Gets the client view configuration for the given route.
      Parameters:
      path - the URL path to get the client view configuration for
      Returns:
      - the client view configuration for the given route