Class UrlTools

java.lang.Object
io.jmix.ui.navigation.UrlTools

@Component("ui_UrlTools") public class UrlTools extends Object
Helper for working with URL.
  • Field Details

    • ROOT_ROUTE

      protected static final String ROOT_ROUTE
      Root route regexp. Intended to match first part of a fragment:
      
          /#<root_route>
       
      See Also:
    • ROOT_ROUTE_PATTERN

      protected static final Pattern ROOT_ROUTE_PATTERN
    • NESTED_ROUTE

      protected static final String NESTED_ROUTE
      Nested screens route regexp. Intended to match a fragment that contains root and nested screen routes
      
          /#<root_route>/[<url_state_mark>/]<nested_screen_route>[/<nested_screen_route>]
       
      See Also:
    • NESTED_ROUTE_PATTERN

      protected static final Pattern NESTED_ROUTE_PATTERN
    • PARAMS_ROUTE

      protected static final String PARAMS_ROUTE
      Params route regexp. Intended to match a fragment that contains root and nested screen routes and URL params part:
      
          /#<root_route>/[<url_state_mark>/]<nested_screen_route>?<params_part>
       
      See Also:
    • PARAMS_ROUTE_PATTERN

      protected static final Pattern PARAMS_ROUTE_PATTERN
    • PARAMS_REGEX

      protected static final String PARAMS_REGEX
      URL params regexp. Intended to match param pairs:
      
          p1=v2[&p2=v2]...
       
      See Also:
    • PARAMS_PATTERN

      protected static final Pattern PARAMS_PATTERN
  • Constructor Details

    • UrlTools

      public UrlTools()
  • Method Details

    • pushState

      public void pushState(String navigationState, com.vaadin.ui.UI ui)
    • replaceState

      public void replaceState(String navigationState, com.vaadin.ui.UI ui)
    • parseState

      public NavigationState parseState(@Nullable String uriFragment)
    • getEmptyFragmentUri

      protected URI getEmptyFragmentUri(com.vaadin.server.Page page)
    • parseRootRoute

      @Nullable protected NavigationState parseRootRoute(String uriFragment)
    • parseNestedRoute

      @Nullable protected NavigationState parseNestedRoute(String uriFragment)
    • parseParamsRoute

      @Nullable protected NavigationState parseParamsRoute(String uriFragment)
    • extractParams

      protected Map<String,String> extractParams(String paramsString)
    • headless

      public static boolean headless()
      INTERNAL
      Returns:
      whether application is running in headless mode