Class AmbiguousRouteConfigurationException

All Implemented Interfaces:
Serializable

public class AmbiguousRouteConfigurationException extends InvalidRouteConfigurationException
Exception indicating that the application's routes already has the navigation target with the given path.
Since:
1.4
Author:
Vaadin Ltd
See Also:
  • Constructor Details

    • AmbiguousRouteConfigurationException

      public AmbiguousRouteConfigurationException(String message, Class<? extends Component> navigationTarget)
      Constructs a new invalid route configuration exception with the specified detail message and the existing navigation target component which already presents in the configuration with the route path.
      Parameters:
      message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.
      navigationTarget - the configured navigation target, not null
  • Method Details

    • getConfiguredNavigationTarget

      public Class<? extends Component> getConfiguredNavigationTarget()
      Returns the already configured navigation target component class which caused the exception.

      In case the exception happens as a result of a navigation target collision for the same route path this method returns the configured navigation target for the path.

      Returns:
      an optional existing navigation target in the configuration which caused the exception, or an empty optional if the exception is not caused by a collision, not null