|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap<K,V> java.util.HashMap<String,String[]> lumis.util.PortletParametersMap
public class PortletParametersMap
Implements a Map for parameters with the usual constraints
specified in the JSR-168 interfaces, as in ActionResponse
and
PortletURL
.
The constraints are:
If any of the constraints above are violated, an IllegalArgumentException
is thrown when the parameter is tried to be set.
The String array values are cloned, so changes in the given array instance will not affect the value stored in the map.
For this behavior to be applied, the methods setParameter(String, String)
,
setParameter(String, String[])
or setParameters(Map)
must
be used. The Map
methods do not behave as stated above.
Constructor Summary | |
---|---|
PortletParametersMap()
|
Method Summary | |
---|---|
void |
setParameter(String key,
String value)
Sets a String parameter. |
void |
setParameter(String key,
String[] values)
Sets a String array parameter. |
void |
setParameters(Map parameters)
Sets a parameter map. |
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public PortletParametersMap()
Method Detail |
---|
public void setParameter(String key, String value)
This method replaces all parameters with the given key.
key
- key of the parametervalue
- value of the parameter
IllegalArgumentException
- if key or value are
null
.public void setParameter(String key, String[] values)
This method replaces all parameters with the given key.
key
- key of the parametervalues
- values of the parameter
IllegalArgumentException
- if key or value are
null
.public void setParameters(Map parameters)
All previously set render parameters are cleared.
parameters
- Map containing the parameters. The keys in the
parameter map must be of type String. The values in the
parameter map must be of type String array (String[]
).
IllegalArgumentException
- if parameters is
null
, if any of the key/values in the Map
are null
, if any of the keys is not a
String, or if any of the values is not a String array.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |