org.apache.wicket
Class PageParameters

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap<String,Object>
              extended by org.apache.wicket.util.value.ValueMap
                  extended by org.apache.wicket.PageParameters
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>, IValueMap

public final class PageParameters
extends ValueMap

A typesafe abstraction and container for parameters to a requested page. Page parameters in HTTP are query string values in the request URL. In other protocols, the parameters to a page might come from some other source.

Pages which take a PageParameters object as an argument to their constructor can be accessed directly from a URL and are known as "bookmarkable" pages since the URL is stable across sessions and can be stored in a browser's bookmark database.

Author:
Jonathan Locke
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
static PageParameters NULL
          Null value for page parameters
 
Fields inherited from class org.apache.wicket.util.value.ValueMap
EMPTY_MAP
 
Constructor Summary
PageParameters()
          Constructor
PageParameters(Map<String,?> parameterMap)
          Copy constructor.
PageParameters(String keyValuePairs)
          Construct.
PageParameters(String keyValuePairs, String delimiter)
          Deprecated. Please use RequestUtils.decodeParameters(String, ValueMap) to decode a request URL, or ValueMap.ValueMap(String, String) for other usecases.
 
Method Summary
 boolean equals(Object o)
           
 Object put(String key, Object value)
           
 Map<String,String[]> toRequestParameters()
          Converts page parameters to servlet request parameters
 
Methods inherited from class org.apache.wicket.util.value.ValueMap
add, clear, getAsBoolean, getAsBoolean, getAsDouble, getAsDouble, getAsDuration, getAsDuration, getAsEnum, getAsEnum, getAsEnum, getAsInteger, getAsInteger, getAsLong, getAsLong, getAsTime, getAsTime, getBoolean, getCharSequence, getDouble, getDouble, getDuration, getInt, getInt, getKey, getLong, getLong, getString, getString, getStringArray, getStringValue, getTime, isImmutable, makeImmutable, putAll, remove, toString
 
Methods inherited from class java.util.LinkedHashMap
containsValue, get, removeEldestEntry
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, size, values
 
Methods inherited from class java.util.AbstractMap
hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, containsValue, entrySet, get, hashCode, isEmpty, keySet, size, values
 

Field Detail

NULL

public static final PageParameters NULL
Null value for page parameters

Constructor Detail

PageParameters

public PageParameters()
Constructor


PageParameters

public PageParameters(Map<String,?> parameterMap)
Copy constructor.

Parameters:
parameterMap - The map to copy
See Also:
ValueMap.ValueMap(java.util.Map)

PageParameters

public PageParameters(String keyValuePairs)
Construct.

Parameters:
keyValuePairs - List of key value pairs separated by commas. For example, "param1=foo,param2=bar"
See Also:
ValueMap.ValueMap(String)

PageParameters

@Deprecated
public PageParameters(String keyValuePairs,
                                 String delimiter)
Deprecated. Please use RequestUtils.decodeParameters(String, ValueMap) to decode a request URL, or ValueMap.ValueMap(String, String) for other usecases.

Construct.

Parameters:
keyValuePairs - List of key value pairs separated by commas. For example, "param1=foo,param2=bar"
delimiter - Delimiter string used to separate key/value pairs
See Also:
ValueMap.ValueMap(String)
Method Detail

put

public Object put(String key,
                  Object value)
Specified by:
put in interface Map<String,Object>
Overrides:
put in class ValueMap
See Also:
ValueMap.put(java.lang.String, java.lang.Object)

toRequestParameters

public Map<String,String[]> toRequestParameters()
Converts page parameters to servlet request parameters

Returns:
request parameters map

equals

public boolean equals(Object o)
Specified by:
equals in interface Map<String,Object>
Overrides:
equals in class AbstractMap<String,Object>
See Also:
AbstractMap.equals(java.lang.Object)


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.