com.vaadin.navigator
Interface NavigationStateManager

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
Navigator.UriFragmentManager

public interface NavigationStateManager
extends java.io.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
 java.lang.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(java.lang.String state)
          Sets the current navigation state in the location URI or similar location, including view name and any optional parameters.
 

Method Detail

getState

java.lang.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(java.lang.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()).

This method should only be called by a Navigator.



Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.