public interface NavigationParameters extends Serializable
| Modifier and Type | Method and Description |
|---|---|
static NavigationParameters |
create(com.vaadin.flow.router.Location location)
Create a new
NavigationParameters instance. |
static NavigationParameters |
create(com.vaadin.flow.router.Location location,
boolean decode)
Create a new
NavigationParameters instance. |
static NavigationParameters |
create(Map<String,List<String>> queryParameters)
Create a new
NavigationParameters instance. |
static NavigationParameters |
create(Map<String,List<String>> queryParameters,
boolean decode)
Create a new
NavigationParameters instance. |
static NavigationParameters |
create(com.vaadin.flow.router.QueryParameters queryParameters)
Create a new
NavigationParameters instance. |
static NavigationParameters |
create(com.vaadin.flow.router.QueryParameters queryParameters,
boolean decode)
Create a new
NavigationParameters instance. |
Map<String,List<String>> |
getQueryParameters()
Get the URL query parameters, without any value deserialization.
|
<T> Optional<T> |
getQueryParameterValue(String name,
Class<T> type)
Get the single value of the query parameter with the given
name, deserializing it to the given value
type. |
<T> T |
getQueryParameterValue(String name,
Class<T> type,
T defaultValue)
Get the single value of the query parameter with the given
name, deserializing it to the given value
type. |
<T> List<T> |
getQueryParameterValues(String name,
Class<T> type)
Get the values of the query parameter with the given
name, deserializing it to the given value
type. |
boolean |
hasQueryParameter(String name)
Checks whether the query parameter with the given
name is available and has a value. |
Map<String,List<String>> getQueryParameters()
boolean hasQueryParameter(String name)
name is available and has a value.name - The query parameter name (not null)true if the query parameter with the given name is available and has a value,
false otherwise<T> List<T> getQueryParameterValues(String name, Class<T> type) throws InvalidNavigationParameterException
name, deserializing it to the given value
type.
The query parameter values are deserialized using the NavigationParameterMapper.
T - Deserialized value typename - The query parameter name (not null)type - The type into which the query parameter values have to be deserialized (not null)List if noneInvalidNavigationParameterException - If a deserialization error occurred<T> Optional<T> getQueryParameterValue(String name, Class<T> type) throws InvalidNavigationParameterException
name, deserializing it to the given value
type.
If the query parameter has more than one value, only the first one is returned.
The query parameter value is deserialized using the NavigationParameterMapper.
T - Deserialized value typename - The query parameter name (not null)type - The type into which the query parameter value has to be deserialized (not null)InvalidNavigationParameterException - If a deserialization error occurred<T> T getQueryParameterValue(String name, Class<T> type, T defaultValue) throws InvalidNavigationParameterException
name, deserializing it to the given value
type.
If the query parameter has more than one value, only the first one is returned.
The query parameter value is deserialized using the NavigationParameterMapper.
T - Deserialized value typename - The query parameter name (not null)type - The type into which the query parameter value has to be deserialized (not null)defaultValue - The default value to return if the query parameter has no valuedefaultValue if the query parameter has no valueInvalidNavigationParameterException - If a deserialization error occurredstatic NavigationParameters create(Map<String,List<String>> queryParameters)
NavigationParameters instance.
The query parameter names and values will be decoded from URL representation, using the UTF-8
charset.
queryParameters - Query parameter names and valuesNavigationParameters to handle given navigation parametersstatic NavigationParameters create(Map<String,List<String>> queryParameters, boolean decode)
NavigationParameters instance.queryParameters - Query parameter names and valuesdecode - Whether to decode the parameter names and values from URL representation, using the
UTF-8 charsetNavigationParameters to handle given navigation parametersstatic NavigationParameters create(com.vaadin.flow.router.QueryParameters queryParameters)
NavigationParameters instance.
The query parameter names and values will be decoded from URL representation, using the UTF-8
charset.
queryParameters - The query parameters holderNavigationParameters to handle given navigation parametersstatic NavigationParameters create(com.vaadin.flow.router.QueryParameters queryParameters, boolean decode)
NavigationParameters instance.queryParameters - The query parameters holderdecode - Whether to decode the parameter names and values from URL representation, using the
UTF-8 charsetNavigationParameters to handle given navigation parametersstatic NavigationParameters create(com.vaadin.flow.router.Location location)
NavigationParameters instance.
The query parameter names and values will be decoded from the URL representation, using the UTF-8
charset.
location - The URL location representationNavigationParameters to handle given location parametersstatic NavigationParameters create(com.vaadin.flow.router.Location location, boolean decode)
NavigationParameters instance.location - The URL location representationdecode - Whether to decode the query parameter names and values from the URL representation, using the
UTF-8 charsetNavigationParameters to handle given location parametersCopyright © 2020 The Holon Platform. All rights reserved.