Interface MutablePortletParameters

    • Method Detail

      • getNames

        Set<String> getNames()
        Returns a 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.

        Specified by:
        getNames in interface PortletParameters
        Returns:
        a Set of String objects, each String containing the name of a parameter; or an empty Set if the MutablePortletParameters object has no parameters.
      • setValue

        String setValue​(String name,
                        String value)
        Sets a String parameter.

        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).

        Parameters:
        name - the parameter name
        value - the parameter value
        Returns:
        The previous parameter value, or null if there was no previous value.
        Throws:
        IllegalArgumentException - if name is null.
      • setValues

        String[] setValues​(String name,
                           String... values)
        Sets a multivalued String parameter.

        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).

        Parameters:
        name - the parameter name
        values - An array of parameter values
        Returns:
        The previous parameter value array, or null if there was no previous value.
        Throws:
        IllegalArgumentException - if name is null
      • removeParameter

        boolean removeParameter​(String name)
        Removes the given public or private parameter. All values associated with the name are removed.
        Parameters:
        name - the parameter name
        Returns:
        true if the parameter name was present.
        Throws:
        IllegalArgumentException - if name is null.
      • set

        MutablePortletParameters set​(PortletParameters params)
        Makes the public and private parameters identical to those of the input PortletParameters object.

        The parameters are copied so that after the operation completes, there is no linkage to the input object.

        Parameters:
        params - - input portlet parameters
        Returns:
        MutablePortletParameters object containing the previous values
      • add

        MutablePortletParameters add​(PortletParameters params)
        Adds the parameters from the input 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.

        Parameters:
        params - - input portlet parameters
        Returns:
        MutablePortletParameters object containing the previous values
      • clear

        void clear()
        Clears all parameters.