|
Back to GWTP Home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcom.gwtplatform.mvp.client.proxy.ParameterTokenFormatterOld
ParameterTokenFormatter instead.
public final class ParameterTokenFormatterOld
Formats tokens from String values to PlaceRequest and
PlaceRequest hierarchies and vice-versa. The default implementation
uses:
'/' to separate PlaceRequests in a hierarchy;';' to separate parameters in a PlaceRequest;'=' to separate the parameter name from its value.URL.encodeQueryString(String)). As a consequence, a custom
ParameterTokenFormatterOld must use separators that are modified when
passed to URL.encodeQueryString(String).
For example, ParameterTokenFormatterOld would parse:
nameToken1;param1.1=value1.1;param1.2=value1.2/nameToken2/nameToken3;param3.1=value%2f3%3d1Into the following hierarchy of
PlaceRequest:
{
{ "nameToken1", { {"param1.1", "value1.1"}, {"parame1.2","value1.2"} },
"nameToken2", {},
"nameToken3", { {"param3.1", "value/3=1"} } }
}
If you want to use different symbols as separator, use the
ParameterTokenFormatterOld(String, String, String) constructor.
| Field Summary | |
|---|---|
protected static String |
DEFAULT_HIERARCHY_SEPARATOR
Deprecated. |
protected static String |
DEFAULT_PARAM_SEPARATOR
Deprecated. |
protected static String |
DEFAULT_VALUE_SEPARATOR
Deprecated. |
| Constructor Summary | |
|---|---|
ParameterTokenFormatterOld()
Deprecated. Builds a ParameterTokenFormatterOld using the default separators. |
|
ParameterTokenFormatterOld(String hierarchySeparator,
String paramSeparator,
String valueSeparator)
Deprecated. This constructor makes it possible to use custom separators in your token formatter. |
|
| Method Summary | |
|---|---|
String |
toHistoryToken(List<PlaceRequest> placeRequestHierarchy)
Deprecated. Converts a place request hierarchy (a list of PlaceRequest) into a history token. |
PlaceRequest |
toPlaceRequest(String placeToken)
Deprecated. Converts a place token into a PlaceRequest. |
List<PlaceRequest> |
toPlaceRequestHierarchy(String historyToken)
Deprecated. Converts a history token into a place request hierarchy (a list of PlaceRequest). |
String |
toPlaceToken(PlaceRequest placeRequest)
Deprecated. Converts a PlaceRequest into a place token. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String DEFAULT_HIERARCHY_SEPARATOR
protected static final String DEFAULT_PARAM_SEPARATOR
protected static final String DEFAULT_VALUE_SEPARATOR
| Constructor Detail |
|---|
@Inject public ParameterTokenFormatterOld()
ParameterTokenFormatterOld using the default separators.
public ParameterTokenFormatterOld(String hierarchySeparator,
String paramSeparator,
String valueSeparator)
URL.encodeQueryString(String))
hierarchySeparator - The symbol used to separate PlaceRequest
in a hierarchy. Must be a 1-character string and can't be %.paramSeparator - The symbol used to separate parameters in a
PlaceRequest. Must be a 1-character string and can't be %.valueSeparator - The symbol used to separate the parameter name from
its value. Must be a 1-character string and can't be %.| Method Detail |
|---|
public String toHistoryToken(List<PlaceRequest> placeRequestHierarchy)
throws TokenFormatException
TokenFormatterPlaceRequest) 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.
toHistoryToken in interface TokenFormatterplaceRequestHierarchy - The place request hierarchy.
TokenFormatException - if there is an error converting.
public PlaceRequest toPlaceRequest(String placeToken)
throws TokenFormatException
TokenFormatterPlaceRequest. A place token is different than a history
token, since the history token can contain a hierarchy of different place requests.
toPlaceRequest in interface TokenFormatterplaceToken - The place token.
TokenFormatException - if there is an error converting.
public List<PlaceRequest> toPlaceRequestHierarchy(String historyToken)
throws TokenFormatException
TokenFormatterPlaceRequest).
toPlaceRequestHierarchy in interface TokenFormatterhistoryToken - The history token.
TokenFormatException - if there is an error converting.public String toPlaceToken(PlaceRequest placeRequest)
TokenFormatterPlaceRequest 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.
toPlaceToken in interface TokenFormatterplaceRequest - The place request.
|
Back to GWTP Home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||