Interface UrlRouting.RouteGenerator

All Known Implementing Classes:
WebUrlRouting.RouteGeneratorImpl
Enclosing interface:
UrlRouting

public static interface UrlRouting.RouteGenerator
Provides API to generate routes for screens with optional URL parameters.
  • Method Details

    • getRoute

      default String getRoute(String screenId)
      Generates route for screen with the given screenId.
      Parameters:
      screenId - screen id
      Returns:
      generated route
    • getRoute

      default String getRoute(Class<? extends Screen> screenClass)
      Generates route for screen with the given screenClass.
      Parameters:
      screenClass - screen class
      Returns:
      generated route
    • getEditorRoute

      default String getEditorRoute(Object entity)
      Generates route for default editor with the given entity.

      Entity id will be passed as URL param.

      Parameters:
      entity - entity to edit
      Returns:
      generated route
    • getEditorRoute

      default String getEditorRoute(Object entity, String screenId)
      Generates route for editor with the given screenId and entity.

      Entity id will be passed as URL param.

      Parameters:
      entity - entity to edit
      screenId - editor screen id
      Returns:
      generated route
    • getEditorRoute

      default String getEditorRoute(Object entity, Class<? extends Screen> screenClass)
      Generates route for editor with the given screenClass and entity.
      Parameters:
      entity - entity to edit
      screenClass - editor screen class
      Returns:
      generated route
    • getRoute

      String getRoute(String screenId, Map<String,String> urlParams)
      Generates route for screen with the given screenId and urlParams.
      Parameters:
      screenId - screen id
      urlParams - URL params
      Returns:
      generated route
    • getRoute

      String getRoute(Class<? extends Screen> screenClass, Map<String,String> urlParams)
      Generates route for screen with the given screenClass and urlParams.
      Parameters:
      screenClass - screen class
      urlParams - URL params
      Returns:
      generated route
    • getEditorRoute

      String getEditorRoute(Object entity, Map<String,String> urlParams)
      Generates route for default editor with the given entity and urlParams.

      Entity id will be passed as URL param.

      Parameters:
      entity - entity to edit
      urlParams - URL params
      Returns:
      generated route
    • getEditorRoute

      String getEditorRoute(Object entity, String screenId, Map<String,String> urlParams)
      Generates route for editor with the given screenId and entity and urlParams.

      Entity id will be passed as URL param.

      Parameters:
      entity - entity to edit
      screenId - editor screen id
      urlParams - URL params
      Returns:
      generated route
    • getEditorRoute

      String getEditorRoute(Object entity, Class<? extends Screen> screenClass, Map<String,String> urlParams)
      Generates route for editor with the given screenClass and entity and urlParams.
      Parameters:
      entity - entity to edit
      screenClass - editor screen class
      urlParams - URL params
      Returns:
      generated route