net.customware.gwt.presenter.client.place
Class ParameterTokenFormatter

java.lang.Object
  extended by net.customware.gwt.presenter.client.place.ParameterTokenFormatter
All Implemented Interfaces:
TokenFormatter

public class ParameterTokenFormatter
extends java.lang.Object
implements TokenFormatter

Formats tokens from String values into PlaceRequest values and back again. This implementation parses the token format like so:

[name](;param=value)*


Constructor Summary
ParameterTokenFormatter()
           
 
Method Summary
 java.lang.String toHistoryToken(PlaceRequest placeRequest)
          Converts a PlaceRequest into a History token.
 PlaceRequest toPlaceRequest(java.lang.String token)
          Converts a History token into a PlaceRequest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterTokenFormatter

public ParameterTokenFormatter()
Method Detail

toHistoryToken

public java.lang.String toHistoryToken(PlaceRequest placeRequest)
Description copied from interface: TokenFormatter
Converts a PlaceRequest into a History token.

Specified by:
toHistoryToken in interface TokenFormatter
Parameters:
placeRequest - The place request
Returns:
The history token

toPlaceRequest

public PlaceRequest toPlaceRequest(java.lang.String token)
                            throws TokenFormatException
Description copied from interface: TokenFormatter
Converts a History token into a PlaceRequest.

Specified by:
toPlaceRequest in interface TokenFormatter
Parameters:
token - The token.
Returns:
The place request
Throws:
TokenFormatException - if there is an error converting.


Copyright © 2010 customware.net. All Rights Reserved.