com.vaadin.flow.router.
Class NavigationState
- java.lang.Object
-
- com.vaadin.flow.router.NavigationState
-
All Implemented Interfaces:
public class NavigationState extends Object implements Serializable
Contains all relevant information related to a valid navigation.
Since:
1.0.
Author:
Vaadin Ltd
See Also:
-
-
Constructor Summary
Constructors Constructor and Description NavigationState(Router router)
Creates a new instance of the class using the
router
.
-
Method Summary
All Methods Modifier and Type Method and Description Class<? extends Component>
getNavigationTarget()
Gets the navigation target of this state.
String
getResolvedPath()
Get the resolved path details for this navigation state.
Optional<List<String>>
getUrlParameters()
Gets the list of strings that correspond to the raw string url parameters.
void
setNavigationTarget(Class<? extends Component> navigationTarget)
Sets the navigation target of this state.
void
setResolvedPath(String resolvedPath)
Set the path for the resolved navigation target.
void
setUrlParameters(List<String> urlParameters)
Set the list of strings that correspond to the raw string url parameters.
-
-
-
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
- the navigation target to set
-
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
-
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
-
-