T - Parameter value typepublic interface NavigationParameterTypeMapper<T>
NavigationParameterMapper to handle a specific navigation parameter value type, provided
by the getParameterType() method.
Should provide the parameter value serialization logic, to obtain the value to include in the navigation URL, and the
deserialization logic, to obtain a value from a String type navigation URL fragment.
A new NavigationParameterTypeMapper registration can be performed using the default Java
ServiceLoader extensions, providing a
com.holonplatform.vaadin.flow.navigator.NavigationParameterTypeMapper file in the
META-INF/services folder, containing the NavigationParameterTypeMapper concrete class names to
register.
When more than one NavigationParameterTypeMapper is available for the same parameter value type, no selection
order is guaranteed, and the last registered mapper will be used.
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(String value)
Deserialize given parameter
value. |
Class<T> |
getParameterType()
Get the parameter value type to which this mapper is bound.
|
String |
serialize(T value)
Serialize given parameter
value. |
Class<T> getParameterType()
nullString serialize(T value) throws InvalidNavigationParameterException
value.value - The parameter value (never null)nullInvalidNavigationParameterException - If an error occurredT deserialize(String value) throws InvalidNavigationParameterException
value.value - The parameter value, not null nor blanknullInvalidNavigationParameterException - If an error occurredCopyright © 2019 The Holon Platform. All rights reserved.