public interface MutablePortletParameters extends PortletParameters, Mutable
MutablePortletParameters
provides methods that allow
setting parameters to define a potential future render state.
RenderState
provides a description of the render state.
PortletParameters
provides a description of the parameter concept.
RenderState
,
PortletParameters
,
MutableRenderState
Modifier and Type | Method and Description |
---|---|
MutablePortletParameters |
add(PortletParameters params)
Adds the parameters from the input
PortletParameters object
if they are not already present. |
void |
clear()
Clears all parameters.
|
Set<String> |
getNames()
Returns a
Set of String
objects containing the names of the parameters contained
in this object. |
boolean |
removeParameter(String name)
Removes the given public or private parameter.
|
MutablePortletParameters |
set(PortletParameters params)
Makes the public and private parameters identical to
those of the input PortletParameters object.
|
String |
setValue(String name,
String value)
Sets a String parameter.
|
String[] |
setValues(String name,
String... values)
Sets a multivalued String parameter.
|
Set<String> getNames()
Set
of String
objects containing the names of the parameters contained
in this object.
A parameter cannot be added through use of the set. However, removing a parameter from the set will remove the underlying parameter.
Only parameter names targeted to the current portlet are returned.
getNames
in interface PortletParameters
Set
of String
objects, each String
containing
the name of a parameter; or an
empty Set
if the
MutablePortletParameters object has no parameters.String setValue(String name, String value)
If the parameter already exists, this method replaces all existing values with the new value.
A parameter value of null
is valid.
To remove a parameter, use removeParameter(String)
.
name
- the parameter namevalue
- the parameter valuenull
if there was no previous value.IllegalArgumentException
- if name is null
.String[] setValues(String name, String... values)
If the parameter already exists, this method replaces all existing values with the new value array.
An input value of null or an empty array is valid.
These values will be preserved when reading the parameter through
PortletParameters.getValues(String)
, but will be
mapped to the value null
when the parameter is read
through PortletParameters.getValue(String)
.
A parameter value of null
within the array is valid.
To remove a parameter, use removeParameter(String)
.
name
- the parameter namevalues
- An array of parameter valuesnull
if there was no previous value.IllegalArgumentException
- if name is null
boolean removeParameter(String name)
name
- the parameter nametrue
if the parameter name was present.IllegalArgumentException
- if name is null
.MutablePortletParameters set(PortletParameters params)
The parameters are copied so that after the operation completes, there is no linkage to the input object.
params
- - input portlet parametersMutablePortletParameters add(PortletParameters params)
PortletParameters
object
if they are not already present.
If a parameter from the input object is already present, its value
will be updated with the input value.
The parameters are copied so that after the operation completes, there is no linkage to the input object.
params
- - input portlet parametersvoid clear()
Java Portlet 3.0 API Specification. See the Copyright and License provided with this distribution. Use is subject to license terms.