public class ApplicationRouteRegistry extends AbstractRouteRegistry implements ErrorRouteRegistry
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ApplicationRouteRegistry.ApplicationRouteRegistryWrapper
RouteRegistry wrapper class for storing the ApplicationRouteRegistry.
|
AbstractRouteRegistry.Configuration| Modifier | Constructor and Description |
|---|---|
protected |
ApplicationRouteRegistry()
Creates a new uninitialized route registry.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<ErrorTargetEntry> |
getErrorNavigationTarget(Exception exception)
Get a registered navigation target for given exception.
|
static ApplicationRouteRegistry |
getInstance(ServletContext context)
Deprecated.
this is deprecated in favor of
getInstance(VaadinContext) and will be removed in a
future release |
Class<?> |
getPwaConfigurationClass()
Gets pwa configuration class.
|
protected void |
handleInitializedRegistry()
Handles an attempt to initialize already initialized route registry.
|
boolean |
hasNavigationTargets()
Check if there are registered navigation targets in the registry.
|
void |
setErrorNavigationTargets(Set<Class<? extends Component>> errorNavigationTargets)
Set error handler navigation targets.
|
void |
setPwaConfigurationClass(Class<?> pwaClass)
Sets pwa configuration class.
|
void |
setRoute(String path,
Class<? extends Component> navigationTarget,
List<Class<? extends RouterLayout>> parentChain)
Register a navigation target with specified path and given parent layout
chain.
|
addErrorTarget, addRoutesChangeListener, clean, configure, fireEvent, getConfiguration, getNavigationRouteTarget, getNavigationTarget, getNavigationTarget, getRegisteredRoutes, getRouteLayouts, getRouteTarget, getTargetUrl, getTargetUrl, getTemplate, hasLock, removeRoute, removeRoute, removeRoute, searchByCause, searchBySuperType, updateprotected ApplicationRouteRegistry()
@Deprecated public static ApplicationRouteRegistry getInstance(ServletContext context)
getInstance(VaadinContext) and will be removed in a
future releasecontext - the vaadin context for which to get a route registry, not
nullnullpublic void setRoute(String path, Class<? extends Component> navigationTarget, List<Class<? extends RouterLayout>> parentChain)
RouteRegistryParentLayout, Route or RouteAlias will
be ignored in route handling.setRoute in interface RouteRegistrysetRoute in class AbstractRouteRegistrypath - path to register navigation target tonavigationTarget - navigation target to register into session scopeparentChain - chain of parent layouts that should be used with this targetpublic void setErrorNavigationTargets(Set<Class<? extends Component>> errorNavigationTargets)
This can also be used to add error navigation targets that override existing targets. Note! The overriding targets need to be extending the existing target or they will throw.
errorNavigationTargets - error handler navigation targetspublic Optional<ErrorTargetEntry> getErrorNavigationTarget(Exception exception)
ErrorRouteRegistrygetErrorNavigationTarget in interface ErrorRouteRegistryexception - exception to search error view forpublic boolean hasNavigationTargets()
public Class<?> getPwaConfigurationClass()
public void setPwaConfigurationClass(Class<?> pwaClass)
AbstractRouteRegistryInitializer.pwaClass - a class that has PWA -annotation, that's to be used in service
initialization.protected void handleInitializedRegistry()
Copyright © 2025. All rights reserved.