diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2012-09-24 17:21:41 +0300 |
---|---|---|
committer | Johannes Dahlström <johannesd@vaadin.com> | 2012-09-24 17:23:17 +0300 |
commit | a6045f4fe524e4d4b9a7f231b0b011b4b0d8b682 (patch) | |
tree | 82865c300cb608cb57ddf73f8af8129b003b112d /server/src/com/vaadin/navigator/NavigationStateManager.java | |
parent | aa20ecbfb7cebb719a05ec1be6439badd228366e (diff) | |
download | vaadin-framework-a6045f4fe524e4d4b9a7f231b0b011b4b0d8b682.tar.gz vaadin-framework-a6045f4fe524e4d4b9a7f231b0b011b4b0d8b682.zip |
Make NavigationStateManager/UriFragmentManager more extensible (#9727)
Diffstat (limited to 'server/src/com/vaadin/navigator/NavigationStateManager.java')
-rw-r--r-- | server/src/com/vaadin/navigator/NavigationStateManager.java | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/server/src/com/vaadin/navigator/NavigationStateManager.java b/server/src/com/vaadin/navigator/NavigationStateManager.java index cbbeb59c30..c3f1f0f11e 100644 --- a/server/src/com/vaadin/navigator/NavigationStateManager.java +++ b/server/src/com/vaadin/navigator/NavigationStateManager.java @@ -19,15 +19,15 @@ package com.vaadin.navigator; import 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. + * An interface for handling interaction between {@link 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. * <p> * Different implementations can be created for hashbang URIs, HTML5 pushState, * portlet URL navigation and other similar systems. * <p> - * This interface is mostly for internal use by {@link Navigator}. + * This interface is mostly for internal use by Navigator. * * @author Vaadin Ltd * @since 7.0 @@ -42,11 +42,22 @@ public interface NavigationStateManager extends Serializable { public String getState(); /** - * Set the current navigation state in the location URI or similar location, - * including view name and any optional parameters. + * Sets the current navigation state in the location URI or similar + * location, including view name and any optional parameters. + * <p> + * This method should be only called by a Navigator. * * @param fragment * new view and parameter string, not null */ public void setState(String state); + + /** + * Sets the Navigator used with this state manager. The state manager should + * notify the provided navigator of user-triggered navigation state changes + * by invoking <code>navigator.navigateTo(getState())</code>. + * <p> + * This method should only be called by a Navigator. + */ + public void setNavigator(Navigator navigator); }
\ No newline at end of file |