public interface TokenFormatter
String
values to PlaceRequest
and PlaceRequest
hierarchies and vice-versa. An implementation is provided in ParameterTokenFormatter
, see
the documentation of this class for details.Modifier and Type | Method and Description |
---|---|
String |
toHistoryToken(List<PlaceRequest> placeRequestHierarchy)
Converts a place request hierarchy (a list of
PlaceRequest ) into a history token. |
PlaceRequest |
toPlaceRequest(String placeToken)
Converts a place token into a
PlaceRequest . |
List<PlaceRequest> |
toPlaceRequestHierarchy(String historyToken)
Converts a history token into a place request hierarchy (a list of
PlaceRequest ). |
String |
toPlaceToken(PlaceRequest placeRequest)
Converts a
PlaceRequest into a place token. |
String toHistoryToken(List<PlaceRequest> placeRequestHierarchy) throws TokenFormatException
PlaceRequest
) into a history token. The
history token will not be fully query encoded, it may still contain some unescaped separators.
However, these separators can be encoded and it will still work, making the scheme robust to
systems that force encoding these characters like some email apps.placeRequestHierarchy
- The place request hierarchy.TokenFormatException
- if there is an error converting.PlaceRequest toPlaceRequest(String placeToken) throws TokenFormatException
PlaceRequest
. A place token is different than a history
token, since the history token can contain a hierarchy of different place requests.placeToken
- The place token.TokenFormatException
- if there is an error converting.List<PlaceRequest> toPlaceRequestHierarchy(String historyToken) throws TokenFormatException
PlaceRequest
).historyToken
- The history token.TokenFormatException
- if there is an error converting.String toPlaceToken(PlaceRequest placeRequest) throws TokenFormatException
PlaceRequest
into a place token. A place token is different than a history
token, since the history token can contain a hierarchy of different place requests. The history
token will not be fully query encoded, it may still contain some unescaped separators.
However, these separators can be encoded and it will still work, making the scheme robust to
systems that force encoding these characters like some email apps.placeRequest
- The place request.TokenFormatException
- if there is an error converting.Copyright © 2010–2014 Arcbees. All rights reserved.