public class RouteTarget extends Object implements Serializable
Constructor and Description |
---|
RouteTarget(Class<? extends Component> target)
Create a new Route target holder.
|
Modifier and Type | Method and Description |
---|---|
void |
addRoute(Class<? extends Component> target)
Add a new route navigation target.
|
Class<? extends Component> |
getTarget(List<String> segments)
Get route target for given segments.
|
ThemeDefinition |
getThemeFor(Class<?> target)
Gets the theme that should be used for the given navigation target.
|
void |
setThemeFor(Class<?> target,
ThemeDefinition theme)
Sets the theme used by this RouteTarget for a given navigation target.
|
public RouteTarget(Class<? extends Component> target) throws InvalidRouteConfigurationException
target
- navigation targetInvalidRouteConfigurationException
- exception for miss configured routes where navigation targets
can not be clearly selectedpublic void addRoute(Class<? extends Component> target) throws InvalidRouteConfigurationException
When adding a new target it will be validated that it is a valid path to add with the already existing navigation targets.
target
- navigation target to addInvalidRouteConfigurationException
- exception for miss configured routes where navigation targets
can not be clearly selectedpublic Class<? extends Component> getTarget(List<String> segments)
segments
- route segmentspublic void setThemeFor(Class<?> target, ThemeDefinition theme)
target
- navigation targettheme
- themeDefinition to be used when the navigation target is usedpublic ThemeDefinition getThemeFor(Class<?> target)
target
- navigation targetnull
if no theme was set for itCopyright © 2019. All rights reserved.