com.vaadin.navigator.

Interface NavigationStateManager

  • All Superinterfaces:

    Serializable

    All Known Implementing Classes:

    Navigator.UriFragmentManager

    public interface NavigationStateManager
    extends Serializable

    An interface for handling interaction between Navigator and the browser location URI or other similar view identification and bookmarking system. The state is limited to a single string because in the usual cases it forms a part of a URI.

    Different implementations can be created for hashbang URIs, HTML5 pushState, portlet URL navigation and other similar systems.

    This interface is mostly for internal use by Navigator.

    Since:

    7.0

    Author:

    Vaadin Ltd

    • Method Summary

      All Methods
      Modifier and Type Method Description
      String getState()

      Returns the current navigation state including view name and any optional parameters.

      void setNavigator​(Navigator navigator)

      Sets the Navigator used with this state manager.

      void setState​(String state)

      Sets the current navigation state in the location URI or similar location, including view name and any optional parameters.

    • Method Detail

      • getState

        String getState()

        Returns the current navigation state including view name and any optional parameters.

        Returns:

        current view and parameter string, not null

      • setState

        void setState​(String state)

        Sets the current navigation state in the location URI or similar location, including view name and any optional parameters.

        This method should be only called by a Navigator.

        Parameters:

        fragment - new view and parameter string, not null

      • setNavigator

        void setNavigator​(Navigator navigator)

        Sets the Navigator used with this state manager. The state manager should notify the provided navigator of user-triggered navigation state changes by invoking navigator.navigateTo(getState()). navigator parameter value could be null if previously set navigator is destroyed.

        This method should only be called by a Navigator.