com.vaadin.flow.router.

Class NavigationState

  • All Implemented Interfaces:

    Serializable


    public class NavigationState
    extends Object
    implements Serializable

    Contains all relevant information related to a valid navigation.

    Since:

    1.0.

    Author:

    Vaadin Ltd

    See Also:

    Serialized Form

    • Constructor Detail

      • NavigationState

        public NavigationState(Router router)

        Creates a new instance of the class using the router.

        Parameters:

        router - the router managing navigation

    • Method Detail

      • getNavigationTarget

        public Class<? extends Component> getNavigationTarget()

        Gets the navigation target of this state.

        Returns:

        the navigation target of this state

      • setNavigationTarget

        public void setNavigationTarget(Class<? extends Component> navigationTarget)

        Sets the navigation target of this state.

        Parameters:

        navigationTarget - navigation target

      • getRouteTarget

        public RouteTarget getRouteTarget()

        Gets the route target for this navigation state.

        Returns:

        the route target to navigate to.

      • setResolvedPath

        public void setResolvedPath(String resolvedPath)

        Set the path for the resolved navigation target.

        Parameters:

        resolvedPath - path for which the target was selected

      • getResolvedPath

        public String getResolvedPath()

        Get the resolved path details for this navigation state.

        Returns:

        the resolved path details

      • getRouteParameters

        public RouteParameters getRouteParameters()

        Gets the route parameters map.

        Returns:

        route parameters.

      • getUrlParameters

        public Optional<List<String>> getUrlParameters()

        Gets the list of strings that correspond to the raw string url parameters.

        Returns:

        the url parameters of this navigation state