|
Copyright © 2008 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bea.netuix.util.PortletParameters
public class PortletParameters
Represents a set of parameters for a portlet.
This class exists to avoid repeatedly serializing and deserializing parameters from a string whenever possible, and to ensure consistent encoding and decoding of parameter names and values. This class is NOT internally synchronized.
| Nested Class Summary | |
|---|---|
static interface |
PortletParameters.ParameterFilter
Implementations of this interface are used to filter out or rename parameters when initially constructing a PortletParameters object. |
| Constructor Summary | |
|---|---|
PortletParameters()
Construct an empty PortletParameters |
|
PortletParameters(LinkedHashMap<String,List<String>> paramMap)
Constructs a new PortletParameters with the given parameter mapping. |
|
PortletParameters(PortletParameters params,
PortletParameters.ParameterFilter filter)
Constructs a new PortletParameters using the specified starting set and optional filter. |
|
PortletParameters(String queryString)
Construct a PortletParameters with the given initial parameter values |
|
PortletParameters(String queryString,
PortletParameters.ParameterFilter filter,
String encoding)
Constructs a new PortletParameters using the specified query string and optional filter. |
|
| Method Summary | |
|---|---|
void |
append(String name,
String[] additionalValues)
Appends the specified values to the parameter with the given name. |
void |
appendAll(Map<String,String[]> sourceMap)
Includes all parameters from the specified object into our own, appending any new values to existing values. |
void |
appendAll(PortletParameters other)
Includes all parameters from the specified object into our own, appending any new values to existing values. |
void |
appendFilteredParameters(PortletParameters other,
PortletParameters.ParameterFilter filter)
Includes all parameters from the specified PortletParameters into this PortletParameters, after running through the specified filter to eliminate and / or rename parameters from the supplied PortletParameters. |
void |
clear()
Clears out the parameters |
boolean |
equals(Object o)
|
String |
getAsString()
Get a string representation (properly encoded) of the parameters |
String |
getFirstValue(String name)
Gets the first value for the specified parameter, if a value exists, otherwise null. |
LinkedHashMap<String,String[]> |
getParameterMap()
Returns a deep copy of the internal map of parameters, with values as a String array. |
LinkedHashMap<String,List<String>> |
getParameterMapList()
Returns a deep copy of the internal map of parameters, with values as a List of String |
int |
getSize()
Returns the number of discreet mappings contained |
String[] |
getValues(String name)
Returns the set of values for the specified parameter |
Set<String> |
keySet()
|
static LinkedHashMap<String,List<String>> |
parseQueryString(String queryString,
String encoding,
PortletParameters.ParameterFilter filter)
Parses a query string into a map, using the specified encoding and optional parameter filter. |
void |
put(String name,
String[] value)
Puts the specified parameter mapping in, replacing any previous values |
void |
setEncoding(String encoding)
Sets the encoding |
void |
setFromString(String params)
Sets ALL values from the given string, wiping out all previous settings |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PortletParameters(String queryString)
queryString - the query string to usepublic PortletParameters()
public PortletParameters(LinkedHashMap<String,List<String>> paramMap)
public PortletParameters(String queryString,
PortletParameters.ParameterFilter filter,
String encoding)
queryString - the query string to parseencoding - the encoding to usefilter - the parameter filter to use when constructing this object, which can
rename parameters or eliminate them from the resulting map.
public PortletParameters(PortletParameters params,
PortletParameters.ParameterFilter filter)
params - the starting set of parametersfilter - the parameter filter to use when constructing this object,
which can rename parameters or eliminate them from the original set.| Method Detail |
|---|
public void setEncoding(String encoding)
public String getAsString()
public void setFromString(String params)
public void put(String name,
String[] value)
public String getFirstValue(String name)
public String[] getValues(String name)
public void appendAll(PortletParameters other)
public void appendFilteredParameters(PortletParameters other,
PortletParameters.ParameterFilter filter)
public void appendAll(Map<String,String[]> sourceMap)
public void append(String name,
String[] additionalValues)
public void clear()
public LinkedHashMap<String,String[]> getParameterMap()
public LinkedHashMap<String,List<String>> getParameterMapList()
public Set<String> keySet()
public int getSize()
public String toString()
toString in class Objectpublic boolean equals(Object o)
equals in class Object
public static LinkedHashMap<String,List<String>> parseQueryString(String queryString,
String encoding,
PortletParameters.ParameterFilter filter)
queryString - the query string to parse, cannot be nullencoding - the encoding to use, cannot be nullfilter - the parameter filter to use when constructing the map, which can
rename parameters or eliminate them from the resulting map.
|
Copyright © 2008 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||