com.vaadin.flow.router.internal.

Class RouterUtil

  • Deprecated. 

    This is an internal class for Flow and should not be used outside. This is deprecated since 1.3 and will be removed in later versions of Flow.


    @Deprecated
    public final class RouterUtil
    extends RouteUtil

    Utility class with methods for router layout handling.

    Since:

    1.0

    • Method Detail

      • getParentLayouts

        public static List<Class<? extends RouterLayout>> getParentLayouts(Class<?> component,
                                                                           String path)

        Deprecated. 

        Get parent layouts for navigation target according to the Route or RouteAlias annotation.

        Parameters:

        component - navigation target to get parents for

        path - path used to get navigation target so we know which annotation to handle

        Returns:

        parent layouts for target

      • updatePageTitle

        public static void updatePageTitle(NavigationEvent navigationEvent,
                                           Component routeTarget)

        Deprecated. 

        Updates the page title according to the currently visible component.

        Uses HasDynamicTitle.getPageTitle() if implemented, or else the PageTitle annotation, to resolve the title.

        Parameters:

        navigationEvent - the event object about the navigation

        routeTarget - the currently visible component

      • checkForDuplicates

        public static void checkForDuplicates(Class<? extends Component> routeTargetType,
                                              Collection<Class<? extends RouterLayout>> routeLayoutTypes)

        Deprecated. 

        Checks that the same component type is not used in multiple parts of a route chain.

        Parameters:

        routeTargetType - the actual component in the route chain

        routeLayoutTypes - the parent types in the route chain

      • createEvent

        public static LocationChangeEvent createEvent(NavigationEvent event,
                                                      List<HasElement> routeTargetChain)

        Deprecated. 

        Create a new location change event for given navigation event and chain.

        Parameters:

        event - current navigation event

        routeTargetChain - chain of route targets

        Returns:

        new LocationChangeEvent