Class WebUrlRouting

java.lang.Object
io.jmix.ui.navigation.WebUrlRouting
All Implemented Interfaces:
UrlRouting

@UIScope @Component("ui_UrlRouting") public class WebUrlRouting extends Object implements UrlRouting
  • Field Details

    • NEW_ENTITY_ID

      public static final String NEW_ENTITY_ID
      See Also:
    • MAX_NESTING

      protected static final int MAX_NESTING
      See Also:
    • uiProperties

      @Autowired protected UiProperties uiProperties
    • windowConfig

      @Autowired protected WindowConfig windowConfig
    • metadata

      @Autowired protected Metadata metadata
    • urlTools

      @Autowired protected UrlTools urlTools
    • entityStates

      @Autowired protected EntityStates entityStates
    • screens

      @Autowired protected Screens screens
    • ui

      protected AppUI ui
    • lastHistoryOperation

      protected String lastHistoryOperation
  • Constructor Details

    • WebUrlRouting

      public WebUrlRouting()
  • Method Details

    • setAppUi

      @Autowired public void setAppUi(AppUI ui)
    • pushState

      public void pushState(Screen screen, Map<String,String> urlParams)
      Description copied from interface: UrlRouting
      Pushes the state corresponding to the given screen.

      The given urlParams will be reflected in URI as GET request params.

      Creates new entry in browser history.

      Specified by:
      pushState in interface UrlRouting
      Parameters:
      screen - screen that is used to build new navigation state
      urlParams - URI params map
    • replaceState

      public void replaceState(Screen screen, Map<String,String> urlParams)
      Description copied from interface: UrlRouting
      Replaces current state by the state corresponding to the given screen.

      The given urlParams will be reflected in URI as GET request params.

      Doesn't create new entry in browser history.

      Specified by:
      replaceState in interface UrlRouting
      Parameters:
      screen - screen that is used to build new navigation state
      urlParams - URI params map
    • getState

      public NavigationState getState()
      Specified by:
      getState in interface UrlRouting
      Returns:
      current state parsed from URI fragment.
    • getRouteGenerator

      public UrlRouting.RouteGenerator getRouteGenerator()
      Specified by:
      getRouteGenerator in interface UrlRouting
      Returns:
      UrlRouting.RouteGenerator instance
    • updateState

      protected void updateState(Screen screen, Map<String,String> urlParams, boolean pushState)
    • buildNavState

      protected NavigationState buildNavState(Screen screen, Map<String,String> urlParams)
    • buildNestedRoute

      protected String buildNestedRoute(Screen screen)
    • buildDialogRoute

      protected String buildDialogRoute(Screen dialog)
    • buildScreenRoute

      protected String buildScreenRoute(Screen screen)
    • buildSubRoute

      protected String buildSubRoute(@Nullable String prevSubRoute, Screen screen)
    • buildParams

      protected Map<String,String> buildParams(Screen screen, Map<String,String> urlParams)
    • getParentPrefix

      @Nullable protected String getParentPrefix(Screen screen)
    • omitParams

      protected boolean omitParams(Screen screen)
    • isEditor

      protected boolean isEditor(Screen screen)
    • getRoute

      protected String getRoute(Screen screen)
    • getRouteDef

      @Nullable protected RouteDefinition getRouteDef(@Nullable Screen screen)
    • getStateMark

      protected String getStateMark(Screen screen)
    • externalNavigation

      protected boolean externalNavigation(@Nullable NavigationState currentState, NavigationState newState)
    • findActiveScreenByState

      @Nullable protected Screen findActiveScreenByState(NavigationState requestedState)
    • getOpenedScreens

      protected Screens.OpenedScreens getOpenedScreens()
    • findScreenByState

      @Nullable protected Screen findScreenByState(Collection<Screen> screens, NavigationState requestedState)
    • checkConditions

      protected boolean checkConditions(Screen screen, Map<String,String> urlParams)
    • notAttachedToUi

      protected boolean notAttachedToUi(Screen screen)
    • getLastHistoryOperation

      public String getLastHistoryOperation()
      Specified by:
      getLastHistoryOperation in interface UrlRouting
    • isNotFoundScreen

      protected boolean isNotFoundScreen(Screen screen)