com.vaadin.flow.server.startup.

Class RouteTarget

    • Method Detail

      • addRoute

        public void addRoute(Class<? extends Component> target)
                      throws InvalidRouteConfigurationException

        Add a new route navigation target.

        When adding a new target it will be validated that it is a valid path to add with the already existing navigation targets.

        Parameters:

        target - navigation target to add

        Throws:

        InvalidRouteConfigurationException - exception for miss configured routes where navigation targets can not be clearly selected

      • getTarget

        public Class<? extends Component> getTarget(List<String> segments)

        Get route target for given segments.

        Parameters:

        segments - route segments

        Returns:

        navigation target corresponding to given segments

      • setThemeFor

        public void setThemeFor(Class<?> target,
                                ThemeDefinition theme)

        Sets the theme used by this RouteTarget for a given navigation target.

        Parameters:

        target - navigation target

        theme - themeDefinition to be used when the navigation target is used

      • getThemeFor

        public ThemeDefinition getThemeFor(Class<?> target)

        Gets the theme that should be used for the given navigation target.

        Parameters:

        target - navigation target

        Returns:

        theme class to be used when the navigation target is used, or null if no theme was set for it