|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.swt.client.util.URLParameterCache
public final class URLParameterCache
Global static routines to obtain the parameters from the browser's URL string.
It is important to note the maximum URL string length for the browsers:
This class returns fully decoded strings, so that higher level code has no
need to perform any further URL-related decoding (such as having to call
URL.decodeComponent(java.lang.String)
). This assumes that the URL used has been encoded
using both URI encoding and URI component encoding. (URI Component encoding
includes encoding such characters as the /?#&=
that URI
encoding does not change.)
For example if the URL aims to include a query parameter
MYPARAM=/!@#$^&*()~`
then this will have been encoded to MYPARAM=%2F!%40%23%24%5E%26*()~%60
and this class will return the original /!@#$^&*()~`
Field Summary | |
---|---|
static java.lang.String |
SESSION_ID_PARAM
|
Method Summary | |
---|---|
static void |
disable()
For use in JUnit testing, disconnect from the GWT |
static java.lang.String |
get(java.lang.String param)
Gets the URL's parameter of the specified name. |
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getMap()
Returns a Map of the URL query parameters for the host page; since changing the map would not change the window's location, the map returned is immutable. |
static java.util.List<java.lang.String> |
getValues(java.lang.String param)
Gets a list of values for a specified parameter. |
static boolean |
isEmpty()
Indicates whether or not the map of URL Parameters is empty. |
static boolean |
isEnabled()
A hack until ApplicationParameters is fixed. |
static int |
size()
Gets the number of URL parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SESSION_ID_PARAM
Method Detail |
---|
public static void disable()
public static boolean isEnabled()
public static java.lang.String get(java.lang.String param)
param
- The name of the URL parameter.
public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> getMap()
public static java.util.List<java.lang.String> getValues(java.lang.String param)
param
- The name of the URL parameter.
public static int size()
public static boolean isEmpty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |